/** * DEPRECATED * * The type returned by the `computedAsync` function. Represents the current `value`. Accessing * the value inside a reaction will automatically listen to it, just like an `observable` or * `computed`. The `busy` property is `true` when the asynchronous function is currently running. */ export interface ComputedAsyncValue { /** The current value (observable) */ readonly value: T; /** True if an async evaluation is in progress */ readonly busy: boolean; /** True if Promise was rejected */ readonly failed: boolean; /** The error from the rejected promise, or undefined */ readonly error: any; } export interface ComputedAsyncOptions { readonly init: T; readonly fetch: () => PromiseLike | T; readonly delay?: number; readonly revert?: boolean; readonly name?: string; readonly error?: (error: any) => T; readonly rethrow?: boolean; } /** * DEPRECATED - prefer `asyncComputed`, see https://github.com/danielearwicker/computed-async-mobx */ export declare function computedAsync(init: T, fetch: () => PromiseLike | T, delay?: number): ComputedAsyncValue; /** * DEPRECATED - prefer `asyncComputed`, see https://github.com/danielearwicker/computed-async-mobx */ export declare function computedAsync(options: ComputedAsyncOptions): ComputedAsyncValue;