f494742ce9
* Added/updated tests.
* Accepted baselines.
* Update test.
* Update instantiateMappedType to work specially when 'any' replaced an array.
* Accepted baselines.
* Ensure check works when constraint is a union of arrayish types, just like in `Promise.all`.
* Accepted baselines.
* Update test for indirect instantiation of a mapped type.
* Accepted baselines.
* Update test comment.
* Accepted baselines.
* Added tuple test case.
* Accepted baselines.
* Don't add special behavior for tuples.
* Accepted baselines.
* Revert "Don't add special behavior for tuples."
This reverts commit f01ae16e65
.
* Accepted baselines.
20 lines
820 B
Plaintext
20 lines
820 B
Plaintext
=== tests/cases/compiler/promiseAllOnAny01.ts ===
|
|
async function foo(x: any) {
|
|
>foo : Symbol(foo, Decl(promiseAllOnAny01.ts, 0, 0))
|
|
>x : Symbol(x, Decl(promiseAllOnAny01.ts, 0, 19))
|
|
|
|
let abc = await Promise.all(x);
|
|
>abc : Symbol(abc, Decl(promiseAllOnAny01.ts, 1, 7))
|
|
>Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --))
|
|
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
|
>all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --))
|
|
>x : Symbol(x, Decl(promiseAllOnAny01.ts, 0, 19))
|
|
|
|
let result: any[] = abc;
|
|
>result : Symbol(result, Decl(promiseAllOnAny01.ts, 2, 7))
|
|
>abc : Symbol(abc, Decl(promiseAllOnAny01.ts, 1, 7))
|
|
|
|
return result;
|
|
>result : Symbol(result, Decl(promiseAllOnAny01.ts, 2, 7))
|
|
}
|