import type { Scope } from "intentx-state-z"; import { IntentBus } from "./intentBus"; import type { EffectDef } from "./effect"; import type { ComputedDef, InferComputed } from "./types"; type Snapshot> = Readonly>; type ActionContext> = { emit: LogicRuntime["emit"]; getState: () => Snapshot; }; export type ActionFactory> = (context: ActionContext) => (...args: any[]) => any; export declare class LogicRuntime, A extends Record>> { readonly scope: Scope; private stateAtoms; private computedAtoms; private subs; private bus; private snapshotCache; private dirty; private isComputing; private isBatching; private destroyed; private computedKeys; private computedDisposers; private intentDisposers; private errorHandlers; private leadingLocks; private throttleMap; private _actions; constructor(initial: S, scope?: Scope, sharedBus?: IntentBus); destroy: () => void; private createStateAtoms; private buildSnapshot; private markDirty; private createReactiveState; getSnapshot: () => Readonly>; subscribe: (fn: () => void) => () => void; get state(): Readonly>; get computed(): Readonly>; get actions(): A; batch: (fn: () => void) => void; onError: (handler: (error: unknown, context: { type: string; payload: any; }) => void) => () => boolean; getComputedKey: >(key: K) => InferComputed[K]; getComputed: () => Readonly>; private setStateInternal; onIntent:

(type: string, handler: (context: { payload: P; state: () => Readonly>; scope: Scope; signal: AbortSignal; setState(fn: (draft: S) => void): void; emit(type: string, payload?: T): Promise; }) => any) => () => void; once:

(type: string, handler: Parameters[1]) => void; takeLeading:

(type: string, handler: Parameters[1]) => void; throttle:

(type: string, ms: number, handler: Parameters[1]) => void; useEffect:

(type: string, eff: EffectDef) => void; emit:

(type: string, payload?: P) => Promise; attachComputed: (key: K, compute: C[K]) => void; attachAction(key: K, factory: ActionFactory): void; } export {};