mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* fix: updated the type definitions for @testing-library/user-event * just make changes to testing-library__user-event * take 2 * updated type defs * cleaned up formatting * fix naming * attempt to fix the type defs * chore: updated tsconfig.json * remove whitespace * fix whitespace * chore: attempt to fix both user-event packages * chore: formatting code
20 lines
630 B
TypeScript
20 lines
630 B
TypeScript
// Type definitions for user-event 4.1
|
|
// Project: https://github.com/testing-library/user-event
|
|
// Definitions by: Wu Haotian <https://github.com/whtsky>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export interface UserOpts {
|
|
allAtOnce?: boolean;
|
|
delay?: number;
|
|
}
|
|
declare const userEvent: {
|
|
click: (element: Element | Window) => void;
|
|
dblClick: (element: Element | Window) => void;
|
|
|
|
selectOptions: (element: Element | Window, values: string | string[]) => void;
|
|
|
|
type: (element: Element | Window, text: string, userOpts?: UserOpts) => Promise<void>;
|
|
};
|
|
|
|
export default userEvent;
|