@jetjs/streams

class Observable

Observables are always Hot-Observables and are lazy by default

Properties

PropertyTypeDescription
nextObserver
Observer

Methods

MethodReturnDescription
of(values)
Observable
pipe(operator)
Observable
subscribe(observerOrNext, error, complete)
Subscription

Property Details

Method Details

  • of(values) Method

    Creates a sync stream with the provided values.

    Signature:
    static of<T>(...values: T[]): Observable<T>;
    Returns:
    Observable
    ParameterTypeDescription
    values
    T[]

    parameter list with values to create a stream from.

  • pipe(operator) Method

    adds a new Operator to the stream. It doesn't starts the lazy stream.

    Signature:
    pipe<O>(operator: Operator<T, O>): Observable<O>;
    Returns:
    Observable
    ParameterTypeDescription
    operator
    Operator

    the ObservableObserver to add

  • subscribe(observerOrNext, error, complete) Method

    subscribe to the observable and start the lazy stream

    Signature:
    subscribe(observerOrNext: Observer<T> | NextFn<T>, error?: ErrorFn, complete?: CompleteFn): Subscription;
    Returns:
    Subscription
    ParameterTypeDescription
    observerOrNext
    Observer | NextFn

    If an Observer is provided, the following arguments will be ignored

    error
    ErrorFn

    (otpional) Error handler

    complete
    CompleteFn

    (optional) completion handler