Debian Codegraph @

node/rxjs/src/internal/util/isPromise.ts

raw
1 import { isFunction } from "./isFunction";
2
3 /**
4 * Tests to see if the object is "thennable".
5 * @param value the object to test
6 */
7 export function isPromise(value: any): value is PromiseLike<any> {
8 return isFunction(value?.then);
9 }