Type alias StateReducerInput<Actions>

StateReducerInput<Actions>: AccumulateStateReducerInput<Actions, U.ListOf<keyof Actions>, {
    action: StateReducerInit;
    param: void;
}>

Represents the Readable (input) types of StateReducer actions.

Type Parameters

  • Actions extends Record<string, unknown>

Type declaration

  • action: StateReducerInit
  • param: void

Example

type T = StateReducerInput<{ foo: string, bar: number, nothing: void }>
// | { action: 'foo', param: string }
// | { action: 'bar', param: number }
// | { action: 'nothing' }

Generated using TypeDoc