import { type Writable } from 'svelte/store'; export type AsyncWritable = Writable & { promise: Promise; error: Writable; } & Promise; /** * ### `asyncWritable` * * Creates a writable store that is initialized with a promise. The store also * implements the `then` and `catch` methods of the promise so that it can be * used in `await` expressions and `{#await}` blocks of Svelte. * * ```svelte * * *

* {#await store then data} * // Do something with the data * {/await} *

* ``` * * If an error occurs in the promise, the error will be logged to the console * and the error can be accessed via the `error` property of the store with in * turn is a store. * * ```svelte * * ``` */ export declare const asyncWritable: (promise: Promise) => AsyncWritable;