hermes
hermes copied to clipboard
Hermes async iterators support
I have a file stream that I would like to iterate:
for await (const chunk of fileStream) {
console.log(`Received chunk of size ${chunk.length}: ${chunk}`);
}
However, I get the following error:
Object is not async iterable
Does hermes support async iterators?
I use:
"react-native": "0.83.1",
"react": "19.2.1",
This is not an error message generated by Hermes. In React Native the source code is transformed with Babel before it gets to Hermes. Specifically, async generators are transpiled. You can examine the actual generated source that runs.
The error itself does not seem to indicate lack of support for async generators but rather that Symbol.asyncIterator is not present in the object.