angularjs - Switched any to generics for type safety.

See https://github.com/Microsoft/TypeScript/issues/4126
This commit is contained in:
Ciuca, Alexandru
2015-08-04 10:57:41 +03:00
parent b0d313e1b1
commit 3e2a590f8f
2 changed files with 11 additions and 14 deletions
Executable → Regular
+2 -2
View File
@@ -30,7 +30,7 @@ class AuthService {
'$rootScope', '$injector', <any>function($rootScope: ng.IScope, $injector: ng.auto.IInjectorService) {
var $http: ng.IHttpService; //initialized later because of circular dependency problem
function retry(config: ng.IRequestConfig, deferred: ng.IDeferred<any>) {
$http = $http || $injector.get('$http');
$http = $http || $injector.get<ng.IHttpService>('$http');
$http(config).then(function (response) {
deferred.resolve(response);
});
@@ -285,7 +285,7 @@ test_IAttributes({
$addClass: function (classVal){},
$removeClass: function(classVal){},
$set: function(key, value){},
$observe: function(name, fn){
$observe: function(name: any, fn: any){
return fn;
},
$attr: {}