Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
kristiandupont
· 2y ago · 0 comments
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.
Comments
[–]
jwalton
2y ago
This is very true, but "helping you realize you are doing something unintended" works just as well with a string as with a symbol.
[–]
presentation
2y ago
Agreed, 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.