I'm trying to wrap my head around Typescript, AngularJS, and the ngMock portion. I've seen code to inject a module at the beginning of a unit test like this.
beforeEach(angular.mock.module("myApp"));
I need to provide another service so this works:
beforeEach(module("myApp", function($provide) {
$provide.value("myService", {
...
});
}));
But if I did
beforeEach(angular.mock.module("myApp", function($provide) {
$provide.value("myService", {
...
});
}));
The Typescript compiler complains that angular.mock.module only takes one argument. So in the first snippet above, what module is it using? When I go to the definition, it says in the angular-mocks.d.ts:
declare var module: (...modules: any[]) => any;
So what is going on here? I'm not sure if I understand the notation in the definition file to understand if angular.mock.module and module are used the same. Can someone explain this to me?