Skip to content

Commit ce2065f

Browse files
committed
Remove some @ts-ignore comments
1 parent 18d4a63 commit ce2065f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/test-runner-chrome/src/ChromeLauncherPage.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import { TestRunnerCoreConfig } from '@web/test-runner-core';
33
import { v8ToIstanbul } from '@web/test-runner-coverage-v8';
44
import { SessionResult } from '@web/test-runner-core';
55

6+
declare global {
7+
interface Window { __bringTabToFront: Function; }
8+
}
9+
610
export class ChromeLauncherPage {
711
private config: TestRunnerCoreConfig;
812
private testFiles: string[];
@@ -46,13 +50,10 @@ export class ChromeLauncherPage {
4650
this.puppeteerPage.bringToFront(),
4751
);
4852
await this.puppeteerPage.evaluateOnNewDocument(() => {
49-
// @ts-ignore
50-
function patchFunction(name, fn) {
51-
// @ts-ignore
52-
window[name] = (...args) => {
53+
function patchFunction(name: string, fn: Function) {
54+
(window as any)[name] = (...args: unknown[]) => {
5355
fn.call(window, ...args);
5456
// Make sure that the tab running the test code is brought back to the front.
55-
// @ts-ignore
5657
window.__bringTabToFront();
5758
};
5859
}

0 commit comments

Comments
 (0)