Skip to content

Commit

Permalink
use explicit types instead of any
Browse files Browse the repository at this point in the history
  • Loading branch information
kmorcinek committed Mar 1, 2023
1 parent 5021ed9 commit ea17443
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GameRestarterClicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export class GameRestarterClicker {
}
}

private click(element: any | null) {
private click(element: Element | null) {
if (element !== null) {
this.mouseDown(element);
}
}

private mouseDown(element: any) {
private mouseDown(element: Element) {
element.dispatchEvent(new Event("mousedown"));
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class ConquerorSpy {
}

private static getCheckedState(elementId: string, defaultValue: boolean): boolean {
const element = document.getElementById(elementId) as any;
const element = document.getElementById(elementId) as HTMLInputElement;
if (element === null) {
return defaultValue;
}
Expand Down

0 comments on commit ea17443

Please sign in to comment.