mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-19 11:40:24 +08:00
angularjs: fix typings for $q.all(array)
This commit is contained in:
1 parent
0cd5f0a148
commit
18c25bcac5
2 files changed
+13
-1
No files matched your search
@@ -272,6 +272,9 @@ module TestQ {
|
||||
{
|
||||
let result: angular.IPromise<any[]>;
|
||||
result = $q.all([promiseAny, promiseAny]);
|
||||
// TS should infer that n1 and n2 are numbers and have toFixed.
|
||||
$q.all([1, $q.when(2)]).then(([ n1, n2 ]) => n1.toFixed() + n2.toFixed());
|
||||
$q.all([1, $q.when(2), '3']).then(([ n1, n2, n3 ]) => n1.toFixed() + n2.toFixed() + n3.slice(1));
|
||||
}
|
||||
{
|
||||
let result: angular.IPromise<TResult[]>;
|
||||
|
||||
Reference in new issue
Block a user