Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case "SECOND":
return { ...state, second: true };
default:
// $ExpectError
return {};
}
};
//
// liftState
//
// ok
const lifted: [State, Effect] = L.liftState({ first: true, second: false });
//
// loop accessors
//
const state: State = { first: true, second: false };
const loopState: [State, Effect] = loop(
{ first: true, second: false },
Effects.constant({ type: "SECOND" })
);
// ok
const model1: State = L.getModel(loopState);
// ok