HACKER Q&A
📣 c-smile

TypeScript, native compiler/VM implementation?


Is there any native implementation of TypeScript, compiler/VM? I mean not a JS transpiler but something independent?

Any work on that in progress?


  👤 matharmin Accepted Answer ✓
Deno supports TypeScript out of the box, but still effectively uses the transpiler under the hood.

TypeScript is designed for the JavaScript runtime, with the only difference being additional compile-time type checks. The runtime behaviour is basically defined as the JS runtime behaviour, so any alternative engine will have to be a full JavaScript engine.

That said, there are some projects that take a subset of TypeScript and run using different implementations. One example is https://github.com/AssemblyScript/assemblyscript However, being a subset, the available functionality will be a lot more limited.