Skip to content

isThenable

isThenable<T>(value): value is PromiseLike<T>

Defined in: packages/core/src/guards/is-thenable.ts:11

Check if a value is thenable, and so can be awaited as a promise.

Structural rather than instanceof Promise: a value from another realm, a userland promise implementation, or a plain function returning Promise.resolve() are all awaitable and none of them are Promise.

T = unknown

unknown

The value to check

value is PromiseLike<T>

True if the value has a callable then