import { InterpreterFrom, StateFrom } from "xstate"; import chokidar from "chokidar"; import { Handler } from "../runtime/handler/index.js"; import { EventDelegate } from "../events.js"; import { Issue } from "../runtime/handler/definition.js"; declare type Context = { funcs: Record>; chokidar?: chokidar.FSWatcher; }; declare type Opts = { root: string; checks: Record; }; export declare function useFunctionBuilder(opts: Opts): { ctx: Context; reload: () => Record>; send: (id: string, event: FuncEvents) => import("xstate").State; broadcast: (event: FuncEvents) => void; onTransition: EventDelegate<{ state: StateFrom; actor: InterpreterFrom; }>; onChange: EventDelegate<{ ctx: StateFrom["context"]; actor: InterpreterFrom; }>; }; declare type FileChangeEvent = { type: "FILE_CHANGE"; file: string; }; declare type InvokeEvent = { type: "INVOKE"; }; declare type FuncEvents = FileChangeEvent | InvokeEvent; declare type FuncContext = { info: Handler.Opts; instructions: Handler.Instructions; checks: Opts["checks"]; issues: Record; buildStart?: number; warm: boolean; dirty: boolean; }; declare const funcMachine: import("xstate").StateMachine>; export {};