chore(generate-code): Generate the JS code after mutation has been added.

This commit is contained in:
Michael Paulson
2016-07-25 14:33:46 -07:00
parent 0230a7173f
commit a351124cfd
3 changed files with 450 additions and 0 deletions

View File

@@ -64,6 +64,21 @@ NamespaceA.NamespaceB.TableInNestedNS.prototype.foo = function() {
return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
};
/**
* @param {number} value
* @returns {boolean}
*/
NamespaceA.NamespaceB.TableInNestedNS.prototype.mutate_foo = function(value) {
var offset = this.bb.__offset(this.bb_pos, 4)
if (offset === 0) {
return false;
}
this.bb.writeInt32(this.bb_pos + offset, value);
return true;
}
/**
* @param {flatbuffers.Builder} builder
*/
@@ -121,6 +136,21 @@ NamespaceA.NamespaceB.StructInNestedNS.prototype.a = function() {
return this.bb.readInt32(this.bb_pos);
};
/**
* @param {number} value
* @returns {boolean}
*/
NamespaceA.NamespaceB.StructInNestedNS.prototype.mutate_a = function(value) {
var offset = this.bb.__offset(this.bb_pos, 0)
if (offset === 0) {
return false;
}
this.bb.writeInt32(this.bb_pos + offset, value);
return true;
}
/**
* @returns {number}
*/
@@ -128,6 +158,21 @@ NamespaceA.NamespaceB.StructInNestedNS.prototype.b = function() {
return this.bb.readInt32(this.bb_pos + 4);
};
/**
* @param {number} value
* @returns {boolean}
*/
NamespaceA.NamespaceB.StructInNestedNS.prototype.mutate_b = function(value) {
var offset = this.bb.__offset(this.bb_pos, 4)
if (offset === 0) {
return false;
}
this.bb.writeInt32(this.bb_pos + offset, value);
return true;
}
/**
* @param {flatbuffers.Builder} builder
* @param {number} a