mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
Generating the most strict TS code possible (#4286)
* Eclipse ignore * TypeScript support * Prefixing enums * Test results * Merged JS and TS generators * Fixed AppVeyor build problems * Fixed more AppVeyor build problems * Fixed more AppVeyor build problems * Changed TS flag to options struct * Storing options by value * Removed unneeded const * Re-export support for unions * Uint support * Casting bools to numbers for mutation * TS shell tests * Reverted generates js test file to original version * Backing up js tests and properly generating test data * Not importing flatbuffers for TS test generation * Not overwriting generated js for tests * AppVeyor test fixes * Generating the most strict TS code possible
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
8b92122f33
commit
86777bd66b
@@ -29,7 +29,7 @@ export class Monster {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -81,7 +81,7 @@ export class Test {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -166,7 +166,7 @@ export class TestSimpleTableWithEnum {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -249,7 +249,7 @@ export class Vec3 {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -422,7 +422,7 @@ export class Ability {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -506,7 +506,7 @@ export class Stat {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -534,10 +534,10 @@ static getRootAsStat(bb:flatbuffers.ByteBuffer, obj?:Stat):Stat {
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Encoding=} optionalEncoding
|
||||
* @returns {string|Uint8Array}
|
||||
* @returns {string|Uint8Array|null}
|
||||
*/
|
||||
id():string
|
||||
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array
|
||||
id():string|null
|
||||
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
id(optionalEncoding?:any):string|Uint8Array {
|
||||
var offset = this.bb.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
@@ -641,7 +641,7 @@ export class Monster {
|
||||
/**
|
||||
* @type {flatbuffers.ByteBuffer}
|
||||
*/
|
||||
bb: flatbuffers.ByteBuffer= null;
|
||||
bb: flatbuffers.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
@@ -732,10 +732,10 @@ mutate_hp(value:number):boolean {
|
||||
|
||||
/**
|
||||
* @param {flatbuffers.Encoding=} optionalEncoding
|
||||
* @returns {string|Uint8Array}
|
||||
* @returns {string|Uint8Array|null}
|
||||
*/
|
||||
name():string
|
||||
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array
|
||||
name():string|null
|
||||
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
name(optionalEncoding?:any):string|Uint8Array {
|
||||
var offset = this.bb.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
|
||||
Reference in New Issue
Block a user