Improve TS types to support isolatedModules and isolatedDeclarations

This commit is contained in:
Björn Harrtell
2026-04-08 05:42:18 +02:00
parent e223d69b36
commit 496f10525b
249 changed files with 12736 additions and 14776 deletions

View File

@@ -0,0 +1,57 @@
// 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';
export class Info {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsInfo(bb, obj) {
return (obj || new Info()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsInfo(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new Info()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
timestamp() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
}
static getFullyQualifiedName() {
return 'Transit.One.Info';
}
static startInfo(builder) {
builder.startObject(1);
}
static addTimestamp(builder, timestamp) {
builder.addFieldInt64(0, timestamp, BigInt('0'));
}
static endInfo(builder) {
const offset = builder.endObject();
return offset;
}
static createInfo(builder, timestamp) {
Info.startInfo(builder);
Info.addTimestamp(builder, timestamp);
return Info.endInfo(builder);
}
unpack() {
return new InfoT(this.timestamp());
}
unpackTo(_o) {
_o.timestamp = this.timestamp();
}
}
export class InfoT {
constructor(timestamp = BigInt('0')) {
this.timestamp = timestamp;
}
pack(builder) {
return Info.createInfo(builder, this.timestamp);
}
}