AboutSupportDeveloper GuideVersion 36.122.80.23

Type alias EventHandler<EmitterEvent, EventType>

EventHandler<EmitterEvent, EventType>: ((payload, ...args) => void)

Type Parameters

Type declaration

    • (payload, ...args): void
    • Handler for an event on an EventEmitter.

      Parameters

      • payload: Extract<EmitterEvent, {
            type: EventType;
        }>
      • Rest ...args: any[]

      Returns void

      Remarks

      Selects the correct type for the event payload from the provided union based on the provided string literal type.