/** * Ball TypeScript Engine — interprets Ball programs directly from JSON. * * This is a compatibility wrapper around the compiled (self-hosted) * Ball engine. The compiled engine is generated by compiling * `dart/self_host/engine.ball.json` through `@ball-lang/compiler`. * * Usage: * import { BallEngine } from '@ball-lang/engine'; * const engine = new BallEngine(programJson); * await engine.run(); * console.log(engine.getOutput()); */ export interface BallEngineOptions { stdout?: (msg: string) => void; stderr?: (msg: string) => void; /** Maximum execution time in milliseconds (null = unbounded). */ timeoutMs?: number | null; /** Maximum memory usage in bytes (null = unbounded). */ maxMemoryBytes?: number | null; /** Maximum number of modules allowed in the program (default: 1000000). */ maxModules?: number; /** Maximum expression nesting depth (default: 1000000). */ maxExpressionDepth?: number; /** Maximum program JSON size in bytes (null = skip check). */ maxProgramSizeBytes?: number | null; /** Whether to run in sandbox mode (blocks file I/O, env access, etc.). */ sandbox?: boolean; /** Maximum recursion depth (default: 100000). */ maxRecursionDepth?: number; } export declare class BallEngine { private _compiledEngine; private _output; constructor(program: any, options?: BallEngineOptions); /** * Run the program. Returns a promise that resolves to the captured * output lines (same content as `getOutput()`). * * NOTE: The compiled engine is async internally. If you were relying * on synchronous `run()`, wrap your call in `await`. */ run(): Promise; /** Retrieve lines printed via `std.print` (when no custom stdout was given). */ getOutput(): string[]; } export { StdModuleHandler } from './compiled_engine.ts'; //# sourceMappingURL=index.d.ts.map