You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As current syntax of this proposal, such code will have different semantic in/not in the class body, which is very confusing, error-prone, and harm to code review.
Another example of error:
constx={key: ()=>{...}}
Someone may refactor the code from arrow function to plain function for some reason (for example, need name for recursion), and just forgot the function keyword:
constx={key: f(){...}}
Currently it will cause syntax error, with this proposal, oops...
The text was updated successfully, but these errors were encountered:
and unless f is defined, you are still getting a ReferenceError. And if f is defined, x.key might not be a function, leading to another error. You'll have to be really lucky if f returns a function.
As current syntax of this proposal, such code will have different semantic in/not in the class body, which is very confusing, error-prone, and harm to code review.
Another example of error:
Someone may refactor the code from arrow function to plain function for some reason (for example, need name for recursion), and just forgot the
function
keyword:Currently it will cause syntax error, with this proposal, oops...
The text was updated successfully, but these errors were encountered: