mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
angularjs: fix typings for $q.all(array)
This commit is contained in:
@@ -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