Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function test_handleAction() {
const reducer = handleAction(INCREMENT, (state, action: ActionType) => {
assert(action.payload, (x: number) => {})
// $ExpectError
assert(action.payload, (x: string) => {})
}, initState)
}
function test_handleAction() {
const reducer = handleAction(INCREMENT, (state, action: ActionType) => {
assert(action.payload, (x: number) => {})
// $ExpectError
assert(action.payload, (x: string) => {})
}, initState)
}
const reducers = filter(mapValues(o, (v, k) => {
if (k === 'initialState') return
const name = parentName ? `${parentName}.${k}` : k
if (isFunction(v)) {
hadReducers = true
return handleAction(name, v)
}
if (typeof v === 'object') {
return createReducer(v, name)
}
}), isFunction)