Partial support for --ts-flat-files and --gen-all (#7446)

* Partial support for --ts-flat-files and --gen-all

* Add generated code changes

* remove some debugging code left over

* missed grpc files
This commit is contained in:
Derek Bailey
2022-08-15 16:11:45 -07:00
committed by GitHub
parent a3508f36d5
commit a66de58af9
38 changed files with 241 additions and 99 deletions

View File

@@ -7,7 +7,7 @@ import * as flatbuffers from 'flatbuffers';
export class Ability {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Ability {
__init(i:number, bb:flatbuffers.ByteBuffer):Ability {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -3,7 +3,7 @@
import { Monster, MonsterT } from '../../my-game/example/monster';
export enum AnyAmbiguousAliases{
export enum AnyAmbiguousAliases {
NONE = 0,
M1 = 1,
M2 = 2,

View File

@@ -5,7 +5,7 @@ import { Monster, MonsterT } from '../../my-game/example/monster';
import { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum';
export enum AnyUniqueAliases{
export enum AnyUniqueAliases {
NONE = 0,
M = 1,
TS = 2,

View File

@@ -5,7 +5,7 @@ import { Monster, MonsterT } from '../../my-game/example/monster';
import { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum';
export enum Any{
export enum Any {
NONE = 0,
Monster = 1,
TestSimpleTableWithEnum = 2,

View File

@@ -3,7 +3,7 @@
/**
* Composite components of Monster color.
*/
export enum Color{
export enum Color {
Red = 1,
/**

View File

@@ -1,6 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify
export enum LongEnum{
export enum LongEnum {
LongOne = '2',
LongTwo = '4',
LongBig = '1099511627776'

View File

@@ -23,7 +23,7 @@ import { InParentNamespace, InParentNamespaceT } from '../../my-game/in-parent-n
export class Monster {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Monster {
__init(i:number, bb:flatbuffers.ByteBuffer):Monster {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -1,6 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify
export enum Race{
export enum Race {
None = -1,
Human = 0,
Dwarf = 1,

View File

@@ -7,7 +7,7 @@ import * as flatbuffers from 'flatbuffers';
export class Referrable {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Referrable {
__init(i:number, bb:flatbuffers.ByteBuffer):Referrable {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -7,7 +7,7 @@ import * as flatbuffers from 'flatbuffers';
export class Stat {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Stat {
__init(i:number, bb:flatbuffers.ByteBuffer):Stat {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -8,7 +8,7 @@ import { StructOfStructs, StructOfStructsT } from '../../my-game/example/struct-
export class StructOfStructsOfStructs {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructsOfStructs {
__init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructsOfStructs {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -9,7 +9,7 @@ import { Test, TestT } from '../../my-game/example/test';
export class StructOfStructs {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructs {
__init(i:number, bb:flatbuffers.ByteBuffer):StructOfStructs {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -8,7 +8,7 @@ import { Color } from '../../my-game/example/color';
export class TestSimpleTableWithEnum {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):TestSimpleTableWithEnum {
__init(i:number, bb:flatbuffers.ByteBuffer):TestSimpleTableWithEnum {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -7,7 +7,7 @@ import * as flatbuffers from 'flatbuffers';
export class Test {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Test {
__init(i:number, bb:flatbuffers.ByteBuffer):Test {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -7,7 +7,7 @@ import * as flatbuffers from 'flatbuffers';
export class TypeAliases {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):TypeAliases {
__init(i:number, bb:flatbuffers.ByteBuffer):TypeAliases {
this.bb_pos = i;
this.bb = bb;
return this;

View File

@@ -9,7 +9,7 @@ import { Test, TestT } from '../../my-game/example/test';
export class Vec3 {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Vec3 {
__init(i:number, bb:flatbuffers.ByteBuffer):Vec3 {
this.bb_pos = i;
this.bb = bb;
return this;