forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-hotkeys.d.ts
50 lines (35 loc) · 1.75 KB
/
angular-hotkeys.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Type definitions for angular-hotkeys
// Project: https://github.com/chieffancypants/angular-hotkeys
// Definitions by: Jason Zhao <https://github.com/jlz27>, Stefan Steinhart <https://github.com/reppners>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare namespace angular.hotkeys {
interface HotkeysProvider {
template: string;
templateTitle:string;
includeCheatSheet: boolean;
cheatSheetHotkey: string;
cheatSheetDescription: string;
add(combo: string|string[], callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
add(combo: string|string[], description: string, callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
add(hotkeyObj: ng.hotkeys.Hotkey): ng.hotkeys.Hotkey;
bindTo(scope : ng.IScope): ng.hotkeys.HotkeysProviderChained;
del(combo: string|string[]): void;
del(hotkeyObj: ng.hotkeys.Hotkey): void;
get(combo: string|string[]): ng.hotkeys.Hotkey;
toggleCheatSheet(): void;
purgeHotkeys(): void;
}
interface HotkeysProviderChained {
add(combo: string|string[], description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained;
add(hotkeyObj: ng.hotkeys.Hotkey): HotkeysProviderChained;
}
interface Hotkey {
combo: string|string[];
description?: string;
callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void;
action?: string;
allowIn?: Array<string>;
persistent?: boolean;
}
}