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] Escape keywords in typescript object names #7137

Merged
merged 1 commit into from
Mar 5, 2022

Conversation

jkuszmaul
Copy link
Contributor

@jkuszmaul jkuszmaul commented Mar 1, 2022

This fixes #6994

  • Add Object to the list of reserved keywords.
  • Properly escape keywords in type names.
  • Properly escape keywords in enum names.
  • Properly escape keywords in enum field names.

To just review the actual changes, just look at the first commit in the chain; the second commit is running generate_code.py to update all the generated code.

@jkuszmaul
Copy link
Contributor Author

Well I seem to have finally landed on a combination of keywords in monster_test.fbs that don't trigger bugs an any of the other languages' codegen while still exercising the typescript logic.....

@CasperN CasperN mentioned this pull request Mar 2, 2022
19 tasks
src/idl_gen_ts.cpp Outdated Show resolved Hide resolved
tests/monster_test.fbs Outdated Show resolved Hide resolved
@dbaileychess
Copy link
Collaborator

Merge conflict now.

* Add Object to the list of reserved keywords.
* Properly escape keywords in type names.
* Properly escape keywords in enum names.
* Properly escape keywords in enum field names.
@dbaileychess dbaileychess merged commit 8db2fef into google:master Mar 5, 2022
@dbaileychess
Copy link
Collaborator

Thanks!

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 json typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reflection library doesn't work in TypeScript [Ubuntu 18.04] [Flatbuffers 1.12]
2 participants