Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const loopState: [State, Effect] = loop(
{ first: true, second: false },
Effects.constant({ type: "SECOND" })
);
// ok
const model1: State = L.getModel(loopState);
// ok
const model2: State = L.getModel(state);
// ok
const effect1: Effect = L.getEffect(loopState);
// ok
const effect2: null = L.getEffect(state);
// $ExpectError
const effect3: Effect = L.getEffect(state);
// ok
L.isLoop(loopState);
// ok
L.isLoop(state);
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
const model2: State = L.getModel(state);
// ok
const effect1: Effect = L.getEffect(loopState);
// ok
const effect2: null = L.getEffect(state);
// $ExpectError
const effect3: Effect = L.getEffect(state);
// ok
L.isLoop(loopState);
// ok
L.isLoop(state);
);
// ok
const model1: State = L.getModel(loopState);
// ok
const model2: State = L.getModel(state);
// ok
const effect1: Effect = L.getEffect(loopState);
// ok
const effect2: null = L.getEffect(state);
// $ExpectError
const effect3: Effect = L.getEffect(state);
// ok
L.isLoop(loopState);
// ok
L.isLoop(state);