summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-09-08 01:27:18 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-09-07 12:27:18 -0400
commitf12acdb50bd6afae21d8d033548c012d23ec2791 (patch)
treee61071f25a9dfe3ea853bcaea0ece7307a02bc73 /core
parenta205e8a3c2bf5ba72fe18bd7f224303338956c62 (diff)
Update @typescript-eslint/* to v2.1.0 (#2878)
Diffstat (limited to 'core')
-rw-r--r--core/libdeno/libdeno_test.js1
-rw-r--r--core/shared_queue.js12
-rw-r--r--core/shared_queue_test.js4
3 files changed, 9 insertions, 8 deletions
diff --git a/core/libdeno/libdeno_test.js b/core/libdeno/libdeno_test.js
index 1c7655391..779762cfd 100644
--- a/core/libdeno/libdeno_test.js
+++ b/core/libdeno/libdeno_test.js
@@ -3,6 +3,7 @@
// A simple runtime that doesn't involve typescript or protobufs to test
// libdeno. Invoked by libdeno_test.cc
+// eslint-disable-next-line @typescript-eslint/no-this-alias
const global = this;
function assert(cond) {
diff --git a/core/shared_queue.js b/core/shared_queue.js
index b69f1b422..22a64a312 100644
--- a/core/shared_queue.js
+++ b/core/shared_queue.js
@@ -48,7 +48,7 @@ SharedQueue Binary Layout
}
function init() {
- let shared = Deno.core.shared;
+ const shared = Deno.core.shared;
assert(shared.byteLength > 0);
assert(sharedBytes == null);
assert(shared32 == null);
@@ -113,9 +113,9 @@ SharedQueue Binary Layout
}
function push(opId, buf) {
- let off = head();
- let end = off + buf.byteLength;
- let index = numRecords();
+ const off = head();
+ const end = off + buf.byteLength;
+ const index = numRecords();
if (end > shared32.byteLength || index >= MAX_RECORDS) {
// console.log("shared_queue.js push fail");
return false;
@@ -130,7 +130,7 @@ SharedQueue Binary Layout
/// Returns null if empty.
function shift() {
- let i = shared32[INDEX_NUM_SHIFTED_OFF];
+ const i = shared32[INDEX_NUM_SHIFTED_OFF];
if (size() == 0) {
assert(i == 0);
return null;
@@ -164,7 +164,7 @@ SharedQueue Binary Layout
asyncHandler(opId, buf);
} else {
while (true) {
- let opIdBuf = shift();
+ const opIdBuf = shift();
if (opIdBuf == null) {
break;
}
diff --git a/core/shared_queue_test.js b/core/shared_queue_test.js
index 682d41d1e..42b58052c 100644
--- a/core/shared_queue_test.js
+++ b/core/shared_queue_test.js
@@ -25,11 +25,11 @@ function fullRecords(q) {
function main() {
const q = Deno.core.sharedQueue;
- let h = q.head();
+ const h = q.head();
assert(h > 0);
let r = new Uint8Array([1, 2, 3, 4, 5]);
- let len = r.byteLength + h;
+ const len = r.byteLength + h;
assert(q.push(99, r));
assert(q.head() == len);