summaryrefslogtreecommitdiff
path: root/modules/script
diff options
context:
space:
mode:
authorEvan Welsh <contact@evanwelsh.com>2021-06-13 17:54:18 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2021-07-01 21:09:56 -0700
commite1600ef2f43d109f5a7dbe586acdf27a38a30a1c (patch)
tree4656ba19b154ad9877d6777df65a7113cc1827f1 /modules/script
parent4b02a015e20145c760743f3d2cb0493e631a4e5b (diff)
downloadgjs-e1600ef2f43d109f5a7dbe586acdf27a38a30a1c.tar.gz
ByteArray: Add jsdoc to ByteArray.fromArray()
Diffstat (limited to 'modules/script')
-rw-r--r--modules/script/byteArray.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/script/byteArray.js b/modules/script/byteArray.js
index fad022d2..6d4b0f51 100644
--- a/modules/script/byteArray.js
+++ b/modules/script/byteArray.js
@@ -7,8 +7,13 @@ var {fromGBytes, fromString, toGBytes, toString} = imports._byteArrayNative;
// For backwards compatibility
-function fromArray(a) {
- return new ByteArray(Uint8Array.from(a));
+/**
+ * @param {Iterable<number>} array an iterable to convert into a ByteArray
+ * wrapper
+ * @returns {ByteArray}
+ */
+function fromArray(array) {
+ return new ByteArray(Uint8Array.from(array));
}
var ByteArray = class ByteArray {