import { type HostMessage, MikroRuntime } from '@mikrojs/native'; import { Subject } from 'rxjs'; export interface DevRunnerOptions { script: string; memLimit?: number; fsRoot?: string; fsLimit?: number; fsReadMax?: number; env?: Record; /** * User-provided stub sources keyed by module name (e.g. 'native:mikro/wifi'). * These override the default stubs. TypeScript is stripped before registration. */ stubSources?: Record; /** * Enable per-module memory profiling. Profile data is collected as modules * are loaded and can be read via runtime.getProfile() after execution. */ profile?: boolean; } export interface DevRunner { /** Observable stream of host messages from the QuickJS runtime. */ messages$: Subject; /** Post a message into the QuickJS runtime (delivered on next loop tick). */ postMessage(type: string, data: string): void; /** Start the event loop. Returns a cleanup function. */ start(): () => void; /** Register a callback that runs on each tick, after loopOnce + drainMessages. */ onTick(callback: () => void): void; /** When true, skips loopOnce (timers/promises freeze) but tick callbacks still run. */ paused: boolean; /** The underlying MikroRuntime instance. */ runtime: MikroRuntime; } /** * Create a QuickJS dev runner for the simulator. * Default stubs provide mock implementations for all native modules. * User stubs (from sim/*.stub.ts) override defaults. */ export declare function createDevRunner(options: DevRunnerOptions): DevRunner; //# sourceMappingURL=devRunner.d.ts.map