From 82e3ec2f1f7444cd27c8bd7749f829d6056aa871 Mon Sep 17 00:00:00 2001 From: Matt Bierner <12821956+mjbvz@users.noreply.github.com> Date: Fri, 21 Nov 2025 13:36:46 -0800 Subject: [PATCH] Workaround https://github.com/microsoft/playwright/issues/37418 --- test/automation/src/playwrightDriver.ts | 3 ++- test/automation/tsconfig.json | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/automation/src/playwrightDriver.ts b/test/automation/src/playwrightDriver.ts index 26e2a465c84..56227115207 100644 --- a/test/automation/src/playwrightDriver.ts +++ b/test/automation/src/playwrightDriver.ts @@ -8,12 +8,13 @@ import type { Protocol } from 'playwright-core/types/protocol'; import { dirname, join } from 'path'; import { promises } from 'fs'; import { IWindowDriver } from './driver'; -import { PageFunction } from 'playwright-core/types/structs'; import { measureAndLog } from './logger'; import { LaunchOptions } from './code'; import { teardown } from './processes'; import { ChildProcess } from 'child_process'; +type PageFunction = (arg: Arg) => T | Promise; + export class PlaywrightDriver { private static traceCounter = 1; diff --git a/test/automation/tsconfig.json b/test/automation/tsconfig.json index 88472717b77..908cc3367a3 100644 --- a/test/automation/tsconfig.json +++ b/test/automation/tsconfig.json @@ -12,7 +12,12 @@ "lib": [ "esnext", // for #201187 "dom" - ] + ], + "paths": { + "playwright-core/types/protocol": [ + "../../node_modules/playwright-core/types/protocol.d.ts" + ] + } }, "exclude": [ "node_modules",