mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
angularjs - Switched any to generics for type safety.
See https://github.com/Microsoft/TypeScript/issues/4126
This commit is contained in:
Executable → Regular
+2
-2
@@ -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: {}
|
||||
|
||||
Reference in New Issue
Block a user