UNPKG

@renewx/core

Version:

Lightweight state management library with validation support

12 lines (11 loc) 483 B
import type { StoreID } from "../types/id"; import type { AnyStore } from "../types/any-store"; import type { Unsubscribe } from "../types/core"; type StoreApiWatcher = (storeID: StoreID) => void; export declare const saveStore: <SomeStore extends AnyStore>(store: SomeStore) => SomeStore; export declare const StoreAPI: { storeById: (storeID: StoreID) => AnyStore | undefined; storeList: () => AnyStore[]; watch: (watcher: StoreApiWatcher) => Unsubscribe; }; export {};