From eb3666328d4cd17ab16c83b2915a84d3299f7942 Mon Sep 17 00:00:00 2001 From: sand4rt Date: Tue, 13 Sep 2022 06:00:09 +0200 Subject: [PATCH] feat(ct): vue2 type-safe hook config (#17236) --- packages/playwright-ct-vue2/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/playwright-ct-vue2/index.d.ts b/packages/playwright-ct-vue2/index.d.ts index 2ddfd3246a..96a86ecb3d 100644 --- a/packages/playwright-ct-vue2/index.d.ts +++ b/packages/playwright-ct-vue2/index.d.ts @@ -34,13 +34,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?: Props; slots?: Record & { default?: Slot }; on?: Record; - hooksConfig?: any; + hooksConfig?: JsonObject; } interface MountResult> extends Locator {