mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 00:38:39 +00:00
Wrap types in namespace for --ts-flat-files and --gen-all (#7451)
* Wrap types in namespace for --ts-flat-files and --gen-all * Fixes for escaping object types * Added to generate_code
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
import { Monster as MyGameExample2Monster, MonsterT as MyGameExample2MonsterT } from '../../my-game/example2/monster';
|
||||
import { Monster as MyGame_Example2_Monster, MonsterT as MyGame_Example2_MonsterT } from '../../my-game/example2/monster';
|
||||
import { Ability, AbilityT } from '../../my-game/example/ability';
|
||||
import { Any, unionToAny, unionListToAny } from '../../my-game/example/any';
|
||||
import { AnyAmbiguousAliases, unionToAnyAmbiguousAliases, unionListToAnyAmbiguousAliases } from '../../my-game/example/any-ambiguous-aliases';
|
||||
@@ -684,7 +684,7 @@ mutate_long_enum_normal_default(value:bigint):boolean {
|
||||
}
|
||||
|
||||
static getFullyQualifiedName():string {
|
||||
return 'MyGame.Example.Monster';
|
||||
return 'MyGame_Example_Monster';
|
||||
}
|
||||
|
||||
static startMonster(builder:flatbuffers.Builder) {
|
||||
@@ -1296,7 +1296,7 @@ constructor(
|
||||
public inventory: (number)[] = [],
|
||||
public color: Color = Color.Blue,
|
||||
public testType: Any = Any.NONE,
|
||||
public test: MonsterT|MyGameExample2MonsterT|TestSimpleTableWithEnumT|null = null,
|
||||
public test: MonsterT|MyGame_Example2_MonsterT|TestSimpleTableWithEnumT|null = null,
|
||||
public test4: (TestT)[] = [],
|
||||
public testarrayofstring: (string)[] = [],
|
||||
public testarrayoftables: (MonsterT)[] = [],
|
||||
@@ -1332,7 +1332,7 @@ constructor(
|
||||
public nonOwningReference: bigint = BigInt('0'),
|
||||
public vectorOfNonOwningReferences: (bigint)[] = [],
|
||||
public anyUniqueType: AnyUniqueAliases = AnyUniqueAliases.NONE,
|
||||
public anyUnique: MonsterT|MyGameExample2MonsterT|TestSimpleTableWithEnumT|null = null,
|
||||
public anyUnique: MonsterT|MyGame_Example2_MonsterT|TestSimpleTableWithEnumT|null = null,
|
||||
public anyAmbiguousType: AnyAmbiguousAliases = AnyAmbiguousAliases.NONE,
|
||||
public anyAmbiguous: MonsterT|null = null,
|
||||
public vectorOfEnums: (Color)[] = [],
|
||||
|
||||
Reference in New Issue
Block a user