import type { Readable, Unsubscriber, Writable, Subscriber, Stores, StoresValues } from "./svelte.js"; export type GetterOptions = { threshold?: number; read?: () => T; }; export declare const getter: (store: Readable, { threshold, read }?: GetterOptions) => () => T; export type WritableWithGetter = Writable & { get: () => T; }; export type ReadableWithGetter = Readable & { get: () => T; }; export declare const withGetter: >(store: S) => S & { get: () => StoresValues; }; export declare const memoized: (store: Readable) => { subscribe: (f: Subscriber) => Unsubscriber; }; export declare const throttled: >(delay: number, store: S) => S; export declare const deriveDeduplicated: (stores: S, get: (storeValues: StoresValues) => T) => Readable; export declare const deriveDeduplicatedByValue: (stores: S, get: (storeValues: StoresValues) => T) => Readable; export declare const merged: (stores: S) => Readable>; /** * Utility type which allows for using the same value both for hot gets and derived * subscriptions. It is a store itself, so `derived(someProjection, ...)` works as well * as `derived(someProjection.$, ...)`. */ export type Projection = ReadableWithGetter & { $: Readable; }; /** * Build a `Projection` from a readable store and an optional `read` function, which falls * back to `get($)`. On hot paths, the store value is cached, and read is skipped. */ export declare const projection: ($: Readable, read?: () => T) => Projection; /** * Build a `Projection` derived from another `Projection`: re-read `src` * reactively via `.$` or synchronously via `.get()`. */ export declare const projectFrom: (src: Projection, read: ($: S) => U) => Projection; //# sourceMappingURL=misc.d.ts.map