Skip to main content
types.isPromise - util - Node documentation
function types.isPromise

Usage in Deno

import { types } from "node:util";
isPromise(object: unknown): object is Promise<unknown>

Returns true if the value is a built-in Promise.

util.types.isPromise(Promise.resolve(42));  // Returns true

Parameters

object: unknown

Return Type

object is Promise<unknown>
Back to top