Type Alias TCallbacksAction<Parameter, Ctx>

TCallbacksAction: Parameter extends undefined
    ? (data: undefined, ctx: Ctx) => void
    : (data: Parameter, ctx: Ctx) => void

Callback listener signature.

If the event payload is undefined, the data argument is still passed explicitly so listeners share a consistent arity.

Type Parameters

  • Parameter

    Event payload type from the callbacks map.

  • Ctx

    Context type from ICallbacksProps.