Function latestValueFromOrDefault

  • Reads a cached value from synchronously resolving observable. Often used in conjunction with the cache operator to read the latest cached value.

    Type Parameters

    • T
    • TDefault

    Parameters

    • observable: Observable<T> | Subscribable<T>
    • defaultValue: TDefault

    Returns T | TDefault

    value - Cached value, or given default if none was found

  • Reads a cached value from synchronously resolving observable. Often used in conjunction with the cache operator to read the latest cached value.

    Type Parameters

    • T

    Parameters

    • Optionalobservable: Observable<T> | Subscribable<T>

    Returns T | undefined

    value - Cached value, or undefined if none was found