import { WorkerWorld } from "./workerWorld.js"; export class InProcessWorker { constructor (workerId) { this.workerId = workerId; this.world = new WorkerWorld(workerId); } call (message) { const result = this.world.handle(structuredClone(message)); return result === undefined ? undefined : structuredClone(result); } async terminate () { } }