Type alias StateReducerOutput<Actions, State>

StateReducerOutput<Actions, State>: AccumulateStateReducerOutput<Actions, Readonly<State>, U.ListOf<keyof Actions>, {
    action: StateReducerInit;
    param: void;
    state: Readonly<State>;
}>

Represents the Writable (output) types of StateReducer actions.

Type Parameters

  • Actions extends Record<string, unknown>

  • State

Type declaration

  • action: StateReducerInit
  • param: void
  • state: Readonly<State>

Example

type T = StateReducerOutput<{ foo: string, bar: number, nothing: never }, string>
// | { action: 'foo', param: string, state: string }
// | { action: 'bar', param: number, state: string }
// | { action: 'nothing', state: string }

Generated using TypeDoc