exome
Version:
State manager for deeply nested states
15 lines (14 loc) • 507 B
TypeScript
import type { Exome } from "./constructor.ts";
export declare const subscriptions: Record<string, Set<() => any>>;
/**
* Subscribe to store instance update events.
*/
export declare const subscribe: <T extends Exome>(store: T | null | undefined, fn: (store: T) => void) => (() => void);
/**
* Sends update event to specific store instance.
*/
export declare const update: (store: Exome) => void;
/**
* Sends update event to all existing store instances.
*/
export declare const updateAll: () => void;