import type { MaybePromise } from "../functional/maybe_promise"; declare const $store: unique symbol; /** * Store — globally visible reactive data. * * Create a store: * const ThemeStore = store.new("light"); * * Set from anywhere: * ThemeStore.set("dark"); // updates all subscribers * * Read from a view: * const myView = view(({ use }) => { * const theme = use(ThemeStore); // re-renders on change * return { * render() { * div(() => text(`Current theme: ${theme.get()}`)); * } * }; * }); */ export declare class Store { #private; readonly [$store] = true; constructor(initial: T); get(): T; set(value: T): void; update(fn: (current: T) => MaybePromise): void; subscribe(cb: () => void): () => void; } export declare function isStore(value: unknown): value is Store; export declare const store: { "new"(initial: T): Store; }; export {};