import type { IntentHandler, Scope } from "intentx-core-z"; import { EqualityFn } from "./selector"; export type Subscriber = () => void; export type Store = { scope: Scope; state(): S; setState(fn: (s: S) => void): void; subscribe(fn: Subscriber): () => void; emit(type: string, payload?: any): Promise; on(type: string, handler: IntentHandler): () => void; watch(selector: (state: S) => R, onChange: (value: R) => void, isEqual?: EqualityFn): () => void; };