3 ms·
TypeScript generates readable JS that is as close to the TypeScript source as possible. It doesn't do optimizations that I know of.
by smt88 10y ago
TypeScript generates readable JS that is as close to the TypeScript source as possible. It doesn't do optimizations that I know of.
- k__ 10y agoI know that. But I heard that the static typing (implicitly) leads devs to write more monomorphic functions, which seem to be much easier to optimize by the JavaScript-VMs. But yes, you can write such code in JavaScript yourself. The thing is that writing polymorphic stuff is a bit more effort in TypeScript, if you don't want to throw 'any' around everywhere.