• Subscribe to an event for a single delivery, then auto-unsubscribe.

    Type Parameters

    Parameters

    • evt: K

      The event name (a key of EventMap).

    • fn: ((payload) => void)

      Handler that receives the event payload once.

        • (payload): void
        • Parameters

          Returns void

    Returns Unsubscribe

    A function that cancels the subscription before it fires.