feat(ct): type-safe hook config (#17232)
This commit is contained in:
parent
cb10ef3c71
commit
d85d615846
7
packages/playwright-ct-react/index.d.ts
vendored
7
packages/playwright-ct-react/index.d.ts
vendored
|
|
@ -34,8 +34,13 @@ 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 };
|
||||||
|
|
||||||
export interface MountOptions {
|
export interface MountOptions {
|
||||||
hooksConfig?: any;
|
hooksConfig?: JsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MountResult extends Locator {
|
interface MountResult extends Locator {
|
||||||
|
|
|
||||||
7
packages/playwright-ct-solid/index.d.ts
vendored
7
packages/playwright-ct-solid/index.d.ts
vendored
|
|
@ -34,8 +34,13 @@ 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 };
|
||||||
|
|
||||||
export interface MountOptions {
|
export interface MountOptions {
|
||||||
hooksConfig?: any;
|
hooksConfig?: JsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MountResult extends Locator {
|
interface MountResult extends Locator {
|
||||||
|
|
|
||||||
7
packages/playwright-ct-vue/index.d.ts
vendored
7
packages/playwright-ct-vue/index.d.ts
vendored
|
|
@ -34,13 +34,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<Props = Record<string, unknown>> {
|
export interface MountOptions<Props = Record<string, unknown>> {
|
||||||
props?: Props,
|
props?: Props,
|
||||||
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<Props = Record<string, unknown>> extends Locator {
|
interface MountResult<Props = Record<string, unknown>> extends Locator {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue