fix: use strict TS in Input.ts (#8392)
This commit is contained in:
parent
f657233ca4
commit
af92a24ba9
@ -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<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 });
|
||||
|
Loading…
Reference in New Issue
Block a user