Example: Be careful when using the `Reflect` API because all the return types are `any` https://github.com/microsoft/TypeScript/blob/9c71eaf59040ae75343da8cdff01344020f5bba2/src/lib/es2015.reflect.d.ts …
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Would love a config that converts all any to undefined, including any cases where TS would infer any to instead infer unknown.
-
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.
- 7 more replies
New conversation -
-
-
Also using `unknown` is still bad because TypeScript will regularly reduce refinements of `unknown` to `any`.
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I guess `unknown` type is introduced after the existence of those libraries cc
@drosenwasser -
Probably. I strongly recall complaining about this before. TypeScript seems very averse to breaking backwards compatibility though which is unfortunate.
- 4 more replies
New conversation -
-
-
`unknown` is pretty new. It's not a philosophical thing afaik.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I guess many of the standard library definitions have been carried over from the 2.x era and have never been touched since `unknown` was introduced. Maybe because there were higher priorities or the maintainers were to worried about introducing too many breakages.
-
I very much agree with the sentiment though. In an ideal world the standard library would primarily use `unknown` over `any`.
End of conversation
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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 
How about "scary unsafe cast"?