function isPromise
Usage in Deno
import { isPromise } from "node:util/types";
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
object is Promise<unknown>