4 ms·
TypeScript will never generate WebAssembly for you. WA is used for hosting your own sandboxed native code environments, it doesn't offer any of the tooling you'
by kevingadd 10y ago
TypeScript will never generate WebAssembly for you. WA is used for hosting your own sandboxed native code environments, it doesn't offer any of the tooling you'd need to run TypeScript-based libraries/applications.
- ZenoArrow 10y agoI don't understand this line of reasoning. WebAssembly isn't 'sandboxed native code', it's a compressed AST, and even if it was native code there's nothing stopping someone creating a native compiler for TypeScript. That said, Typescript is most likely to support WebAssembly when WebAssembly offers a GC implementation for it to use (the WebAssembly GC is planned in the medium to long term IIRC).
- einrealist 10y agoWhy not? Someone might write a compiler. And I expect that if WebAssembly becomes the primary source for browser runtimes, browser vendors will probably try to compile Javascript to WebAssembly first. It does not make sense to have two engines or two interpreters for a single WebAssembly engine.