mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 18:06:10 +00:00
TS/JS: Use minvalue from enum if not found (#7888)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -18,10 +18,6 @@ var __copyProps = (to, from, except, desc) => {
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
@@ -818,7 +814,7 @@ var Vec3 = class {
|
||||
}
|
||||
};
|
||||
var Vec3T = class {
|
||||
constructor(x = 0, y = 0, z = 0, test1 = 0, test2 = 0, test3 = null) {
|
||||
constructor(x = 0, y = 0, z = 0, test1 = 0, test2 = Color.Red, test3 = null) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
@@ -932,10 +928,6 @@ var Monster2 = class {
|
||||
const offset = this.bb.__offset(this.bb_pos, 24);
|
||||
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
||||
}
|
||||
/**
|
||||
* an example documentation comment: this will end up in the generated code
|
||||
* multiline too
|
||||
*/
|
||||
testarrayoftables(index, obj) {
|
||||
const offset = this.bb.__offset(this.bb_pos, 26);
|
||||
return offset ? (obj || new Monster2()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
||||
|
||||
Reference in New Issue
Block a user