giniedp / webidl2ts

Converts Web IDL to Typescript (.d.ts)
MIT License
61 stars 16 forks source link

Improved iterable support #1

Closed Liamolucko closed 3 years ago

Liamolucko commented 3 years ago

I've changed the iterable logic to support async iteration and pair iterators, as well as including entries(), keys(), values(), and forEach().

giniedp commented 3 years ago

sorry, i missed that pull request. But it contains more than just extensions to the logic. It touches all lines and adds semicolons. I'll add a prettier and lint config files to avoid that.

Liamolucko commented 3 years ago

Okay, that should be fixed now.

giniedp commented 3 years ago

thx. do you have a sample file where iterables are used? What specific IDL file do you transpile? Just want to understand the problem/solution before merging it.

giniedp commented 3 years ago

think i got one. Its about cases like these https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/master/inputfiles/idl/DOM.widl#L150

i'll check the commit this evening. Thanks for your work.