Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deferred

import type { Deferred } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.28.2/nats-base-client/internal_mod.ts";
interface Deferred <T> extends Promise<T> {
reject: (reason?: any) => void;
resolve: (value?: T | PromiseLike<T>) => void;
}

§Type Parameters

§Extends

§
Promise<T>
[src]

§Properties

§
reject: (reason?: any) => void
[src]

Rejects the Deferred

§
resolve: (value?: T | PromiseLike<T>) => void
[src]

Resolves the Deferred to a value T