Skip to main content

Function: isPromiseLike()

function isPromiseLike(value: unknown): value is PromiseLike<unknown>;

Defined in: shared/utils/typeHelpers.ts:138

Safely checks whether a value follows the PromiseLike contract.

Parametersโ€‹

valueโ€‹

unknown

Returnsโ€‹

value is PromiseLike<unknown>

Remarksโ€‹

Accepts object and function thenables. This intentionally avoids instanceof Promise so cross-realm promises and SDK-specific thenables are handled consistently.