diff --git a/src/utils/click/getMouseEventOptions.ts b/src/utils/click/getMouseEventOptions.ts index 6569c9e3..d798a151 100644 --- a/src/utils/click/getMouseEventOptions.ts +++ b/src/utils/click/getMouseEventOptions.ts @@ -22,7 +22,7 @@ const BUTTON_NAMES = { secondary: 2, } as const -function translateButtonNumber(value: number, from: 'buttons' | 'button') { +function translateButtonNumber(value: number, from: 'button' | 'buttons') { const [mapIn, mapOut] = from === 'button' ? [BUTTON_NAMES, BUTTONS_NAMES] @@ -39,7 +39,7 @@ function translateButtonNumber(value: number, from: 'buttons' | 'button') { function convertMouseButtons( event: string, init: MouseEventInit, - property: 'buttons' | 'button', + property: 'button' | 'buttons', ): number { if (!isMousePressEvent(event)) { return 0 diff --git a/typings/index.d.ts b/typings/index.d.ts index 4c032c7c..3d4ae385 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -36,12 +36,12 @@ declare const userEvent: { ) => void selectOptions: ( element: TargetElement, - values: string | string[] | HTMLElement | HTMLElement[], + values: HTMLElement | HTMLElement[] | string[] | string, init?: MouseEventInit, ) => void deselectOptions: ( element: TargetElement, - values: string | string[] | HTMLElement | HTMLElement[], + values: HTMLElement | HTMLElement[] | string[] | string, init?: MouseEventInit, ) => void upload: (