Skip to main content
Module

x/acorn/utils.ts>createPromiseWithResolvers

A focused RESTful server framework for Deno 🌰🦕
Latest
function createPromiseWithResolvers
import { createPromiseWithResolvers } from "https://deno.land/x/acorn@1.1.0/utils.ts";

Creates a promise with resolve and reject functions that can be called.

Offloads to the native Promise.withResolvers when available.

Returns

{ promise: Promise<T>; resolve: (value: T | PromiseLike<T>) => void; reject: (reason?: any) => void; }