Observable<T, E>

INTERFACE

The interface each component of uiloos/core implements so it can be subscribed to.

Note: there is no reason to ever implement the Observable interface yourself. It is only exposed so bindings to frameworks can use the type.

Since 1.4.0

Methods

  • subscribe

    Subscribe to changes of the Observable. The function you provide will get called whenever changes occur in the Observable.

    Returns an unsubscribe function which when called will unsubscribe from the Observable.

    Since 1.4.0

    Signature

    subscribe(
    subscriber : Subscriber<T,E>
    ): UnsubscribeFunction

    Parameters

    subscriber: Subscriber<T,E>

    The subscriber which responds to changes in the Observable.

    Returns

    A function which when called will unsubscribe from the Observable.