@tsdotnet/event-factory - v2.0.11
    Preparing search index...

    Interface SubscribableOnce<T>

    interface SubscribableOnce<T> {
        once(listener: Listener<T>): Unsubscribe;
        once(): Promise<T>;
    }

    Type Parameters

    • T
    Index

    Methods

    Methods

    • Subscribes and automatically unsubscribes on first event.

      Parameters

      Returns Unsubscribe

    • The next event is resolved as a fulfilled promise. (The promise will never be faulted.) If the event is never triggered, the promise will never resolve.

      Returns Promise<T>