mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-04 10:11:12 +00:00
[TS/JS] Move TS tests to dedicated folder and deps upgrade (#7508)
* Move TS tests to dedicated folder and deps upgrade * Attempt to fix generate_code * Fix dir on CI * Add js extension * Fix missing extension * Harmonize with test gen * Unexplained code gen change * Restore yarn.lock * Naive attempt to fix bazel stuff * Pin @bazel/typescript to 5.2.0 * Attempt to fix bazel * More tweak * Upgrade deps * Tweak? * Fix path * Fix test package Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
50
tests/ts/my-game/in-parent-namespace.js
Normal file
50
tests/ts/my-game/in-parent-namespace.js
Normal file
@@ -0,0 +1,50 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
export class InParentNamespace {
|
||||
constructor() {
|
||||
this.bb = null;
|
||||
this.bb_pos = 0;
|
||||
}
|
||||
__init(i, bb) {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
static getRootAsInParentNamespace(bb, obj) {
|
||||
return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
static getSizePrefixedRootAsInParentNamespace(bb, obj) {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new InParentNamespace()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
static getFullyQualifiedName() {
|
||||
return 'MyGame_InParentNamespace';
|
||||
}
|
||||
static startInParentNamespace(builder) {
|
||||
builder.startObject(0);
|
||||
}
|
||||
static endInParentNamespace(builder) {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
static createInParentNamespace(builder) {
|
||||
InParentNamespace.startInParentNamespace(builder);
|
||||
return InParentNamespace.endInParentNamespace(builder);
|
||||
}
|
||||
serialize() {
|
||||
return this.bb.bytes();
|
||||
}
|
||||
static deserialize(buffer) {
|
||||
return InParentNamespace.getRootAsInParentNamespace(new flatbuffers.ByteBuffer(buffer));
|
||||
}
|
||||
unpack() {
|
||||
return new InParentNamespaceT();
|
||||
}
|
||||
unpackTo(_o) { }
|
||||
}
|
||||
export class InParentNamespaceT {
|
||||
constructor() { }
|
||||
pack(builder) {
|
||||
return InParentNamespace.createInParentNamespace(builder);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user