import { Getter } from "./Getter"; export declare function isPromiseLike(result: PromiseLike | T): result is PromiseLike; /** * PromisedComputedValue */ export interface PromisedComputedValue extends Getter { /** True if the promise is currently resolving */ readonly busy: boolean; refresh(): void; getNonReactive(): T; } /** * Similar to the standard computed, except that it converts promises into * plain values, unwrapping them when they resolve and updating to the new * value. The supplied function may return a plain value in which case the * update is entirely synchronous like standard computed. * * As with the standard computed, exceptions (and rejected promises) are * propagated as re-thrown exceptions. To avoid this, perform your own * error handling in your supplied function. * * @param init Value to assume until the promise first resolves * @param compute Evaluates to a promised or plain value */ export declare function promisedComputed(init: T, compute: () => PromiseLike | T): PromisedComputedValue; export declare function promisedComputedInternal(init: T, compute: () => PromiseLike | T): PromisedComputedValue;