Skip to content
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

bug: complex nested (and flattened) enum type produces invalid syntax #343

Closed
michaelhthomas opened this issue Jul 25, 2024 · 1 comment · Fixed by #344
Closed

bug: complex nested (and flattened) enum type produces invalid syntax #343

michaelhthomas opened this issue Jul 25, 2024 · 1 comment · Fixed by #344
Labels
bug Something isn't working

Comments

@michaelhthomas
Copy link

Describe the bug
Generating types for the InputField type in the reproduction below produces typescript with invalid syntax (a superfluous curly brace). My guess is that this has to do with the nested flattening of enums.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the reproduction repository: https://github.com/michaelhthomas/tsrs_repr
  2. Run cargo test
  3. Open the file bindings/InputField.ts
  4. See syntax error due to extra } at end of file

Expected behavior
There are no syntax errors in the generated typescript code.

Screenshots
Image displaying syntax error in IDE

Version
9.0.1

Additional context
Add any other context about the problem here.

@gustavo-shigueo
Copy link
Collaborator

Hi @michaelhthomas, thanks for the report and especially for providing a reproduction!

I've opend a PR to fix this issue, check out #344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants