Options
All
  • Public
  • Public/Protected
  • All
Menu

Describes action with given type and payload type. Can be used as action creator function and provides other utilities.

Type parameters

  • P

Hierarchy

  • PayloadActionDefinition

Callable

  • __call(payload: P): Action<P>
  • action creator function

    Parameters

    • payload: P

    Returns Action<P>

    plain action object containing type and paylaod

Index

Properties

Methods

Properties

actionType

actionType: string

globally unique action type

Methods

handler

  • Creates action handler object for usage in createReducer function.

    see

    immer.js

    Type parameters

    • S

    Parameters

    • fn: function

      the actual handler function which receives mutable state draft and action paylaod.

    Returns ActionHandler<S, P>

isTypeOf

  • Typeguard for checking if action is of given type. Narrows action.payload type to appropriate P type

    Parameters

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc