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/034_onload/imported.ts | 2 +- cli/tests/034_onload/main.ts | 6 +++--- cli/tests/034_onload/nest_imported.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cli/tests/034_onload') diff --git a/cli/tests/034_onload/imported.ts b/cli/tests/034_onload/imported.ts index 9e1411bea..3c7a0aae2 100644 --- a/cli/tests/034_onload/imported.ts +++ b/cli/tests/034_onload/imported.ts @@ -1,7 +1,7 @@ import { assert } from "../../../test_util/std/testing/asserts.ts"; import "./nest_imported.ts"; -const handler = (e: Event): void => { +const handler = (e: Event) => { assert(!e.cancelable); console.log(`got ${e.type} event in event handler (imported)`); }; diff --git a/cli/tests/034_onload/main.ts b/cli/tests/034_onload/main.ts index f8c48ba7b..7696ec122 100644 --- a/cli/tests/034_onload/main.ts +++ b/cli/tests/034_onload/main.ts @@ -4,7 +4,7 @@ import "./imported.ts"; assert(window.hasOwnProperty("onload")); assert(window.onload === null); -const eventHandler = (e: Event): void => { +const eventHandler = (e: Event) => { assert(!e.cancelable); console.log(`got ${e.type} event in event handler (main)`); }; @@ -13,12 +13,12 @@ window.addEventListener("load", eventHandler); window.addEventListener("unload", eventHandler); -window.onload = (e: Event): void => { +window.onload = (e: Event) => { assert(!e.cancelable); console.log(`got ${e.type} event in onload function`); }; -window.onunload = (e: Event): void => { +window.onunload = (e: Event) => { assert(!e.cancelable); console.log(`got ${e.type} event in onunload function`); }; diff --git a/cli/tests/034_onload/nest_imported.ts b/cli/tests/034_onload/nest_imported.ts index d43b8ebe7..8ca668de9 100644 --- a/cli/tests/034_onload/nest_imported.ts +++ b/cli/tests/034_onload/nest_imported.ts @@ -1,6 +1,6 @@ import { assert } from "../../../test_util/std/testing/asserts.ts"; -const handler = (e: Event): void => { +const handler = (e: Event) => { assert(!e.cancelable); console.log(`got ${e.type} event in event handler (nest_imported)`); }; -- cgit v1.2.3