Use generic return types for frequently-casted library functions #18415
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Suggestion
An idea for TypeScript
There are a handful of functions from lib.d.ts which are typically followed by a type assertion
With the new inference changes, we can write a new overload
so that you can write the cleaner version
TODO: Figure out which functions these apply to
The text was updated successfully, but these errors were encountered: