##// END OF EJS Templates
created typings for basic part of dojo and dijit further work is required to...
created typings for basic part of dojo and dijit further work is required to complete typings and separate them from this project dojo-typings replaced with @type/dojo, @type/dijit.

File last commit:

r2:8ec37bf1b4d1 default
r2:8ec37bf1b4d1 default
Show More
Deferred.d.ts
76 lines | 1.9 KiB | video/mp2t | TypeScriptLexer
cin
created typings for basic part of dojo and dijit further work is required to...
r2 import { PromiseCallback, DojoPromise, PromiseErrback, PromiseProgback } from "./promise/Promise";
declare namespace dojoDeferred {
interface Deferred<T> {
/**
* The public promise object that clients can add callbacks to.
*/
promise: DojoPromise<T>;
/**
* Checks whether the deferred has been resolved.
*/
isResolved(): boolean;
/**
* Checks whether the deferred has been rejected.
*/
isRejected(): boolean;
/**
* Checks whether the deferred has been resolved or rejected.
*/
isFulfilled(): boolean;
/**
* Checks whether the deferred has been canceled.
*/
isCanceled(): boolean;
/**
* Emit a progress update on the deferred.
*/
progress(update: any, strict?: boolean): DojoPromise<T>;
/**
* Resolve the deferred.
*/
resolve(value?: T, strict?: boolean): DojoPromise<T>;
/**
* Reject the deferred.
*/
reject(error?: any, strict?: boolean): DojoPromise<T>;
/**
* Add new callbacks to the deferred.
*/
then<U>(callback?: PromiseCallback<T, U>, errback?: PromiseErrback<U>, progback?: PromiseProgback): DojoPromise<U>;
/**
* Inform the deferred it may cancel its asynchronous operation.
*/
cancel(reason?: any, strict?: boolean): any;
/**
* Returns `[object Deferred]`.
*/
toString(): string;
}
interface DeferredConstructor {
/**
* Creates a new deferred. This API is preferred over
* `dojo/_base/Deferred`.
*/
new <T>(canceller?: (reason: any) => void): Deferred<T>;
prototype: Deferred<any>;
}
}
type dojoDeferred<T> = dojoDeferred.Deferred<T>;
declare const dojoDeferred: dojoDeferred.DeferredConstructor;
export = dojoDeferred;