import type { Event } from './event'; export type EventHandler = ((event: E) => void) & { eventType: E['type']; }; export type StateFactory = (context: { apply: (e: S) => void; on: (type: T, fn: (event: Extract) => void) => EventHandler; }) => EventHandler[]; export declare function useState(factory: StateFactory): StateFactory; //# sourceMappingURL=use-state.d.ts.map