Skip to main content
types.isPromise - node__util.d.ts - Node documentation
function types.isPromise

Usage in Deno

```typescript import { types } from "node:node__util.d.ts"; ```
isPromise(object: unknown): object is Promise<unknown>
Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). ```js util.types.isPromise(Promise.resolve(42)); // Returns true ```

Parameters

object: unknown

Return Type

object is Promise<unknown>