Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wrap-into-observable"

Index

Functions

isPromise

  • isPromise<T>(obj: any): obj is Promise<T>
  • Type parameters

    • T

    Parameters

    • obj: any

    Returns obj is Promise<T>

wrapIntoObservable

  • wrapIntoObservable<T>(input: Promise<T> | Observable<T> | T | void): Observable<T>
  • Wraps any value into an observable.

    • If the input is an Observable, the input is returned directly.
    • If the input is a Promise, it is converted to an Observable.
    • If the input is null or undefined an empty Observable is returned.
    • Otherwise the input is simply wrapped into an Observable.

    Type parameters

    • T

    Parameters

    • input: Promise<T> | Observable<T> | T | void

      Input which will be wrapped into an Observable.

    Returns Observable<T>

    Observable which wraps the input.

Generated using TypeDoc