import type { CncDialect, CncEvent, CncParseOptions } from "./index"; export type WasmSimulator = { parse(program: string, dialect?: CncDialect, options?: CncParseOptions): CncEvent[]; parseFile(path: string, dialect?: CncDialect, options?: CncParseOptions): Promise; parseWithParameterFile( program: string, parameterPath: string, dialect?: CncDialect, options?: CncParseOptions, ): Promise; parseFileWithParameterFile( path: string, parameterPath: string, dialect?: CncDialect, options?: CncParseOptions, ): Promise; dispose(): void; fs: { opfs: WasmOpfsWorkspace | null; module: unknown; }; }; export type WasmOpfsWorkspace = { mountPoint: string; workspacePath: string; resolvePath(path: string): string; readFile(path: string): Promise; readDirectory(path: string): Promise; persistFile(path: string): Promise; persistDirectory(path: string): Promise; writeFile(path: string, data: Uint8Array | string): Promise; copyFile(fromPath: string, toPath: string): Promise; moveFile(fromPath: string, toPath: string): Promise; exists(path: string): Promise; stat(path: string): Promise; loadParameterFile(path: string): Promise; persistParameterFile(path: string): Promise; removeFile(path: string): Promise; removeDirectory(path: string): Promise; clear(): Promise; }; export type WasmOpfsEntryStat = | { kind: "file"; size: number; } | { kind: "directory"; size: null; }; export type WasmModuleOptions = { locateFile?: (file: string) => string; print?: (text: string) => void; printErr?: (text: string) => void; opfs?: false | { required?: boolean; mountPoint?: string; workspacePath?: string; }; }; export function createWasmSimulator(moduleOptions?: WasmModuleOptions): Promise;