Closed zloirock closed 3 years ago
for await (const it of [Promise.resolve(1), 2, Promise.resolve(3)]) console.log(it); // => 1, 2, 3 await AsyncIterator.from([Promise.resolve(1), 2, Promise.resolve(3)]).toArray(); // => [1, 2, 3] // but: await Array.fromAsync([Promise.resolve(1), 2, Promise.resolve(3)]); // => TypeError
This is an oversight. Thanks for catching it. I will fix it in the future.