import { type Readable, type StoresValues, type Writable } from 'svelte/store'; type ReadableValue = T extends Readable ? V : never; export type WithGet> = T & { get: () => ReadableValue; destroy?: () => void; }; /** * Transforms an existing store into a store with a `get` method. * Uses subscriptions to keep the value up to date, so make sure to call `destroy` when you're done with it. * @date 20/01/2024 - 16:38:39 * * @export * @template {Readable} T * @param {T} store * @returns {WithGet} */ export declare function withGet>(store: T): WithGet; export declare namespace withGet { var writable: (initial: T) => WithGet>; var derived: > | WithGet>[] | [WithGet>, ...WithGet>[]], T>(stores: S, fn: (values: StoresValues) => T) => WithGet>; } export declare function addGetToStores>>(stores: T): { [K in keyof T]: WithGet; }; export {};