Skip to main content
Module

x/postgres/deps.ts>deferred

PostgreSQL driver for Deno
Extremely Popular
Go to Latest
function deferred
Re-export
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@0.221.0/async/deferred.ts";

    const p = deferred<number>();
    // ...
    p.resolve(42);