From 3f0cf9619fce71a8898c495501df4bdb0e07e735 Mon Sep 17 00:00:00 2001 From: Leo K Date: Thu, 5 Aug 2021 13:08:58 +0200 Subject: refactor(cli/tests): remove unnecessary void return types (#11577) --- cli/tests/workers/bench_startup.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cli/tests/workers/bench_startup.ts') diff --git a/cli/tests/workers/bench_startup.ts b/cli/tests/workers/bench_startup.ts index 5fbf23b45..bcf21ef44 100644 --- a/cli/tests/workers/bench_startup.ts +++ b/cli/tests/workers/bench_startup.ts @@ -1,15 +1,15 @@ // Benchmark measures time it takes to start and stop a number of workers. const workerCount = 50; -async function bench(): Promise { +async function bench() { const workers: Worker[] = []; for (let i = 1; i <= workerCount; ++i) { const worker = new Worker( new URL("bench_worker.ts", import.meta.url).href, { type: "module" }, ); - const promise = new Promise((resolve): void => { - worker.onmessage = (e): void => { + const promise = new Promise((resolve) => { + worker.onmessage = (e) => { if (e.data.cmdId === 0) resolve(); }; }); @@ -19,8 +19,8 @@ async function bench(): Promise { } console.log("Done creating workers closing workers!"); for (const worker of workers) { - const promise = new Promise((resolve): void => { - worker.onmessage = (e): void => { + const promise = new Promise((resolve) => { + worker.onmessage = (e) => { if (e.data.cmdId === 3) resolve(); }; }); -- cgit v1.2.3