diff --git a/packages/playwright-ct-react/hooks.d.ts b/packages/playwright-ct-react/hooks.d.ts index 31cbda4c23..cc2b660587 100644 --- a/packages/playwright-ct-react/hooks.d.ts +++ b/packages/playwright-ct-react/hooks.d.ts @@ -14,10 +14,8 @@ * limitations under the License. */ -type JsonPrimitive = string | number | boolean | null; -type JsonValue = JsonPrimitive | JsonObject | JsonArray; -type JsonArray = JsonValue[]; -type JsonObject = { [Key in string]?: JsonValue }; +import type { JsonObject } from '@playwright/test/types/component'; + export declare function beforeMount( callback: (params: { hooksConfig?: HooksConfig; App: () => JSX.Element }) => Promise ): void; diff --git a/packages/playwright-ct-react/index.d.ts b/packages/playwright-ct-react/index.d.ts index 63327ee138..75a7a097d5 100644 --- a/packages/playwright-ct-react/index.d.ts +++ b/packages/playwright-ct-react/index.d.ts @@ -23,6 +23,7 @@ import type { PlaywrightWorkerOptions, Locator, } from '@playwright/test'; +import type { JsonObject } from '@playwright/test/types/component'; import type { InlineConfig } from 'vite'; export type PlaywrightTestConfig = Omit, 'use'> & { @@ -34,11 +35,6 @@ export type PlaywrightTestConfig = Omit { hooksConfig?: HooksConfig; } diff --git a/packages/playwright-ct-react17/hooks.d.ts b/packages/playwright-ct-react17/hooks.d.ts index 31cbda4c23..cc2b660587 100644 --- a/packages/playwright-ct-react17/hooks.d.ts +++ b/packages/playwright-ct-react17/hooks.d.ts @@ -14,10 +14,8 @@ * limitations under the License. */ -type JsonPrimitive = string | number | boolean | null; -type JsonValue = JsonPrimitive | JsonObject | JsonArray; -type JsonArray = JsonValue[]; -type JsonObject = { [Key in string]?: JsonValue }; +import type { JsonObject } from '@playwright/test/types/component'; + export declare function beforeMount( callback: (params: { hooksConfig?: HooksConfig; App: () => JSX.Element }) => Promise ): void; diff --git a/packages/playwright-ct-react17/index.d.ts b/packages/playwright-ct-react17/index.d.ts index 63327ee138..75a7a097d5 100644 --- a/packages/playwright-ct-react17/index.d.ts +++ b/packages/playwright-ct-react17/index.d.ts @@ -23,6 +23,7 @@ import type { PlaywrightWorkerOptions, Locator, } from '@playwright/test'; +import type { JsonObject } from '@playwright/test/types/component'; import type { InlineConfig } from 'vite'; export type PlaywrightTestConfig = Omit, 'use'> & { @@ -34,11 +35,6 @@ export type PlaywrightTestConfig = Omit { hooksConfig?: HooksConfig; } diff --git a/packages/playwright-ct-solid/hooks.d.ts b/packages/playwright-ct-solid/hooks.d.ts index 048978cd53..398a2390bb 100644 --- a/packages/playwright-ct-solid/hooks.d.ts +++ b/packages/playwright-ct-solid/hooks.d.ts @@ -15,11 +15,8 @@ */ import { JSXElement } from "solid-js"; +import type { JsonObject } from '@playwright/test/types/component'; -type JsonPrimitive = string | number | boolean | null; -type JsonValue = JsonPrimitive | JsonObject | JsonArray; -type JsonArray = JsonValue[]; -type JsonObject = { [Key in string]?: JsonValue }; export declare function beforeMount( callback: (params: { hooksConfig?: HooksConfig, App: () => JSXElement }) => Promise ): void; diff --git a/packages/playwright-ct-solid/index.d.ts b/packages/playwright-ct-solid/index.d.ts index 63327ee138..75a7a097d5 100644 --- a/packages/playwright-ct-solid/index.d.ts +++ b/packages/playwright-ct-solid/index.d.ts @@ -23,6 +23,7 @@ import type { PlaywrightWorkerOptions, Locator, } from '@playwright/test'; +import type { JsonObject } from '@playwright/test/types/component'; import type { InlineConfig } from 'vite'; export type PlaywrightTestConfig = Omit, 'use'> & { @@ -34,11 +35,6 @@ export type PlaywrightTestConfig = Omit { hooksConfig?: HooksConfig; } diff --git a/packages/playwright-ct-svelte/hooks.d.ts b/packages/playwright-ct-svelte/hooks.d.ts index 1c2107325b..46ab2f64e2 100644 --- a/packages/playwright-ct-svelte/hooks.d.ts +++ b/packages/playwright-ct-svelte/hooks.d.ts @@ -15,11 +15,8 @@ */ import type { SvelteComponent } from 'svelte'; +import type { JsonObject } from '@playwright/test/types/component'; -type JsonPrimitive = string | number | boolean | null; -type JsonValue = JsonPrimitive | JsonObject | JsonArray; -type JsonArray = JsonValue[]; -type JsonObject = { [Key in string]?: JsonValue }; export declare function beforeMount( callback: (params: { hooksConfig?: HooksConfig }) => Promise ): void; diff --git a/packages/playwright-ct-svelte/index.d.ts b/packages/playwright-ct-svelte/index.d.ts index b879c1eed2..37863a0a91 100644 --- a/packages/playwright-ct-svelte/index.d.ts +++ b/packages/playwright-ct-svelte/index.d.ts @@ -23,6 +23,7 @@ import type { PlaywrightWorkerOptions, Locator, } from '@playwright/test'; +import type { JsonObject } from '@playwright/test/types/component'; import type { InlineConfig } from 'vite'; import type { SvelteComponent, ComponentProps } from 'svelte/types/runtime'; @@ -35,11 +36,6 @@ export type PlaywrightTestConfig = Omit( callback: (params: { app: App; hooksConfig?: HooksConfig }) => Promise ): void; diff --git a/packages/playwright-ct-vue/index.d.ts b/packages/playwright-ct-vue/index.d.ts index e3cd55a7f1..f8636036d7 100644 --- a/packages/playwright-ct-vue/index.d.ts +++ b/packages/playwright-ct-vue/index.d.ts @@ -23,6 +23,7 @@ import type { PlaywrightWorkerOptions, Locator, } from '@playwright/test'; +import type { JsonObject } from '@playwright/test/types/component'; import type { InlineConfig } from 'vite'; export type PlaywrightTestConfig = Omit, 'use'> & { @@ -34,11 +35,6 @@ export type PlaywrightTestConfig = Omit( callback: (params: { diff --git a/packages/playwright-ct-vue2/index.d.ts b/packages/playwright-ct-vue2/index.d.ts index 5f338cef3b..3ea059a04a 100644 --- a/packages/playwright-ct-vue2/index.d.ts +++ b/packages/playwright-ct-vue2/index.d.ts @@ -23,6 +23,7 @@ import type { PlaywrightWorkerOptions, Locator, } from '@playwright/test'; +import type { JsonObject } from '@playwright/test/types/component'; import type { InlineConfig } from 'vite'; export type PlaywrightTestConfig = Omit, 'use'> & { @@ -34,11 +35,6 @@ export type PlaywrightTestConfig = Omit