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

Context

import { Context } from "https://raw.githubusercontent.com/jeremyBanks/database/0.1.0-dev/_common/context.ts";
class Context {
private constructor(label: string, signals?: Array<Promise<ContextDoneReason>>);
private doneReason: Promise<ContextDoneReason>;
private doneReasonSync: ContextDoneReason | undefined;
 
async cancelling<T>(p: Promise<T> | (() => Promise<T>)): Promise<T>;
async done(): Promise<ContextDoneReason>;
async error(): Promise<never>;
throwIfDone(): void;
toString();
withCancel(): [Context, () => void];
withDeadline(deadlineMs: number): Context;
withTimeout(timeoutMs: number): Context;
 
static readonly Background;
static readonly TODO;
 
static root(label: string): Context;
}

§Constructors

§
new Context(label: string, signals?: Array<Promise<ContextDoneReason>>) private
[src]

§Properties

§
doneReason: Promise<ContextDoneReason>
[src]
§
doneReasonSync: ContextDoneReason | undefined
[src]

§Methods

§
cancelling<T>(p: Promise<T> | (() => Promise<T>)): Promise<T>
[src]

Wraps a promise so that it will be rejected if it's still pending when this context is done.

§
done(): Promise<ContextDoneReason>
[src]
§
error(): Promise<never>
[src]
§
throwIfDone(): void
[src]
§
toString()
[src]
§
withCancel(): [Context, () => void]
[src]
§
withDeadline(deadlineMs: number): Context
[src]
§
withTimeout(timeoutMs: number): Context
[src]

§Static Properties

§
Background
[src]

§Static Methods

§
root(label: string): Context
[src]