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
Anonymous generator function expression with typescript generic fails to parse #11435
Comments
Hey @devongovett! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
* Initial commit for v3 Table and useGrid * Selection * Dynamic * Refactor API * Cleanup * Marshall focus to focusable elements inside cells * Label rows by the column headers and cells in the row * Improve column group algorithm and add selection checkboxes * Get dynamic cells based on columns working * linting * fix pkg * More test * More tests for dynamic data and nested columns * Tests for keyboard focus and selection * Work around babel bug with anonymous generators and TS babel/babel#11435 * Update useGridCell.ts Co-authored-by: Danni <drobinson@livefyre.com>
Note the error only occurs when |
Good catch - later, should we just enable jsx parsing by default in the tests or run them separately?
|
Good catch on JSX, and thanks for fixing @existentialism! 😍 |
Bug Report
Current Behavior
Anonymous generator functions with typescript generics fail to parse:
SyntaxError: Unexpected token, expected "(" (1:21)
When adding a name to the function it works as expected:
TSC parses anonymous generator functions with generics as expected.
Input Code
Expected behavior/code
Should parse as an anonymous generator function with generic.
Additional info
Appears that the current behavior is correct for function declarations, but not function expressions. TSC throws a parse error when the function is parsed as a declaration, but not when parsed as an expression (as above).
Environment
The text was updated successfully, but these errors were encountered: