You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…but I think it's worth providing the named method for ergonomics.
However, I can't see a way in IDL to declare a method that returns an async iterator like this. I guess I could call the @@asynciterator directly, but that seems not-how-we-usually-do-things.
The text was updated successfully, but these errors were encountered:
Async iterators can take arguments! So there's no need for matchAll(); you can just use self.systemFonts[Symbol.asyncIterator]({ name: 'foo' }), or self.systemFonts.values({ name: 'foo' }). This is done in IDL by using the syntax
Ohhh, self.systemFonts.values({ name: 'foo' }) provides the ergonomics I was looking for. I felt self.systemFonts[Symbol.asyncIterator]({ name: 'foo' }) was too ugly.
Sorry @domenic, I think I need your help on this one.
If we were to solve #27, I'd go for an API like:
In this case:
…is an alias of:
But
matchAll
provides the ability to query:You could also do:
…but I think it's worth providing the named method for ergonomics.
However, I can't see a way in IDL to declare a method that returns an async iterator like this. I guess I could call the
@@asynciterator
directly, but that seems not-how-we-usually-do-things.The text was updated successfully, but these errors were encountered: