From 0645d5c6f5a134a85939f08feff05d8a78ea1aa9 Mon Sep 17 00:00:00 2001 From: Michael Cox Date: Mon, 27 Jan 2014 16:52:01 +0000 Subject: [PATCH] AngularJS: make IDirective.link() arguments optional --- angularjs/angular.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 061575166b..f3e7dc0001 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -748,12 +748,14 @@ declare module ng { ) => any; controller?: any; controllerAs?: string; + // A link function with no arguments is perfectly valid; the norm seems + // to be passing the scope, element and attributes. link?: - (scope: IScope, - instanceElement: IAugmentedJQuery, - instanceAttributes: IAttributes, - controller: any, - transclude: ITranscludeFunction + (scope?: IScope, + instanceElement?: IAugmentedJQuery, + instanceAttributes?: IAttributes, + controller?: any, + transclude?: ITranscludeFunction ) => void; name?: string; priority?: number;