##// END OF EJS Templates
corrected i18n, css modules to support requirejs optimizer...
corrected i18n, css modules to support requirejs optimizer i18n bundles now conforms js modules with default exports (breaking change!)

File last commit:

r15:8ef85ad13241 default
r53:deb0ed6fb680 v1.0.7 default
Show More
Deferred.d.ts
100 lines | 2.6 KiB | video/mp2t | TypeScriptLexer
cin
created typings for basic part of dojo and dijit further work is required to...
r2 import DojoPromise = require("../promise/Promise");
import { PromiseCallback, PromiseErrback, PromiseProgback } from "../promise/Promise";
cin
Working on dojo typings
r15 import declare = require("./declare");
cin
created typings for basic part of dojo and dijit further work is required to...
r2
/* dojo/_base/Deferred */
interface Deferred<T> {
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>;
/**
* The results of the Deferred
*/
results: [T, any];
/**
* Adds callback and error callback for this deferred instance.
*/
addCallbacks<U1, U2 = never>(callback?: PromiseCallback<T, U1>, errback?: PromiseErrback<U2>): Deferred<U1 | U2>;
/**
* Add new callbacks to the deferred.
*/
then<U1, U2 = never>(callback?: PromiseCallback<T, U1>, errback?: PromiseErrback<U2>, progback?: PromiseProgback): DojoPromise<U1 | U2>;
/**
* Cancels the asynchronous operation
*/
cancel(): void;
/**
* Adds successful callback for this deferred instance.
*/
addCallback<U>(callback: PromiseCallback<T, U>): Deferred<U>;
/**
* Adds error callback for this deferred instance.
*/
addErrback<U>(errback: PromiseErrback<U>): Deferred<U>;
/**
* Add handler as both successful callback and error callback for this deferred instance.
*/
addBoth<U>(callback?: PromiseErrback<U>): Deferred<U>;
fired: number;
}
interface DeferredConstructor {
/**
* Deprecated. This module defines the legacy dojo/_base/Deferred API.
* New code should use dojo/Deferred instead.
*/
new <T>(canceller?: (reason: any) => void): Deferred<T>;
prototype: Deferred<any>;
/**
* Transparently applies callbacks to values and/or promises.
*/
when<T>(valueOrPromise: any): Deferred<T>;
when<T, U1, U2 = never>(valueOrPromise: any, callback?: PromiseCallback<T, U1>, errback?: PromiseErrback<U2>, progback?: PromiseProgback): Deferred<U1 | U2>;
}
declare const Deferred: DeferredConstructor;
export = Deferred;