Class Observable<T>

Observable implementation.

Type Parameters

  • T

Hierarchy (View Summary)

Implements

Constructors

Methods

  • Subscribes the given observer to this object.

    Parameters

    • observer: Observer<T>

      The observer to subscribe.

    Returns Subscription

    Object which can be used to unsubscribe the observer.

  • Constructs a new observer using the given callback functions and subscribes it to this object.

    Parameters

    • onNext: (value: T) => void

      Receives the next value in the sequence.

    • OptionalonError: (error: Error) => void

      Receives the sequence error.

    • OptionalonComplete: () => void

      Receives a completion notification.

    Returns Subscription

    Object which can be used to unsubscribe the observer.

  • Parameters

    • next: undefined | null
    • error: undefined | null
    • complete: () => void

    Returns Subscription

    Use an observer instead of a complete callback

  • Parameters

    • next: undefined | null
    • error: (error: any) => void
    • Optionalcomplete: () => void

    Returns Subscription

    Use an observer instead of an error callback

  • Parameters

    • next: (value: T) => void
    • error: undefined | null
    • complete: () => void

    Returns Subscription

    Use an observer instead of a complete callback

  • Parameters

    Returns Subscription