[TS] Escape keywords in typescript object names (#7137)

* 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.
This commit is contained in:
James Kuszmaul
2022-03-05 09:39:59 -08:00
committed by GitHub
parent 9ed1323044
commit 8db2fef3f7
4 changed files with 47 additions and 22 deletions

View File

@@ -25,6 +25,7 @@ if [ -x ../flatc ]; then
../flatc --gen-object-api -b -I include_test monster_test.fbs unicode_test.json
../flatc --ts --gen-name-strings --gen-mutable --gen-object-api -o union_vector union_vector/union_vector.fbs
../flatc --ts --gen-name-strings optional_scalars.fbs
../flatc --ts --gen-name-strings --gen-object-api --gen-mutable typescript_keywords.fbs
fi
tsc
node -r esm JavaScriptTest