Earlier quoted context omitted.
node.js Workers + SharedArrayBuffers? I'm not sure how well supported they are / haven't used them, but I think they enable this?
Yes that allows for shared memory. But the TypeScript compiler is written in TypeScript, and you can't put JavaScript objects (such as the TypeScript AST) in a SharedArrayBuffer. So you'd have to port the TypeScript compiler to another language that can target multithreaded WASM to do this. You could also try sending JS objects between workers instead of using SharedArrayBuffer. But that copies the memory, which can…
[1] https://github.com/parcel-bundler/parcel/tree/v2/packages/co...