mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 20:37:46 -05:00
Merge branch 'master' into master-refactorJsDocTest
This commit is contained in:
11
tests/baselines/reference/forAwaitForUnion.js
Normal file
11
tests/baselines/reference/forAwaitForUnion.js
Normal file
@@ -0,0 +1,11 @@
|
||||
//// [forAwaitForUnion.ts]
|
||||
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
for await (const x of source) {
|
||||
}
|
||||
}
|
||||
|
||||
//// [forAwaitForUnion.js]
|
||||
async function f(source) {
|
||||
for await (const x of source) {
|
||||
}
|
||||
}
|
||||
15
tests/baselines/reference/forAwaitForUnion.symbols
Normal file
15
tests/baselines/reference/forAwaitForUnion.symbols
Normal file
@@ -0,0 +1,15 @@
|
||||
=== tests/cases/compiler/forAwaitForUnion.ts ===
|
||||
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
>f : Symbol(f, Decl(forAwaitForUnion.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(forAwaitForUnion.ts, 0, 17))
|
||||
>source : Symbol(source, Decl(forAwaitForUnion.ts, 0, 20))
|
||||
>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(forAwaitForUnion.ts, 0, 17))
|
||||
>AsyncIterable : Symbol(AsyncIterable, Decl(lib.esnext.asynciterable.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(forAwaitForUnion.ts, 0, 17))
|
||||
|
||||
for await (const x of source) {
|
||||
>x : Symbol(x, Decl(forAwaitForUnion.ts, 1, 20))
|
||||
>source : Symbol(source, Decl(forAwaitForUnion.ts, 0, 20))
|
||||
}
|
||||
}
|
||||
15
tests/baselines/reference/forAwaitForUnion.types
Normal file
15
tests/baselines/reference/forAwaitForUnion.types
Normal file
@@ -0,0 +1,15 @@
|
||||
=== tests/cases/compiler/forAwaitForUnion.ts ===
|
||||
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
>f : <T>(source: Iterable<T> | AsyncIterable<T>) => Promise<void>
|
||||
>T : T
|
||||
>source : Iterable<T> | AsyncIterable<T>
|
||||
>Iterable : Iterable<T>
|
||||
>T : T
|
||||
>AsyncIterable : AsyncIterable<T>
|
||||
>T : T
|
||||
|
||||
for await (const x of source) {
|
||||
>x : T
|
||||
>source : Iterable<T> | AsyncIterable<T>
|
||||
}
|
||||
}
|
||||
6
tests/cases/compiler/forAwaitForUnion.ts
Normal file
6
tests/cases/compiler/forAwaitForUnion.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// @target: esnext
|
||||
// @lib: esnext
|
||||
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
||||
for await (const x of source) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user