Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions grpc/examples/ts/greeter/src/greeter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export * as models from './models.js';
2 changes: 2 additions & 0 deletions grpc/examples/ts/greeter/src/models.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { HelloReply } from './models/hello-reply.js';
export { HelloRequest } from './models/hello-request.js';
2 changes: 2 additions & 0 deletions grpc/examples/ts/greeter/src/models/hello-reply.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions grpc/examples/ts/greeter/src/models/hello-request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
7 changes: 5 additions & 2 deletions src/idl_gen_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ class TsGenerator : public BaseGenerator {

std::string code;

code += "// " + std::string(FlatBuffersGeneratedWarning()) + "\n\n";
code += "// " + std::string(FlatBuffersGeneratedWarning()) + "\n\n" +
"/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\n\n";

for (auto it = bare_imports.begin(); it != bare_imports.end(); it++) {
code += it->second.import_statement + "\n";
Expand Down Expand Up @@ -254,7 +255,9 @@ class TsGenerator : public BaseGenerator {
}

for (const auto &it : ns_defs_) {
code = "// " + std::string(FlatBuffersGeneratedWarning()) + "\n\n";
code = "// " + std::string(FlatBuffersGeneratedWarning()) + "\n\n" +
"/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\n\n";

// export all definitions in ns entry point module
int export_counter = 0;
for (const auto &def : it.second.definitions) {
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/monster_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { TableA, TableAT } from './table-a.js';
export * as MyGame from './my-game.js';
2 changes: 2 additions & 0 deletions tests/ts/my-game.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { InParentNamespace, InParentNamespaceT } from './my-game/in-parent-namespace.js';
export * as Example from './my-game/example.js';
export * as Example2 from './my-game/example2.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { Ability, AbilityT } from './example/ability.js';
export { Any } from './example/any.js';
export { AnyAmbiguousAliases } from './example/any-ambiguous-aliases.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/ability.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/any-ambiguous-aliases.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import { Monster, MonsterT } from '../../my-game/example/monster.js';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/any-unique-aliases.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import { Monster as MyGame_Example2_Monster, MonsterT as MyGame_Example2_MonsterT } from '../../my-game/example2/monster.js';
import { Monster, MonsterT } from '../../my-game/example/monster.js';
import { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/any.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import { Monster as MyGame_Example2_Monster, MonsterT as MyGame_Example2_MonsterT } from '../../my-game/example2/monster.js';
import { Monster, MonsterT } from '../../my-game/example/monster.js';
import { TestSimpleTableWithEnum, TestSimpleTableWithEnumT } from '../../my-game/example/test-simple-table-with-enum.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/color.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

/**
* Composite components of Monster color.
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/long-enum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export enum LongEnum {
LongOne = '2',
LongTwo = '4',
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/monster.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { Monster as MyGame_Example2_Monster, MonsterT as MyGame_Example2_MonsterT } from '../../my-game/example2/monster.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/race.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export enum Race {
None = -1,
Human = 0,
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/referrable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/stat.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/struct-of-structs-of-structs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { StructOfStructs, StructOfStructsT } from '../../my-game/example/struct-of-structs.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/struct-of-structs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { Ability, AbilityT } from '../../my-game/example/ability.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/test-simple-table-with-enum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { Color } from '../../my-game/example/color.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/type-aliases.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example/vec3.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { Color } from '../../my-game/example/color.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/example2.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { Monster, MonsterT } from './example2/monster.js';
2 changes: 2 additions & 0 deletions tests/ts/my-game/example2/monster.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/in-parent-namespace.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/my-game/other-name-space.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { FromInclude } from './other-name-space/from-include.js';
export { TableB, TableBT } from './other-name-space/table-b.js';
export { Unused, UnusedT } from './other-name-space/unused.js';
2 changes: 2 additions & 0 deletions tests/ts/optional-scalars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { OptionalByte } from './optional-scalars/optional-byte.js';
export { ScalarStuff } from './optional-scalars/scalar-stuff.js';
2 changes: 2 additions & 0 deletions tests/ts/optional-scalars/optional-byte.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export enum OptionalByte {
None = 0,
One = 1,
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/optional-scalars/scalar-stuff.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { OptionalByte } from '../optional-scalars/optional-byte.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/optional_scalars.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export * as optional_scalars from './optional-scalars.js';
2 changes: 2 additions & 0 deletions tests/ts/union_vector/attacker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/book-reader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/character.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import { Attacker, AttackerT } from './attacker.js';
import { BookReader, BookReaderT } from './book-reader.js';
import { Rapunzel, RapunzelT } from './rapunzel.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/falling-tub.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/gadget.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import { FallingTub, FallingTubT } from './falling-tub.js';
import { HandFan, HandFanT } from './hand-fan.js';

Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/hand-fan.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/movie.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { Attacker, AttackerT } from './attacker.js';
Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/rapunzel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';


Expand Down
2 changes: 2 additions & 0 deletions tests/ts/union_vector/union_vector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { Attacker, AttackerT } from './attacker.js';
export { BookReader, BookReaderT } from './book-reader.js';
export { Character } from './character.js';
Expand Down