Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Subscribable<T>

A stream of values that may be subscribed to.

Type parameters

  • T

Hierarchy

Index

Methods

Methods

subscribe

  • subscribe(observer?: PartialObserver<T>): Unsubscribable
  • subscribe(next: null | undefined, error: null | undefined, complete: () => void): Unsubscribable
  • subscribe(next: null | undefined, error: (error: any) => void, complete?: (() => void) | null): Unsubscribable
  • subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Unsubscribable
  • subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Unsubscribable
  • Subscribes to the stream of values.

    Parameters

    Returns Unsubscribable

    An unsubscribable that, when its {@link Unsubscribable#unsubscribe} method is called, causes the subscription to stop reacting to the stream.

  • deprecated

    Use an observer instead of a complete callback

    Parameters

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

    Returns Unsubscribable

  • deprecated

    Use an observer instead of an error callback

    Parameters

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

          • error: any

          Returns void

    • Optional complete: (() => void) | null

    Returns Unsubscribable

  • deprecated

    Use an observer instead of a complete callback

    Parameters

    • next: (value: T) => void
        • (value: T): void
        • Parameters

          • value: T

          Returns void

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

    Returns Unsubscribable

  • Parameters

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

    Returns Unsubscribable

Generated using TypeDoc