6 lines
No EOL
145 B
TypeScript
6 lines
No EOL
145 B
TypeScript
// @target: esnext
|
|
// @lib: esnext
|
|
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
|
|
for await (const x of source) {
|
|
}
|
|
} |