Type alias StateReducers<Actions, State>

StateReducers<Actions, State>: {
    [Action in keyof Actions]: StateReducer<Actions[Action], State>
} & {
    __INIT__(): Readonly<State>;
}

A collection of reducers for a State.

Type Parameters

  • Actions

  • State

Type declaration

Example

interface State {
foos: string[]
}

interface Actions {
foo: string
}

type Reducers = StateReducers<State, Actions>
// {
// __INIT__: () => State,
// foo: (state: State, param: string) => State,
// }

Generated using TypeDoc