From 7a36419f24f0456bb97cbc72424286cc41522647 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 27 Mar 2017 17:44:33 -0700 Subject: Fixing closure compile compatibility when --gen-mutable is used. Change-Id: I8bf575ba6dc795d2d2eec02fa8977dcc2594eaa6 --- js/flatbuffers.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/flatbuffers.js b/js/flatbuffers.js index a8b1941c..2e34e98b 100644 --- a/js/flatbuffers.js +++ b/js/flatbuffers.js @@ -944,9 +944,17 @@ flatbuffers.ByteBuffer.prototype.readFloat64 = function(offset) { /** * @param {number} offset - * @param {number} value + * @param {number|boolean} value */ flatbuffers.ByteBuffer.prototype.writeInt8 = function(offset, value) { + this.bytes_[offset] = /** @type {number} */(value); +}; + +/** + * @param {number} offset + * @param {number} value + */ +flatbuffers.ByteBuffer.prototype.writeUint8 = function(offset, value) { this.bytes_[offset] = value; }; -- cgit v1.2.3