/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * A deferred creates a promise and the ability to resolve or reject it * * @deprecated Moved to the `@fluidframework/core-utils` package. * @internal */ export declare class Deferred { private readonly p; private res; private rej; private completed; constructor(); /** * Returns whether the underlying promise has been completed */ get isCompleted(): boolean; /** * Retrieves the underlying promise for the deferred * * @returns the underlying promise */ get promise(): Promise; /** * Resolves the promise * * @param value - the value to resolve the promise with */ resolve(value: T | PromiseLike): void; /** * Rejects the promise * * @param value - the value to reject the promise with */ reject(error: any): void; } /** * A lazy evaluated promise. The execute function is delayed until * the promise is used, e.g. await, then, catch ... * The execute function is only called once. * All calls are then proxied to the promise returned by the execute method. * * @deprecated Moved to the `@fluidframework/core-utils` package. * @internal */ export declare class LazyPromise implements Promise { private readonly execute; get [Symbol.toStringTag](): string; private result; constructor(execute: () => Promise); then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined): Promise; catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; finally(onfinally?: (() => void) | null | undefined): Promise; private getPromise; } //# sourceMappingURL=promises.d.ts.map