I'm shocked at how often I run into problems due to TypeScript's generous usage of `any` in the standard library definitions. `unknown` is much more appropriate. The promotion of escaping type safety in such a fundamental place is worrying.
-
Show this thread
-
Replying to @sebmck
Would love a config that converts all any to undefined, including any cases where TS would infer any to instead infer unknown.
3 replies 0 retweets 9 likes -
Replying to @leeb
Yesss. I have almost removed all usages of ts-ignore and any/Function/Object in my project. Discovering that the stdlib leaks unsoundness was a bummer.
3 replies 1 retweet 6 likes -
Replying to @sebmck
Is it possible to overwrite the stdlib? Seems like they should have stricter versions for “strict config” that would be straight forward to maintain
1 reply 0 retweets 2 likes
Replying to @leeb
Yeah it's possible, same with Flow too. Maintaining a separate set of types seems painful, although a simple `any -> unknown` would be easy.
2:14 PM - 24 Oct 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 