Typescript compiles to js. Presumably you could have a typescript layer for this - but at that point it seems like your time would be better spent translating typescript to a compiled language than going ts -> js -> interpreter
TypeScript compiles to JS in a straightforward manner as well. If you wanted to move away from TS, you could simply have the TS compiler compile to ES6 and you're done.
You don't exactly need to compile Typescript to make it run, you can just strip the types out which is much faster than compilation. If you want you can run `tsc` to have the compiler compile it and check for errors, but this can be running as you develop to act more as a linter.
As far as I know there are no plans to directly compile (JIT or otherwise) typescript. Typescript is always (again, as far as I know) transpiled into javascript whereupon it gets JIT'd in the browser just like "normal" javascript.
The gains that come from using typescript are productivity gains: in big projects static typing, generics, decorators, and interfaces are supposed to be a boost to productivity, not a boost to performance.
I don't think so, since TS by definition compiles to JS. Too many embedded systems rely on JS. And many programmers, like me, prefer non-strongly-typed systems and/or runtime typing rather than compile-time.
Typescript is not a compiled language. It is a "transpiled" language. Transpiled to another interpreted language Javascript which in turn again is not a compiled language.
TypeScript has at least 2 implementations: tsc and Deno, but I take your point and agree. That said, most languages probably have a JS runtime, so a basic implementation would be ts->js->interpreter. The ts->js is presumably pretty easy.
Typescript usually transpiles to javascript, just without the type information, and this is not done in the browser. If you target old browsers it can add maybe add some overhead like babel does.
I don't know about javascript's usual JIT compilers, but LuaJIT's JIT compiler (trace compiler) does a pretty good job of figuring out abstractions.
Typescript doesn't really transpile, kinda sorta...its output is idiomatic JS. It's syntax is basically just javascript. It's really just a natural way to annotate the types that you pass to javascript functions so that the compiler can check them. Not trying to be "that guy", just saying that it isn't like learning a whole new language. It's just adding a few things to the JS that you already know.
It's just compiling TypeScript into JS when you import it, and uses tsc to do it. It can load JS just fine as well if you want to use Babel or similar.
reply