sesaparcours
    Preparing search index...

    Interface ActionCreatorWithPayload<P, T>

    Basic type for all action creators.

    interface ActionCreatorWithPayload<P, T extends string = string> {
        match: (action: Action<unknown>) => action is { payload: P; type: T };
        type: T;
        (payload: P): { payload: P; type: T };
    }

    Type Parameters

    • P
    • T extends string = string

    Hierarchy (View Summary)

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

      Parameters

      • payload: P

      Returns { payload: P; type: T }

    Index

    Properties

    Properties

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