-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse error with type annotation in fat-arrow #37
Comments
For what it's worth, this works:
|
👍 |
+1 |
I actually just refactored the parser this weekend to make it really easy to add features to arrow functions, like type annotations, type parameters, async, generators, etc. It slows down the parsing at the moment by like 14%, which isn't great, but parsing isn't the majority of our time at the moment so I'm not sure if we mind too much. |
This just landed in master (yay!) and will hopefully be fixed in the next release. |
Also it shouldn't cause a perf regression, thanks to some great advice from @bhosmer :) |
0.12 is out, should be fixed! |
The parser does not parse type annotation on argument in fat-arrow:
It also does not parse return value type annotation:
The text was updated successfully, but these errors were encountered: