From af92a24ba9fc8efea1ba41f96d87515cf760da65 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Tue, 24 May 2022 16:28:36 +0200 Subject: [PATCH] fix: use strict TS in Input.ts (#8392) --- src/common/Input.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/Input.ts b/src/common/Input.ts index 03d02a5768e..1e2794b8a1c 100644 --- a/src/common/Input.ts +++ b/src/common/Input.ts @@ -209,7 +209,7 @@ export class Keyboard { } private charIsKey(char: string): char is KeyInput { - return !!keyDefinitions[char]; + return !!keyDefinitions[char as KeyInput]; } /** @@ -235,7 +235,7 @@ export class Keyboard { * Defaults to 0. */ async type(text: string, options: { delay?: number } = {}): Promise { - const delay = options.delay || null; + const delay = options.delay || undefined; for (const char of text) { if (this.charIsKey(char)) { await this.press(char, { delay });