import { type Readable } from 'svelte/store'; export type CurrentReadable = Readable & { current: T; }; /** * ### `runeToCurrentReadable` * * Bridges a Svelte 5 `$state` or `$derived` rune into the `CurrentReadable` * interface, allowing rune-backed reactive values to be consumed as read-only * stores by legacy or store-aware code. * * Pass the getter of a `$state` or `$derived` variable: * * ```ts * let count = $state(0) * const doubled = $derived(count * 2) * * const store = runeToCurrentReadable(() => doubled) * * store.subscribe((v) => console.log(v)) // reacts to rune changes * console.log(store.current) // synchronous read, no overhead * ``` * * Use this over `runeToCurrentWritable` when the value is derived or when * external writes should not be allowed — for example, renderer settings * that are owned by `` props. * * The `.current` property reads the rune directly and is always in sync. * `.subscribe` is powered by `toStore`, which tracks the getter reactively * via `$effect`. */ export declare const runeToCurrentReadable: (get: () => T) => CurrentReadable;