From 3464edf89d9555ec417fe8ec2d38a57d44e4e79b Mon Sep 17 00:00:00 2001 From: sand4rt Date: Mon, 29 Aug 2022 18:10:50 +0200 Subject: [PATCH] chore(ct): svelte mount options type dedupe (#16868) --- packages/playwright-ct-svelte/index.d.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/playwright-ct-svelte/index.d.ts b/packages/playwright-ct-svelte/index.d.ts index c2eab38902..868251730a 100644 --- a/packages/playwright-ct-svelte/index.d.ts +++ b/packages/playwright-ct-svelte/index.d.ts @@ -34,23 +34,20 @@ export type PlaywrightTestConfig = Omit & { } }; +export interface MountOptions> { + props?: Props, + slots?: Record, + on?: Record, + hooksConfig?: any, +} + interface MountResult extends Locator { unmount(): Promise; } interface ComponentFixtures { - mount(component: any, options?: { - props?: { [key: string]: any }, - slots?: { [key: string]: any }, - on?: { [key: string]: Function }, - hooksConfig?: any, - }): Promise; - mount(component: any, options: { - props: Props, - slots?: { [key: string]: any }, - on?: { [key: string]: Function }, - hooksConfig?: any, - }): Promise; + mount(component: any, options?: MountOptions): Promise; + mount(component: any, options: MountOptions>): Promise; } export const test: TestType<