From 3ddb4017fd7c7bb6f0eafe6b23eb0ef6a70cd0d7 Mon Sep 17 00:00:00 2001 From: Yingchen Xue Date: Mon, 4 Jun 2018 14:59:02 +0800 Subject: [PATCH] Lint (#83) --- dispatch.ts | 2 +- testdata/004_set_timeout.ts | 4 ++-- tests.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dispatch.ts b/dispatch.ts index f6823cefff..01bd58bedd 100644 --- a/dispatch.ts +++ b/dispatch.ts @@ -4,7 +4,7 @@ import { typedArrayToArrayBuffer } from "./util"; import { _global } from "./globals"; import { main as pb } from "./msg.pb"; -type MessageCallback = (msg: Uint8Array) => void; +export type MessageCallback = (msg: Uint8Array) => void; //type MessageStructCallback = (msg: pb.IMsg) => void; const send = V8Worker2.send; diff --git a/testdata/004_set_timeout.ts b/testdata/004_set_timeout.ts index cc55bf76f7..214b25086c 100644 --- a/testdata/004_set_timeout.ts +++ b/testdata/004_set_timeout.ts @@ -1,10 +1,10 @@ -setTimeout(function() { +setTimeout(() => { console.log("World"); }, 10); console.log("Hello"); -const id = setTimeout(function() { +const id = setTimeout(() => { console.log("Not printed"); }, 10000); diff --git a/tests.ts b/tests.ts index 45991228b6..d4b188fdaf 100644 --- a/tests.ts +++ b/tests.ts @@ -20,7 +20,7 @@ test(async function tests_fetch() { }); test(async function tests_readFileSync() { - let data = readFileSync("package.json"); + const data = readFileSync("package.json"); if (!data.byteLength) { throw Error( `Expected positive value for data.byteLength ${data.byteLength}`