News for hackers. Stuff that matters.
Re:Complete Rewrite of ESLint by pitaj on Monday November 28, 2022 @10:15AM (#33774605)
Realistically, that simply doesn't apply to TS, because the conversion to JS literally just removes types.
Re:Complete Rewrite of ESLint by nine_k on Monday November 28, 2022 @10:24AM (#33774714)
Not always, because certain operations that look trivial in TS involve more code in JS, e.g. the widespread `?.` operator. The code is usually trivial though.

It's Flow that just allows to remove any type annotations; there's no compiler, only typechecker.

Re:Complete Rewrite of ESLint by mcluck on Monday November 28, 2022 @10:32AM (#33774821)
You're mistaken. Optional chaining is a JavaScript feature[1]. The stated goal of TypeScript is to be valid JavaScript when the types are stripped away. That's why they have functionally removed namespaces and they want to remove enums. They're the only language features that are actually compiled instead of just stripped.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Complete Rewrite of ESLint by nine_k on Monday November 28, 2022 @10:39AM (#33774905)
Indeed I'm mistaken; this only happens when the target JS version is old enough not to support that.