cloudflare / workers-types

TypeScript type definitions for authoring Cloudflare Workers.
BSD 3-Clause "New" or "Revised" License
359 stars 89 forks source link

Supplementary WebIDL? #248

Closed alexdoesh closed 1 year ago

alexdoesh commented 2 years ago

Any chance you folks also generate *.webidl for the whole Cloudflare Workers runtime somewhere internally? Would be great to have the entire ecosystem available for CF workers customers as webidl(s), workers-types doesn't cover all available in CF worker WebAPIs (or maybe you have a full json schema as a substitution for webidl?), seems like I'd need to merge chromium's webidls and your json schema to get the full representation of the CF workers runtime, and you don't have 1:1 exposure iirc.

Sorry if this is a wrong repo for such issue. I was sure I've seen it before in one of your repositories, cannot find now, only JSON schema and related *.d.ts definitions.

mrbbot commented 1 year ago

Hey! 👋 Thanks for the suggestion. I think it's unlikely we'll do this. The new types system we're working on generates TypeScript directly rather than going through a custom intermediate representation. To support this feature, we'd need to convert TypeScript to WebIDL. Is there a specific reason you'd like WebIDLs? 🙂

mrbbot commented 1 year ago

I'm going to close this for the reasons mentioned above. If there are specific reasons you'd like this, please create a new issue in the workerd repository. This will be the home for @cloudflare/workers-types going forward.