mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
312 B
TypeScript
16 lines
312 B
TypeScript
//// [tests/cases/compiler/forAwaitForUnion.ts] ////
|
|
|
|
//// [forAwaitForUnion.ts]
|
|
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
|
for await (const x of source) {
|
|
}
|
|
}
|
|
|
|
|
|
//// [forAwaitForUnion.js]
|
|
"use strict";
|
|
async function f(source) {
|
|
for await (const x of source) {
|
|
}
|
|
}
|