Merge pull request #11379 from christophercr/master

Add interfaces for Directive scope and Component bindings
This commit is contained in:
Andy
2016-09-21 10:46:56 -07:00
committed by GitHub
+10 -2
View File
@@ -1725,7 +1725,7 @@ declare namespace angular {
* Define DOM attribute binding to component properties. Component properties are always bound to the component
* controller and not to the scope.
*/
bindings?: {[binding: string]: string};
bindings?: IComponentBindings;
/**
* Whether transclusion is enabled. Enabled by default.
*/
@@ -1739,6 +1739,10 @@ declare namespace angular {
require?: {[controller: string]: string};
}
interface IComponentBindings {
[binding: string]: string;
}
interface IComponentTemplateFn {
( $element?: JQuery, $attrs?: IAttributes ): string;
}
@@ -1827,6 +1831,10 @@ declare namespace angular {
): void | IDirectivePrePost;
}
interface IDirectiveScope {
[property: string]: string;
}
interface IDirective {
compile?: IDirectiveCompileFn;
controller?: any;
@@ -1848,7 +1856,7 @@ declare namespace angular {
replace?: boolean;
require?: string | string[] | {[controller: string]: string};
restrict?: string;
scope?: boolean | Object;
scope?: boolean | IDirectiveScope;
template?: string | Function;
templateNamespace?: string;
templateUrl?: string | Function;