Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBetter errors when using properties/methods from newer versions of ECMAScript #40320
Comments
Is it ok if I take this up as my first issue? @DanielRosenwasser |
Hey @sarathps93, are you still working on this? If not, I'll try this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: