mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-14 17:44:33 +00:00
angularjs: allow $q.when to be called w/o args
The current definition does not cover the case that the input type is void.
This commit is contained in:
@@ -139,6 +139,12 @@ module HttpAndRegularPromiseTests {
|
||||
dPromise.then((snack: string) => {
|
||||
$scope.snack = snack;
|
||||
});
|
||||
|
||||
// $q.when may be called without arguments
|
||||
var ePromise: ng.IPromise<Person> = $q.when();
|
||||
ePromise.then(() => {
|
||||
$scope.nothing = "really nothing";
|
||||
});
|
||||
}
|
||||
|
||||
// Test that we can pass around a type-checked success/error Promise Callback
|
||||
|
||||
Reference in New Issue
Block a user