/** * Handy class for managing asynchronous dependencies of classes. * * Will call the producer function once and only once when getValue is called, * returning the resultant value for every subsequent call. */ export declare class Lazy { private producerFn; constructor(producerFn: () => T); private value; /** * Lazily get the value returned by the producer. * @returns The value returned from the producer function */ getValue(): T; } /** * Handy class for managing asynchronous dependencies of classes. * * Will call asynchronous producer only after `getValue` is called. If the * deferred code errors, we can try it again by re-calling `getValue` after * the promise rejects. */ export declare class AsyncRetryableLazy { private producerFn; constructor(producerFn: () => Promise); private promise?; /** * Lazily get the value returned by the async producer. * * @returns The value returned from the producer function */ getValue(): Promise; }