import { PromiseCallback, DojoPromise, PromiseErrback, PromiseProgback } from "./promise/Promise"; declare namespace dojoDeferred { interface Deferred { /** * The public promise object that clients can add callbacks to. */ promise: DojoPromise; /** * 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; /** * Resolve the deferred. */ resolve(value?: T, strict?: boolean): DojoPromise; /** * Reject the deferred. */ reject(error?: any, strict?: boolean): DojoPromise; /** * Add new callbacks to the deferred. */ then(callback?: PromiseCallback, errback?: PromiseErrback, progback?: PromiseProgback): DojoPromise; /** * 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 (canceller?: (reason: any) => void): Deferred; prototype: Deferred; } } type dojoDeferred = dojoDeferred.Deferred; declare const dojoDeferred: dojoDeferred.DeferredConstructor; export = dojoDeferred;