AngularJS: make IDirective.link() arguments optional

This commit is contained in:
Michael Cox
2014-01-27 16:52:01 +00:00
parent 2806d81cae
commit 0645d5c6f5

View File

@@ -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;