summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-05-28 09:33:11 +1000
committerGitHub <noreply@github.com>2021-05-28 09:33:11 +1000
commit59237d195f6afa0d8927128751ba5ff4562d7cce (patch)
tree0aa28aff006eea751752e6160093f7631e99ad49 /runtime/js
parent56f6e57438c23f75e23e28f45ad0f76b94379d59 (diff)
feat(cli): upgrade to TypeScript 4.3 (#9960)
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/11_workers.js8
-rw-r--r--runtime/js/13_buffer.js12
2 files changed, 10 insertions, 10 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js
index 641833778..5660b291c 100644
--- a/runtime/js/11_workers.js
+++ b/runtime/js/11_workers.js
@@ -192,16 +192,16 @@
this.#poll();
}
- #handleMessage = (data) => {
+ #handleMessage(data) {
const msgEvent = new MessageEvent("message", {
cancelable: false,
data,
});
this.dispatchEvent(msgEvent);
- };
+ }
- #handleError = (e) => {
+ #handleError(e) {
const event = new ErrorEvent("error", {
cancelable: true,
message: e.message,
@@ -219,7 +219,7 @@
}
return handled;
- };
+ }
#poll = async () => {
while (!this.#terminated) {
diff --git a/runtime/js/13_buffer.js b/runtime/js/13_buffer.js
index fcb656c0f..ff9e11f2c 100644
--- a/runtime/js/13_buffer.js
+++ b/runtime/js/13_buffer.js
@@ -73,19 +73,19 @@
this.#off = 0;
}
- #tryGrowByReslice = (n) => {
+ #tryGrowByReslice(n) {
const l = this.#buf.byteLength;
if (n <= this.capacity - l) {
this.#reslice(l + n);
return l;
}
return -1;
- };
+ }
- #reslice = (len) => {
+ #reslice(len) {
assert(len <= this.#buf.buffer.byteLength);
this.#buf = new Uint8Array(this.#buf.buffer, 0, len);
- };
+ }
readSync(p) {
if (this.empty()) {
@@ -117,7 +117,7 @@
return Promise.resolve(n);
}
- #grow = (n) => {
+ #grow(n) {
const m = this.length;
// If buffer is empty, reset to recover space.
if (m === 0 && this.#off !== 0) {
@@ -147,7 +147,7 @@
this.#off = 0;
this.#reslice(Math.min(m + n, MAX_SIZE));
return m;
- };
+ }
grow(n) {
if (n < 0) {