diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-05-28 09:33:11 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 09:33:11 +1000 |
commit | 59237d195f6afa0d8927128751ba5ff4562d7cce (patch) | |
tree | 0aa28aff006eea751752e6160093f7631e99ad49 /runtime/js/13_buffer.js | |
parent | 56f6e57438c23f75e23e28f45ad0f76b94379d59 (diff) |
feat(cli): upgrade to TypeScript 4.3 (#9960)
Diffstat (limited to 'runtime/js/13_buffer.js')
-rw-r--r-- | runtime/js/13_buffer.js | 12 |
1 files changed, 6 insertions, 6 deletions
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) { |