Skip to content
Ron Buckton edited this page Jan 15, 2015 · 1 revision

Creates and controls the lifetime of a Promise.

Syntax

export declare class Deferred<T> {
    public promise: Promise<T>;
    public resolve(value?: IPromise<T> | T): void;
    public reject(reason: any): void;
}

Type Parameters

T
The type of the result produced by this Deferred.

Constructors

new Deferred()
Creates a new instance of the Deferred class.

Properties

promise
Gets the promise associated with this Deferred instance.

Methods

resolve(any?)
Resolves the promise with the provided value.
reject(any)
Rejects the promise with the provided value.

Requirements

  • Supported Platforms: TBD
  • Module: deferred
  • Library: deferred.ts

See Also

Clone this wiki locally