goja icon indicating copy to clipboard operation
goja copied to clipboard

Symbol.asyncIterator support

Open bubbajoe opened this issue 1 year ago • 2 comments

Hello,

I am trying to implement ReadableStream.values async iterator function, but I can't seem to get it to work. I noticed that Symbol.asyncIterator is in the blacklist features for tests. So I have two questions:

  • Is there any plan to add Symbol.asyncIterator support?

  • Is there a way to implement this without the goja's explicit support?

Thanks

bubbajoe avatar Mar 03 '24 15:03 bubbajoe

Hi,

  • Is there any plan to add Symbol.asyncIterator support?

Yes, but not in the near future I'm afraid.

  • Is there a way to implement this without the goja's explicit support?

Not without a transpiler, you may try https://babeljs.io/docs/babel-plugin-transform-async-generator-functions

dop251 avatar Mar 05 '24 17:03 dop251

Yes, but not in the near future I'm afraid.

I wouldn't mind trying to tackle this myself; if you could give me a quick summary of the challenge; I would like to at least give it a try.

bubbajoe avatar Apr 13 '24 06:04 bubbajoe