mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Update IComponentControllerService to make $scope property in locals type optional.
Update unit test
This commit is contained in:
@@ -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
|
||||
|
||||
2
angular-mocks/index.d.ts
vendored
2
angular-mocks/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user