From a583963da3e3b91df3be96922329629fd300b7ed Mon Sep 17 00:00:00 2001 From: reppners Date: Mon, 2 Feb 2015 12:12:34 +0100 Subject: [PATCH 1/3] + enhanced existing typedefinitions by looking at source code of angular-hotkeys to identify missing pieces --- angular-hotkeys/angular-hotkeys.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/angular-hotkeys/angular-hotkeys.d.ts b/angular-hotkeys/angular-hotkeys.d.ts index f209fbe08..63085fc03 100644 --- a/angular-hotkeys/angular-hotkeys.d.ts +++ b/angular-hotkeys/angular-hotkeys.d.ts @@ -9,13 +9,16 @@ 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, 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, persistent?: boolean): ng.hotkeys.Hotkey; + + add(hotkeyObj: ng.hotkeys.Hotkey): ng.hotkeys.Hotkey; bindTo(scope : ng.IScope): ng.hotkeys.HotkeysProviderChained; @@ -24,6 +27,8 @@ declare module ng.hotkeys { get(combo: string): ng.hotkeys.Hotkey; toggleCheatSheet(): void; + + purgeHotkeys(): void; } interface HotkeysProviderChained { @@ -36,5 +41,8 @@ declare module ng.hotkeys { combo: string; description?: string; callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void; + action?: string; + allowIn?: Array; + persistent?: boolean; } } From 57708d0b2416820cb7946a3ffb467d32fa1616fb Mon Sep 17 00:00:00 2001 From: reppners Date: Mon, 2 Feb 2015 14:56:52 +0100 Subject: [PATCH 2/3] + added additional overload for del() --- angular-hotkeys/angular-hotkeys.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/angular-hotkeys/angular-hotkeys.d.ts b/angular-hotkeys/angular-hotkeys.d.ts index 63085fc03..60ffc2bfb 100644 --- a/angular-hotkeys/angular-hotkeys.d.ts +++ b/angular-hotkeys/angular-hotkeys.d.ts @@ -24,6 +24,8 @@ declare module ng.hotkeys { del(combo: string): void; + del(hotkeyObj: ng.hotkeys.Hotkey): void; + get(combo: string): ng.hotkeys.Hotkey; toggleCheatSheet(): void; From 6aefcc0fd9935befd11d76001753354d50d68729 Mon Sep 17 00:00:00 2001 From: reppners Date: Wed, 4 Feb 2015 21:23:37 +0100 Subject: [PATCH 3/3] + added author --- angular-hotkeys/angular-hotkeys.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-hotkeys/angular-hotkeys.d.ts b/angular-hotkeys/angular-hotkeys.d.ts index 60ffc2bfb..63da273ce 100644 --- a/angular-hotkeys/angular-hotkeys.d.ts +++ b/angular-hotkeys/angular-hotkeys.d.ts @@ -1,6 +1,6 @@ // Type definitions for angular-hotkeys // Project: https://github.com/chieffancypants/angular-hotkeys -// Definitions by: Jason Zhao +// Definitions by: Jason Zhao , Stefan Steinhart // Definitions: https://github.com/borisyankov/DefinitelyTyped ///