MCPcopy Create free account
hub / github.com/angular/components / coerceObservable

Function coerceObservable

src/cdk/coercion/private/observable.ts:14–19  ·  view source on GitHub ↗
(data: T | Observable<T>)

Source from the content-addressed store, hash-verified

12 * Observable, or wraps it in an Observable that emits the non-Observable value.
13 */
14export function coerceObservable<T>(data: T | Observable<T>): Observable<T> {
15 if (!isObservable(data)) {
16 return observableOf(data);
17 }
18 return data;
19}

Calls

no outgoing calls

Tested by

no test coverage detected