Ask HN: TypeScript, native compiler/VM implementation?

1 points by c-smile ↗ HN
Is there any native implementation of TypeScript, compiler/VM? I mean not a JS transpiler but something independent?

Any work on that in progress?

1 comment

[ 2.8 ms ] story [ 11.0 ms ] thread
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.