3 ms·
Considering anything that transpiled to ES5 would have to use var anyway, I'm curious why this was done in the source itself and not as a plugin/build step.
by adzm 1y ago
Considering anything that transpiled to ES5 would have to use var anyway, I'm curious why this was done in the source itself and not as a plugin/build step.
- inbx0 1y agoThe post links to a TS issue [1] that explains > As of TypeScript 5.0, the project's output target was switched from es5 to es2018 as part of a transition to ECMAScript modules. This meant that TypeScript could rely on the emit for native (and often more-succinct) syntax supported between ES2015 and ES2018. One might expect that this would unconditionally make things faster, but surprise we encountered was a slowdown from using let and const natively! So they don't transpile to ES5, and that is the issue. 1: https://github.com/microsoft/TypeScript/issues/52924 https://github.com/microsoft/TypeScript/issues/52924