import Promise from '@dojo/shim/Promise';
export default class Deferred<T> {
    private _resolver;
    private _rejector;
    readonly promise: Promise<T>;
    constructor();
    /**
     * Wraps any callback to resolve the deferred so long as the callback
     * executes without throwing any Errors.
     */
    callback(callback: Function): any;
    /**
     * Wraps a callback to reject the deferred if the callback throws an Error.
     */
    rejectOnError(callback: Function): any;
    resolve(value?: T): void;
    reject(error?: Error): void;
    protected _finalize(): void;
}
