model.fbs
namespace hello;
table Point {
x: float;
y: float;
}
root_type Point;
model_generated.ts
export namespace hello {
export class Point {
/**
* @type {flatbuffers.ByteBuffer}
*/
bb: flatbuffers.ByteBuffer;
/**
* @type {number}
*/
bb_pos: number = 0;
/**
* @param {number} i
* @param {flatbuffers.ByteBuffer} bb
* @returns {Point}
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Point {
this.bb_pos = i;
this.bb = bb;
return this;
}
....
Compile Error:
model_generated.ts(12,5): error TS2564: Property 'bb' has no initializer and is not definitely assigned in the constructor. src/model_generated.ts(12,5): error TS2564: Property 'bb' has no initializer and is not definitely assigned in the constructor.
Reason : microsoft/TypeScript#20075
Workaround : "strictPropertyInitialization": false,