Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(ct): fix component.d.ts core types (#29463)

Max Schmittb947639d3ab8
diff --git a/packages/playwright-ct-core/src/injected/importRegistry.ts b/packages/playwright-ct-core/src/injected/importRegistry.ts
index 138d31ce05..1f5c1adf4c 100644
--- a/packages/playwright-ct-core/src/injected/importRegistry.ts
+++ b/packages/playwright-ct-core/src/injected/importRegistry.ts
@@ -47,3 +47,9 @@ export class ImportRegistry {
return importedObject;
}
}
+
+declare global {
+ interface Window {
+ __pwRegistry: ImportRegistry;
+ }
+}
diff --git a/packages/playwright-ct-core/types/component.d.ts b/packages/playwright-ct-core/types/component.d.ts
index 1b43a944e4..7502ec2f06 100644
--- a/packages/playwright-ct-core/types/component.d.ts
+++ b/packages/playwright-ct-core/types/component.d.ts
@@ -55,7 +55,6 @@ declare global {
__pw_hooks_after_mount?: (<HooksConfig extends JsonObject = JsonObject>(
params: { hooksConfig?: HooksConfig; [key: string]: any }
) => Promise<void>)[];
- __pwRegistry: ImportRegistry;
// Can't start with __pw due to core reuse bindings logic for __pw*.
__ctDispatchFunction: (ordinal: number, args: any[]) => void;
__pwUnwrapObject: (value: any) => Promise<any>;