Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 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);
return namespacer((state, action) => {
const result = reducer(state, action)
if (isLoop(result)) {
const model = getModel(result)
const cmd = getCmd(result)
return loop(model, commandNamespacer(cmd))
}
return result
})
}