Closed 6utt3rfly closed 3 years ago
What about the curly brace syntax though? a => { return 5; }
?
Is it out of scope?
What about the curly brace syntax though?
a => { return 5; }
? Is it out of scope?
That could feasibly be another plugin so curly braces could be used to return a sequence of nodes (within an arrow function or not). If both the object and arrow plugins are enabled, then it's possible to use curly braces for an object return value, like [a].map(v => ({ v }))
.
() => x x => x (a, b) => x
Treats '=>' as a binary operator, but replaces the binary expression with the correct node type afterward