Observable<T>: {
    subscribe: ((observer) => {
        unsubscribe: Unsubscribe;
    });
    [observable](): Observable<T>;
}

A minimal observable of state changes. For more information, see the observable proposal: https://github.com/tc39/proposal-observable

Type Parameters

  • T

Type declaration

  • subscribe: ((observer) => {
        unsubscribe: Unsubscribe;
    })

    The minimal observable subscription method.

    Returns

    An object with an unsubscribe method that can be used to unsubscribe the observable from the store, and prevent further emission of values from the observable.

      • (observer): {
            unsubscribe: Unsubscribe;
        }
      • Parameters

        • observer: Observer<T>

          Any object that can be used as an observer. The observer object should have a next method.

        Returns {
            unsubscribe: Unsubscribe;
        }

  • [observable]:function
    • Returns Observable<T>