Type Alias AddListener<T>

AddListener<T>: ((callback: Callback<T>) => Promise<Unsubscribe>)

Type representing a function to add a listener.

Type Parameters

  • T

    The type of the parameter for the callback function.

Type declaration

    • (callback): Promise<Unsubscribe>
    • Parameters

      • callback: Callback<T>

        The callback function to be invoked.

      Returns Promise<Unsubscribe>

      A promise that resolves to an unsubscribe function.