A concrete Observable implementation.

Type Parameters

  • T extends any[] = any[]
  • R = void

Hierarchy (view full)

Implements

Constructors

Accessors

  • get isAsync(): undefined | boolean
  • This flag indicates whether the observable is asynchronous. Any observable that accepts promise returns may be asynchronous but this information is not available at runtime unless you specify here, typically via AsyncObservable.

    Returns undefined | boolean

  • set isAsync(isAsync): void
  • This flag indicates whether the observable is asynchronous. Any observable that accepts promise returns may be asynchronous but this information is not available at runtime unless you specify here, typically via AsyncObservable.

    Parameters

    • isAsync: undefined | boolean

    Returns void

Methods

  • Observable supports standard "for await (const value of observable").

    Using an observer in this manner limits your listener to the first parameter normally emitted and your observer cannot return a value.

    Returns AsyncIterator<T[0], any, any>

  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type Parameters

    • TResult1 = T
    • TResult2 = never

    Parameters

    • Optionalonfulfilled: null | ((value: T) => TResult1 | PromiseLike<TResult1>)

      The callback to execute when the Promise is resolved.

    • Optionalonrejected: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)

      The callback to execute when the Promise is rejected.

    Returns PromiseLike<TResult1 | TResult2>

    A Promise for the completion of which ever callback is executed.