import type { Store } from "./core/store"; import type { StateActionMap, FastContextProps, MergeMode } from "./core/types"; type BoundActions> = { [K in keyof A]: (...args: Parameters extends [any, ...infer P] ? P : never) => void; }; type ResolveActions = A extends StateActionMap ? BoundActions : undefined; type DerivedSelector = (selector: (s: S) => R, equality?: (a: R, b: R) => boolean) => { use(): R; value(): R; subscribe(callback: (value: R) => void): () => void; }; export type FastContext = { state(): S; get(): S; set: Store["set"]; replace: Store["replace"]; batch: Store["batch"]; transaction: Store["transaction"]; subscribe: Store["subscribe"]; update(fn: (state: S) => void): void; commit(fn: (state: S) => void): void; use: (selector?: (state: S) => T, equality?: (a: T, b: T) => boolean) => T; useState(): S; computed: DerivedSelector; select: DerivedSelector; peek(selector?: (state: S) => T): T; when: (predicate: (state: S) => R, effect: (value: R, state: S) => void) => () => void; watch(selector: (state: S) => R, effect: (value: R, prev: R | undefined) => void, equality?: (a: R, b: R) => boolean): () => void; scope(state: S, options?: { merge?: MergeMode; }): FastContext; devtools: (callback: (info: { state: S; }) => void) => () => void; actions: ResolveActions; }; export declare function createFastContext>(props: FastContextProps): FastContext; export {};