mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(ct): vue prop type of JsonObject (#21400)
This commit is contained in:
parent
86ca7e3949
commit
872b8ddbdd
18
packages/playwright-ct-vue/index.d.ts
vendored
18
packages/playwright-ct-vue/index.d.ts
vendored
@ -41,19 +41,14 @@ type JsonObject = { [Key in string]?: JsonValue };
|
||||
|
||||
type Slot = string | string[];
|
||||
|
||||
export interface MountOptions<
|
||||
HooksConfig extends JsonObject,
|
||||
Props extends Record<string, unknown>
|
||||
> {
|
||||
export interface MountOptions<HooksConfig extends JsonObject, Props extends JsonObject> {
|
||||
props?: Props;
|
||||
slots?: Record<string, Slot> & { default?: Slot };
|
||||
on?: Record<string, Function>;
|
||||
hooksConfig?: HooksConfig;
|
||||
}
|
||||
|
||||
interface MountResult<
|
||||
Props extends Record<string, unknown>
|
||||
> extends Locator {
|
||||
interface MountResult<Props extends JsonObject> extends Locator {
|
||||
unmount(): Promise<void>;
|
||||
update(options: Omit<MountOptions<never, Props>, 'hooksConfig'>): Promise<void>;
|
||||
}
|
||||
@ -67,12 +62,9 @@ export interface ComponentFixtures {
|
||||
mount(component: JSX.Element): Promise<MountResultJsx>;
|
||||
mount<HooksConfig extends JsonObject>(
|
||||
component: any,
|
||||
options?: MountOptions<HooksConfig, Record<string, unknown>>
|
||||
): Promise<MountResult<Record<string, unknown>>>;
|
||||
mount<
|
||||
HooksConfig extends JsonObject,
|
||||
Props extends Record<string, unknown> = Record<string, unknown>
|
||||
>(
|
||||
options?: MountOptions<HooksConfig, JsonObject>
|
||||
): Promise<MountResult<JsonObject>>;
|
||||
mount<HooksConfig extends JsonObject, Props extends JsonObject = JsonObject>(
|
||||
component: any,
|
||||
options: MountOptions<HooksConfig, never> & { props: Props }
|
||||
): Promise<MountResult<Props>>;
|
||||
|
||||
18
packages/playwright-ct-vue2/index.d.ts
vendored
18
packages/playwright-ct-vue2/index.d.ts
vendored
@ -41,19 +41,14 @@ type JsonObject = { [Key in string]?: JsonValue };
|
||||
|
||||
type Slot = string | string[];
|
||||
|
||||
export interface MountOptions<
|
||||
HooksConfig extends JsonObject,
|
||||
Props extends Record<string, unknown>
|
||||
> {
|
||||
export interface MountOptions<HooksConfig extends JsonObject, Props extends JsonObject> {
|
||||
props?: Props;
|
||||
slots?: Record<string, Slot> & { default?: Slot };
|
||||
on?: Record<string, Function>;
|
||||
hooksConfig?: HooksConfig;
|
||||
}
|
||||
|
||||
interface MountResult<
|
||||
Props extends Record<string, unknown>
|
||||
> extends Locator {
|
||||
interface MountResult<Props extends JsonObject> extends Locator {
|
||||
unmount(): Promise<void>;
|
||||
update(options: Omit<MountOptions<never, Props>, 'hooksConfig'>): Promise<void>;
|
||||
}
|
||||
@ -67,12 +62,9 @@ export interface ComponentFixtures {
|
||||
mount(component: JSX.Element): Promise<MountResultJsx>;
|
||||
mount<HooksConfig extends JsonObject>(
|
||||
component: any,
|
||||
options?: MountOptions<HooksConfig, Record<string, unknown>>
|
||||
): Promise<MountResult<Record<string, unknown>>>;
|
||||
mount<
|
||||
HooksConfig extends JsonObject,
|
||||
Props extends Record<string, unknown> = Record<string, unknown>
|
||||
>(
|
||||
options?: MountOptions<HooksConfig, JsonObject>
|
||||
): Promise<MountResult<JsonObject>>;
|
||||
mount<HooksConfig extends JsonObject, Props extends JsonObject = JsonObject>(
|
||||
component: any,
|
||||
options: MountOptions<HooksConfig, never> & { props: Props }
|
||||
): Promise<MountResult<Props>>;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user