mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(ct): vue jsx mount options type (#26566)
This commit is contained in:
parent
41c312cd04
commit
06d2e7d480
9
packages/playwright-ct-vue/index.d.ts
vendored
9
packages/playwright-ct-vue/index.d.ts
vendored
@ -53,6 +53,10 @@ export interface MountOptions<HooksConfig extends JsonObject, Component> {
|
||||
hooksConfig?: HooksConfig;
|
||||
}
|
||||
|
||||
export interface MountOptionsJsx<HooksConfig extends JsonObject> {
|
||||
hooksConfig?: HooksConfig;
|
||||
}
|
||||
|
||||
interface MountResult<Component> extends Locator {
|
||||
unmount(): Promise<void>;
|
||||
update(options: {
|
||||
@ -68,7 +72,10 @@ interface MountResultJsx extends Locator {
|
||||
}
|
||||
|
||||
export interface ComponentFixtures {
|
||||
mount(component: JSX.Element): Promise<MountResultJsx>;
|
||||
mount<HooksConfig extends JsonObject>(
|
||||
component: JSX.Element,
|
||||
options: MountOptionsJsx<HooksConfig>
|
||||
): Promise<MountResultJsx>;
|
||||
mount<HooksConfig extends JsonObject, Component = unknown>(
|
||||
component: Component,
|
||||
options?: MountOptions<HooksConfig, Component>
|
||||
|
||||
9
packages/playwright-ct-vue2/index.d.ts
vendored
9
packages/playwright-ct-vue2/index.d.ts
vendored
@ -53,6 +53,10 @@ export interface MountOptions<HooksConfig extends JsonObject, Component> {
|
||||
hooksConfig?: HooksConfig;
|
||||
}
|
||||
|
||||
export interface MountOptionsJsx<HooksConfig extends JsonObject> {
|
||||
hooksConfig?: HooksConfig;
|
||||
}
|
||||
|
||||
interface MountResult<Component> extends Locator {
|
||||
unmount(): Promise<void>;
|
||||
update(options: {
|
||||
@ -68,7 +72,10 @@ interface MountResultJsx extends Locator {
|
||||
}
|
||||
|
||||
export interface ComponentFixtures {
|
||||
mount(component: JSX.Element): Promise<MountResultJsx>;
|
||||
mount<HooksConfig extends JsonObject>(
|
||||
component: JSX.Element,
|
||||
options?: MountOptionsJsx<HooksConfig>
|
||||
): Promise<MountResultJsx>;
|
||||
mount<HooksConfig extends JsonObject, Component = unknown>(
|
||||
component: Component,
|
||||
options?: MountOptions<HooksConfig, Component>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user