Type definition for what for await
takes
#36153
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
I haven't found this request on the current issues so I'm opening one.
Search Terms
"for await" asynchronous generators
Suggestion
If
for await
can take both anIterable
and anAsyncIterable
then I'd like a type aliasBetter names are welcome.
Use Cases
Looking at https://tc39.es/proposal-async-iteration/#sec-createasyncfromsynciterator and after a test, if an object has both fields
Symbol.asyncIterator
andSymbol.iterator
then the former takes precedence, but that use case should rarely happen.Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: