OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/frontend/typings/globals/mousetrap/index.d.ts

30 lines
1.1 KiB

// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/347311a5f0c374a05b43b98286933ccc03542f8b/mousetrap/index.d.ts
interface ExtendedKeyboardEvent extends KeyboardEvent {
returnValue: boolean; // IE returnValue
}
interface MousetrapStatic {
(el: Element): MousetrapInstance;
new (el: Element): MousetrapInstance;
stopCallback: (e: ExtendedKeyboardEvent, element: Element, combo: string) => boolean;
bind(keys: string|string[], callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void;
unbind(keys: string|string[], action?: string): void;
trigger(keys: string, action?: string): void;
reset(): void;
}
interface MousetrapInstance {
stopCallback: (e: ExtendedKeyboardEvent, element: Element, combo: string) => boolean;
bind(keys: string|string[], callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void;
unbind(keys: string|string[], action?: string): void;
trigger(keys: string, action?: string): void;
reset(): void;
}
declare var Mousetrap: MousetrapStatic;
declare module "mousetrap" {
export = Mousetrap;
}