4 ms·
As will Typescript, at least using Biome to lint it does.
by qmmmur 1y ago
As will Typescript, at least using Biome to lint it does.
- maleldil 1y agoeslint has this too: https://eslint.org/docs/latest/rules/prefer-const https://eslint.org/docs/latest/rules/prefer-const
- nielsbot 1y agoMy very minor complaint about TypeScript is you use to use `const` which is 2 additional letters. Seriously though, I do find it slightly difficult to reason about `const` vars in TypeScript because while a `const` variable cannot be reassigned, the value it references can still be mutated. I think TypeScript would benefit from more non-mutable values types... (I know there are some) Swift has the same problem, in theory, but it's very easy to use a non-mutable value types in Swift (`struct`) so it's mitigated a bit.