Closed
Description
TypeScript Version: nightly (2.4.0-dev.20170530)
Code
async function f<T>(source: Iterable<T> | AsyncIterable<T>) {
for await (const x of source) {
}
}
Expected behavior:
x
has type T
Actual behavior:
error TS2504: Type must have a '[Symbol.asyncIterator]()' method that returns an async iterator.