Update IComponentControllerService to make $scope property in locals type optional.

Update unit test
This commit is contained in:
PSL
2016-10-17 20:55:52 -04:00
parent d7f4aff454
commit 79908a23cd
2 changed files with 2 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ $componentController<{}, { test: boolean }>('Test controller', { $scope: <ng.ISc
$componentController<{}, { test?: boolean }>('Test controller', { $scope: <ng.IScope>{} }, {});
$componentController<{}, {}>('Test controller', { $scope: <ng.IScope>{} }, {}, 'identity');
$componentController<{ cb: () => void }, {}>('Test controller', { $scope: <ng.IScope>{} });
$componentController<{}, {test:{name:string}}>('Test controller', { test: {name:'Test Local'} });
///////////////////////////////////////
// IHttpBackendService

View File

@@ -107,7 +107,7 @@ declare module 'angular' {
interface IComponentControllerService {
// TBinding is an interface exposed by a component as per John Papa's style guide
// https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#accessible-members-up-top
<T, TBinding>(componentName: string, locals: { $scope: IScope, [key: string]: any }, bindings?: TBinding, ident?: string): T;
<T, TBinding>(componentName: string, locals: { $scope?: IScope, [key: string]: any }, bindings?: TBinding, ident?: string): T;
}