Better errors when using properties/methods from newer versions of ECMAScript #40320
Labels
Domain: Error Messages
The issue relates to error messaging
Experience Enhancement
Noncontroversial enhancements
Good First Issue
Well scoped, documented and has the green light
Help Wanted
You can do this
PursuitFellowship
Help wanted from Pursuit fellowship; others please avoid until Dec 19
Suggestion
An idea for TypeScript
Milestone
This is kind of the progression of #25309, and this issue's fix should be inspired by #27034.
Lots of users seem to be confused by misconfiguration when using popular new methods added to built-in types. A recent example is #40319.
The idea here come up with a static list of methods added to
Array
String
RegExp
ObjectConstructor
Promise
Map
Set
Iterator
AsyncIterator
in newer versions of ECMAScript. These can be found in
src/lib
.When a user tries to access a property on any of these types, and that type appears in the list, we can provide a suggestion to set their
lib
ortarget
(which we've done in other error messages). For example:The text was updated successfully, but these errors were encountered: