MCPcopy
hub / github.com/vercel/next.js / isThenable

Function isThenable

packages/next/src/shared/lib/is-thenable.ts:7–16  ·  view source on GitHub ↗
(
  promise: Promise<T> | T
)

Source from the content-addressed store, hash-verified

5 * @returns true if the value is thenable
6 */
7export function isThenable<T = unknown>(
8 promise: Promise<T> | T
9): promise is Promise<T> {
10 return (
11 promise !== null &&
12 typeof promise === 'object' &&
13 'then' in promise &&
14 typeof promise.then === 'function'
15 )
16}

Callers 7

useActionQueueFunction · 0.90
runActionFunction · 0.90
afterMethod · 0.90
traceMethod · 0.90
runInSequentialTasksFunction · 0.90
trackPendingImportFunction · 0.90
trackDynamicImportFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected