Skip to content
Ron Buckton edited this page Jan 15, 2015 · 2 revisions

The main entrypoint for the Asynchronous Coordination library.

Syntax

declare module "async" {
  export interface IPromise<T>;
  export class Promise<T>;
  export interface CancellationToken;
  export interface CancellationRegistration;
  export class CancellationTokenSource;
  export class Deferred<T>;
  export function sleep(delay?: number, token?: CancellationToken): Promise<void>;
}

Exports

interface IPromise<T>
Describes a compatible promise implementation. (imported from promise)
class Promise<T>
Represents the completion of an asynchronous operation. (imported from promise)
class CancellationTokenSource
A source for cancellation. (imported from cancellation)
interface CancellationToken
A token used to receive a cancellation signal. (imported from cancellation)
interface CancellationRegistration
An object used to unregister a callback delegate registered to a CancellationToken. (imported from cancellation)
class Deferred<T>
Creates and controls the lifetime of a Promise. (imported from deferred)
function sleep(Number?,CancellationToken?)
Creates a Promise that is resolved after the provided delay. (imported from utils)

Imports

Imported By

  • None

Requirements

  • Supported Platforms: Browser, nodejs
  • Module: async
  • Library: async.ts
Clone this wiki locally