|
export type Reducer<T> = (state: T | undefined) => T | undefined; |
Is this exported Reducer meant to be imported and used in apps? I find that in my app I would like to have a reducer type where state is always defined:
type Reducer<T> = (state: T) => T
Could we have a separate API for instantiating state, somehow, so that a Reducer could assume positive existence of state?
cyclejs/state/src/types.ts
Line 2 in 313762d
Is this exported
Reducermeant to be imported and used in apps? I find that in my app I would like to have a reducer type where state is always defined:Could we have a separate API for instantiating state, somehow, so that a
Reducercould assume positive existence of state?