summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/flatbuffers.js10
1 files changed, 9 insertions, 1 deletions
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;
};