3 ms·
Sure, the TS type system is not sound but the idea is not to stop "bad guys", it's to help you realize you are doing something unintended.
by kristiandupont 3y ago
Sure, the TS type system is not sound but the idea is not to stop "bad guys", it's to help you realize you are doing something unintended.
- presentation 3y agoAgreed, for instance in our codebase we just make all type assertions a lint error demanding a justification, as well as flat out banning the any type. But anyone is free to write shoddy TypeScript.
- jwalton 3y agoThis is very true, but "helping you realize you are doing something unintended" works just as well with a string as with a symbol.