Sha256: 202042eccb4789b7dee51ba9ecab0b854834ea5c1d6a3946504bfc733d4468c3
Contents?: true
Size: 1.64 KB
Versions: 26
Compression:
Stored size: 1.64 KB
Contents
import { dispatchEvent, dispatchUIEvent } from '../event'; import { Options } from '../options'; import { System } from '../system'; import { userEventApi } from './api'; import { DirectOptions } from './directApi'; export type UserEventApi = typeof userEventApi; export type UserEvent = { readonly setup: (...args: Parameters<typeof setupSub>) => UserEvent; } & { readonly [k in keyof UserEventApi]: (...args: Parameters<UserEventApi[k]>) => ReturnType<UserEventApi[k]>; }; export type Instance = UserEventApi & { config: Config; dispatchEvent: OmitThisParameter<typeof dispatchEvent>; dispatchUIEvent: OmitThisParameter<typeof dispatchUIEvent>; system: System; levelRefs: Record<number, object | undefined>; }; export type Config = Required<Options>; export declare function createConfig(options?: Options, defaults?: Required<Options>, node?: Node): Config; /** * Start a "session" with userEvent. * All APIs returned by this function share an input device state and a default configuration. */ export declare function setupMain(options?: Options): UserEvent; /** * Setup in direct call per `userEvent.anyApi()` */ export declare function setupDirect({ keyboardState, pointerState, ...options }?: DirectOptions & { keyboardState?: System; pointerState?: System; }, // backward-compatibility node?: Node): { api: UserEvent; system: System; }; /** * Create a set of callbacks with different default settings but the same state. */ export declare function setupSub(this: Instance, options: Options): UserEvent; export declare function createInstance(config: Config, system?: System): { instance: Instance; api: UserEvent; };
Version data entries
26 entries across 26 versions & 1 rubygems