feat: Support union underlying type for TS/JS (#7961)

This commit is contained in:
sssooonnnggg
2023-05-16 04:18:49 +08:00
committed by GitHub
parent 1d3afb90c5
commit b128b802d9
6 changed files with 58 additions and 8 deletions

View File

@@ -117,6 +117,11 @@ flatc(
)
esbuild("typescript_keywords.ts", "typescript_keywords_generated.cjs")
flatc(
options=["--ts", "--reflect-names", "--gen-name-strings", "--gen-mutable", "--gen-object-api", "--ts-entry-points", "--ts-flat-files"],
schema="../union_underlying_type_test.fbs"
)
print("Running TypeScript Compiler...")
check_call(["tsc"])
print("Running TypeScript Compiler in old node resolution mode for no_import_ext...")
@@ -129,6 +134,7 @@ check_call(NODE_CMD + ["JavaScriptTest"])
check_call(NODE_CMD + ["JavaScriptUnionVectorTest"])
check_call(NODE_CMD + ["JavaScriptFlexBuffersTest"])
check_call(NODE_CMD + ["JavaScriptComplexArraysTest"])
check_call(NODE_CMD + ["JavaScriptUnionUnderlyingTypeTest"])
print("Running old v1 TypeScript Tests...")
check_call(NODE_CMD + ["JavaScriptTestv1.cjs", "./monster_test_generated.cjs"])