import { FuturableOrLazy } from './futurable'; export interface MemoizeOptions { /** * If true, will immediately process the input, even if it's a lazy promise ( * a function to retrieve a promise). */ preprocess?: boolean; } /** * This class is responsible for wrapping tasks in a promise that won't be * executed until the result is actually required. Calling .get() on the class * will start the task, and resolve with the result. If the task has already * been executed once, it will resolve immediatly with the last result. */ export declare class MemoizedPromise { private _futurableOrLazy; private _result?; private _done; constructor(futurableOrLazy: MemoizedPromise | FuturableOrLazy, options?: MemoizeOptions); /** Is true if the value is memoized. */ get done(): boolean; /** Resolves with a promise for the value. */ get: () => Promise; }