observable icon indicating copy to clipboard operation
observable copied to clipboard

Spec `from()` static converter

Open keithamus opened this issue 1 year ago • 5 comments

This fixes #159 by specifying the semantics of from(), while also then using that algorithm in takeUntil().


Preview | Diff

keithamus avatar Jul 21 '24 22:07 keithamus

Thanks so much for adding this! It's been on my plate but alas I've not gotten to it yet. One thing is that we won't be able to land this without WPTs, so if you feel like writing those that would be great, otherwise I'm happy to do so, just FYI I am OOO for a bit coming up soon.

domfarolino avatar Jul 22 '24 02:07 domfarolino

The ReadableStream.from spec is in the process of being changed to use the newly introduced async iterable WebIDL type, so Observable.from should be similarly specified. https://github.com/whatwg/streams/pull/1310

petamoriken avatar Aug 02 '24 17:08 petamoriken

I've started to revamp this a little bit to make sure the really subtle semantics of [Symbol.iterator] method access and how we deal with various values of that method's record match (a) the existing tests as well as (b) a bunch of new ones I'm adding in https://chromium-review.googlesource.com/c/chromium/src/+/5824955.

domfarolino avatar Aug 29 '24 02:08 domfarolino

@benlesh Can you make a WPT PR with tests for the cases you're describing please?

domfarolino avatar Aug 29 '24 19:08 domfarolino

@domfarolino :) It was in-process while you were typing that: https://github.com/web-platform-tests/wpt/pull/47874

benlesh avatar Aug 29 '24 19:08 benlesh