feat(ct): typesafe mount props (#15445)

This commit is contained in:
sand4rt 2022-07-07 20:23:58 +02:00 committed by GitHub
parent bc4463c472
commit a41a25e07b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -35,8 +35,8 @@ export type PlaywrightTestConfig = Omit<BasePlaywrightTestConfig, 'use'> & {
};
interface ComponentFixtures {
mount(component: any, options?: {
props?: { [key: string]: any },
mount<Props = { [key: string]: any }>(component: any, options?: {
props?: Props,
slots?: { [key: string]: any },
on?: { [key: string]: Function },
}): Promise<Locator>;

View File

@ -36,8 +36,8 @@ export type PlaywrightTestConfig = Omit<BasePlaywrightTestConfig, 'use'> & {
interface ComponentFixtures {
mount(component: JSX.Element): Promise<Locator>;
mount(component: any, options?: {
props?: { [key: string]: any },
mount<Props = { [key: string]: any }>(component: any, options?: {
props?: Props,
slots?: { [key: string]: any },
on?: { [key: string]: Function },
}): Promise<Locator>;

View File

@ -36,8 +36,8 @@ export type PlaywrightTestConfig = Omit<BasePlaywrightTestConfig, 'use'> & {
interface ComponentFixtures {
mount(component: JSX.Element): Promise<Locator>;
mount(component: any, options?: {
props?: { [key: string]: any },
mount<Props = { [key: string]: any }>(component: any, options?: {
props?: Props,
slots?: { [key: string]: any },
on?: { [key: string]: Function },
}): Promise<Locator>;