MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / isPromise

Function isPromise

src/platform/common/utils/async.ts:74–76  ·  view source on GitHub ↗
(v: any)

Source from the content-addressed store, hash-verified

72
73// eslint-disable-next-line @typescript-eslint/no-explicit-any
74export function isPromise<T>(v: any): v is Promise<T> {
75 return typeof v?.then === 'function' && typeof v?.catch === 'function';
76}
77// eslint-disable-next-line @typescript-eslint/no-explicit-any
78export function isPromiseLike<T>(v: any): v is PromiseLike<T> {
79 return typeof v?.then === 'function';

Callers 5

constructorMethod · 0.90
timerFuncFunction · 0.90
tracingFunction · 0.90
swallowExceptionsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected