Skip to content

Commit

Permalink
fix(types): make parameters non-nullable for Playwright options
Browse files Browse the repository at this point in the history
  • Loading branch information
apple-yagi committed Nov 30, 2024
1 parent 1fa16f9 commit 7b7fa53
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/browser/providers/playwright.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ declare module 'vitest/node' {
}
}

type PWHoverOptions = Parameters<Page['hover']>[1]
type PWClickOptions = Parameters<Page['click']>[1]
type PWDoubleClickOptions = Parameters<Page['dblclick']>[1]
type PWFillOptions = Parameters<Page['fill']>[2]
type PWScreenshotOptions = Parameters<Page['screenshot']>[0]
type PWSelectOptions = Parameters<Page['selectOption']>[2]
type PWDragAndDropOptions = Parameters<Page['dragAndDrop']>[2]
type PWHoverOptions = NonNullable<Parameters<Page['hover']>[1]>
type PWClickOptions = NonNullable<Parameters<Page['click']>[1]>
type PWDoubleClickOptions = NonNullable<Parameters<Page['dblclick']>[1]>
type PWFillOptions = NonNullable<Parameters<Page['fill']>[2]>
type PWScreenshotOptions = NonNullable<Parameters<Page['screenshot']>[0]>
type PWSelectOptions = NonNullable<Parameters<Page['selectOption']>[2]>
type PWDragAndDropOptions = NonNullable<Parameters<Page['dragAndDrop']>[2]>

declare module '@vitest/browser/context' {
export interface UserEventHoverOptions extends PWHoverOptions {}
Expand Down

0 comments on commit 7b7fa53

Please sign in to comment.