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

[TS] Fix reserved words as arguments (#6955) #6956

Merged
merged 14 commits into from
Dec 6, 2021
Merged

Conversation

tira-misu
Copy link
Contributor

Use same mechanism as in c# implementation for convenient code maintenance.
Fix is compatible for users of the generated .ts code.

@github-actions github-actions bot added c++ codegen Involving generating code from schema javascript typescript labels Nov 25, 2021
@aardappel
Copy link
Collaborator

Thanks! As mentioned in #6955, can you extend the use of this function to other generated names? @krojew @bjornharrtell

@tira-misu
Copy link
Contributor Author

I think other generated names does not make any trouble. I have tested several hundreds of our flatbuffers schemas and reserved words are only not allowed as arguments in TS. Astonishingly these words can be used even as method names. So flatbuffers names like struct/table, enum values, ... did not lead to non working TS code.

@aardappel
Copy link
Collaborator

Ok, sounds like this will be sufficient for now then, thanks!

@aardappel aardappel merged commit 18538c4 into google:master Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema javascript typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants