From f61d3c9cc441d1a6af16d295b8afe82361fc4a9a Mon Sep 17 00:00:00 2001 From: sand4rt Date: Tue, 13 Sep 2022 06:00:41 +0200 Subject: [PATCH] feat(ct): svelte type-safe hook config (#17237) --- packages/playwright-ct-svelte/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/playwright-ct-svelte/index.d.ts b/packages/playwright-ct-svelte/index.d.ts index f98097a39c..16f0f9f05a 100644 --- a/packages/playwright-ct-svelte/index.d.ts +++ b/packages/playwright-ct-svelte/index.d.ts @@ -35,13 +35,18 @@ export type PlaywrightTestConfig = Omit & { } }; +type JsonPrimitive = string | number | boolean | null; +type JsonValue = JsonPrimitive | JsonObject | JsonArray; +type JsonArray = JsonValue[]; +type JsonObject = { [Key in string]?: JsonValue }; + type Slot = string | string[]; export interface MountOptions { props?: ComponentProps; slots?: Record & { default?: Slot }; on?: Record; - hooksConfig?: any; + hooksConfig?: JsonObject; } interface MountResult extends Locator {