Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: use strict TS in Input.ts (#8392)
  • Loading branch information
OrKoN committed May 24, 2022
1 parent f657233 commit af92a24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/Input.ts
Expand Up @@ -209,7 +209,7 @@ export class Keyboard {
}

private charIsKey(char: string): char is KeyInput {
return !!keyDefinitions[char];
return !!keyDefinitions[char as KeyInput];
}

/**
Expand All @@ -235,7 +235,7 @@ export class Keyboard {
* Defaults to 0.
*/
async type(text: string, options: { delay?: number } = {}): Promise<void> {
const delay = options.delay || null;
const delay = options.delay || undefined;
for (const char of text) {
if (this.charIsKey(char)) {
await this.press(char, { delay });
Expand Down

0 comments on commit af92a24

Please sign in to comment.