From 0aa772c53fa6bf700f5ddce007871260297001f3 Mon Sep 17 00:00:00 2001 From: Brendon Colburn Date: Mon, 28 Mar 2016 08:58:10 -0400 Subject: [PATCH] Overload for custom scope interfaces I recently came up with this solution so I could leverage my custom scope when grabbing the scope from a controller using angular.element. It works well and with the it ensures that you can only set it to an interface that extends IScope. --- angularjs/angular.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 6d72c4e2d..e86fd3705 100644 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -1845,6 +1845,11 @@ declare namespace angular { controller(name: string): any; injector(): any; scope(): IScope; + + /** + * Overload for custom scope interfaces + */ + scope(): T; isolateScope(): IScope; inheritedData(key: string, value: any): JQuery;