MCPcopy
hub / github.com/angular/angular / isPromise

Function isPromise

packages/core/src/util/lang.ts:14–18  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

12 * Determine if the argument is shaped like a Promise
13 */
14export function isPromise<T = any>(obj: any): obj is Promise<T> {
15 // allow any Promise/A+ compliant thenable.
16 // It's up to the caller to ensure that obj.then conforms to the spec
17 return !!obj && typeof obj.then === 'function';
18}
19
20/**
21 * Determine if the argument is a Subscribable

Callers 5

runInitializersMethod · 0.90
toObservableFunction · 0.85
constructorMethod · 0.85
wrapIntoObservableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…