feat(ct): svelte type-safe hook config (#17237)
This commit is contained in:
parent
eb3666328d
commit
f61d3c9cc4
7
packages/playwright-ct-svelte/index.d.ts
vendored
7
packages/playwright-ct-svelte/index.d.ts
vendored
|
|
@ -35,13 +35,18 @@ export type PlaywrightTestConfig = Omit<BasePlaywrightTestConfig, 'use'> & {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type JsonPrimitive = string | number | boolean | null;
|
||||||
|
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
||||||
|
type JsonArray = JsonValue[];
|
||||||
|
type JsonObject = { [Key in string]?: JsonValue };
|
||||||
|
|
||||||
type Slot = string | string[];
|
type Slot = string | string[];
|
||||||
|
|
||||||
export interface MountOptions<Component extends SvelteComponent> {
|
export interface MountOptions<Component extends SvelteComponent> {
|
||||||
props?: ComponentProps<Component>;
|
props?: ComponentProps<Component>;
|
||||||
slots?: Record<string, Slot> & { default?: Slot };
|
slots?: Record<string, Slot> & { default?: Slot };
|
||||||
on?: Record<string, Function>;
|
on?: Record<string, Function>;
|
||||||
hooksConfig?: any;
|
hooksConfig?: JsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MountResult extends Locator {
|
interface MountResult extends Locator {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue