Basic type for all action creators.

Inherit Doc

Type Parameters

  • P

  • T extends string = string

Hierarchy

  • Calling this redux#ActionCreator with an argument will return a PayloadAction of type T with a payload of P. Calling it without an argument will return a PayloadAction with a payload of undefined.

    Parameters

    • Optional payload: P

    Returns {
        payload: P;
        type: T;
    }

    • payload: P
    • type: T

Properties

Properties

match: ((action) => action is {
    payload: P;
    type: T;
})

Type declaration

    • (action): action is {
          payload: P;
          type: T;
      }
    • Parameters

      Returns action is {
          payload: P;
          type: T;
      }

type: T

Generated using TypeDoc