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

Usage in Deno

```typescript import { isPromise } from "node:node__util--types.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>