(feature): update typescript definitions

pull/222/head
Miloserdov Andrey 5 years ago
parent 2cd56ac4cf
commit bb5f99e06f

4
index.d.ts vendored

@ -10,7 +10,7 @@ export interface KeyHandler {
(keyboardEvent: KeyboardEvent, hotkeysEvent: HotkeysEvent): void | boolean (keyboardEvent: KeyboardEvent, hotkeysEvent: HotkeysEvent): void | boolean
} }
type Options = { export type Options = {
scope?: string, scope?: string,
element?: HTMLElement | null, element?: HTMLElement | null,
keyup?: boolean | null keyup?: boolean | null
@ -47,6 +47,8 @@ interface Hotkeys {
getPressedKeyCodes(): number[] getPressedKeyCodes(): number[]
filter(event: KeyboardEvent): boolean filter(event: KeyboardEvent): boolean
addCustomKeyMap(customKeyMap: Record<string, number>): void
} }
// https://github.com/eiriklv/react-masonry-component/issues/57 // https://github.com/eiriklv/react-masonry-component/issues/57
declare var hotkeys: Hotkeys declare var hotkeys: Hotkeys

Loading…
Cancel
Save