DefinitelyTyped/types/user-event/index.d.ts
Weyert de Boer cfc586791d Updated type defs for @testing-library/user-event (#36444)
* 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
2019-06-26 13:51:22 +01:00

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;