Interface IAsyncObservable<T>

Coordinates async subscriber actions with publish events

interface IAsyncObservable<T> {
    Cancel(subscriptionId): void;
    Discontinue(): void;
    Order(func, useCurrentIssue?): Promise<void>;
    Publish(content?): void;
    Reinstate(): void;
    Subscribe(func, useCurrentIssue?): Promise<string>;
}

Type Parameters

  • T

Hierarchy (view full)

Implemented by

Methods

  • A single issue subscription. Once the function for an order fires, it is automatically canceled

    Parameters

    • func: ((content?) => Promise<void>)
        • (content?): Promise<void>
        • Parameters

          • Optional content: T

          Returns Promise<void>

    • Optional useCurrentIssue: boolean

      Determines if the order can be filled by the current issue

    Returns Promise<void>

  • Specify an async function to fire on future publish events | id returned allows caller to cancel subscription

    Parameters

    • func: ((content?) => Promise<void>)
        • (content?): Promise<void>
        • Parameters

          • Optional content: T

          Returns Promise<void>

    • Optional useCurrentIssue: boolean

    Returns Promise<string>

Generated using TypeDoc