import { deferred } from "https://deno.land/x/postgres@v0.17.0/deps.ts";
Creates a Promise with the reject
and resolve
functions
placed as methods on the promise object itself. It allows you to do:
import { deferred } from "https://deno.land/std@$STD_VERSION/async/deferred.ts";
const p = deferred<number>();
// ...
p.resolve(42);