UNPKG

530 BTypeScriptView Raw
1// Definitions by: Wu Haotian <https://github.com/whtsky>
2export interface IUserOptions {
3 allAtOnce?: boolean;
4 delay?: number;
5}
6
7type TargetElement = Element | Window;
8
9declare const userEvent: {
10 click: (element: TargetElement) => void;
11 dblClick: (element: TargetElement) => void;
12 selectOptions: (element: TargetElement, values: string | string[]) => void;
13 type: (
14 element: TargetElement,
15 text: string,
16 userOpts?: IUserOptions
17 ) => Promise<void>;
18};
19
20export default userEvent;