This repository was archived by the owner on Oct 8, 2024. It is now read-only.
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
Awaiting of IteratorValue
in %AsyncIteratorPrototype%
methods #168
Closed
Description
See the original issue in the Array.fromAsync
proposal. The same is applicable to %AsyncIteratorPrototype%
methods.
const i = 0;
await AsyncIterator.from(it = {
[Symbol.asyncIterator]() {
return {
async next() {
if (i > 2) return { done: true };
i++;
return { value: Promise.resolve(i), done: false }
}
}
}
}).toArray(); // => ???
I think that it should be agreed upon between both proposals.
Metadata
Metadata
Assignees
Labels
No labels