mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-27 06:22:55 +08:00
Merge pull request #3581 from reppners/angular-hotkeys
+ enhanced existing typedefinitions by looking at source code of angular...
This commit is contained in:
16
angular-hotkeys/angular-hotkeys.d.ts
vendored
16
angular-hotkeys/angular-hotkeys.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for angular-hotkeys
|
||||
// Project: https://github.com/chieffancypants/angular-hotkeys
|
||||
// Definitions by: Jason Zhao <https://github.com/jlz27>
|
||||
// Definitions by: Jason Zhao <https://github.com/jlz27>, Stefan Steinhart <https://github.com/reppners>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
@@ -9,21 +9,28 @@ declare module ng.hotkeys {
|
||||
|
||||
interface HotkeysProvider {
|
||||
template: string;
|
||||
templateTitle:string;
|
||||
includeCheatSheet: boolean;
|
||||
cheatSheetHotkey: string;
|
||||
cheatSheetDescription: string;
|
||||
|
||||
add(combo: string, description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): void;
|
||||
add(combo: string, callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array<string>, persistent?: boolean): ng.hotkeys.Hotkey;
|
||||
|
||||
add(hotkeyObj: ng.hotkeys.Hotkey): void;
|
||||
add(combo: 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): void;
|
||||
|
||||
del(hotkeyObj: ng.hotkeys.Hotkey): void;
|
||||
|
||||
get(combo: string): ng.hotkeys.Hotkey;
|
||||
|
||||
toggleCheatSheet(): void;
|
||||
|
||||
purgeHotkeys(): void;
|
||||
}
|
||||
|
||||
interface HotkeysProviderChained {
|
||||
@@ -36,5 +43,8 @@ declare module ng.hotkeys {
|
||||
combo: string;
|
||||
description?: string;
|
||||
callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void;
|
||||
action?: string;
|
||||
allowIn?: Array<string>;
|
||||
persistent?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user