mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
12 lines
589 B
TypeScript
12 lines
589 B
TypeScript
import userEvent, { UserOpts } from "user-event";
|
|
|
|
userEvent.click(document.body); // $ExpectType void
|
|
userEvent.dblClick(window); // $ExpectType void
|
|
userEvent.type(document.body, "s"); // $ExpectType Promise<void>
|
|
userEvent.type(document.body, "s", {}); // $ExpectType Promise<void>
|
|
userEvent.type(document.body, "s", { delay: 5000 }); // $ExpectType Promise<void>
|
|
userEvent.type(document.body, "s", { allAtOnce: true }); // $ExpectType Promise<void>
|
|
userEvent.type(document.body, "s", { delay: 1000, allAtOnce: false }); // $ExpectType Promise<void>
|
|
|
|
const u: UserOpts = { delay: 20 };
|