UNPKG

react-use-what-input

Version:
18 lines (16 loc) 621 B
declare module 'what-input' { export type WhatInputEventType = 'input' | 'intent'; export type WhatInputType = ( 'initial' | 'keyboard' | 'mouse' | 'pointer' | 'touch' ); export function ask(eventType?: WhatInputEventType): WhatInputType; export function element(): HTMLElement | null; export function ignoreKeys(keyCodes: number[]): void; export function specificKeys(keyCodes: number[]): void; export function registerOnChange(fn: (type: WhatInputType) => void, eventType?: WhatInputEventType): void; export function unRegisterOnChange(fn: (type: WhatInputType) => void): void; }