cloudflare / workers-types

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

Include C++ parameter names in types generated from JSG RTTI #305

Closed mrbbot closed 1 year ago

mrbbot commented 1 year ago

Parameter names are discarded at C++ compile time so we can't get them from RTTI. We'd still like to use the C++ parameter names in our TypeScript types though, so we need a solution. Speaking with @mikea, we agreed the best solution is probably to write a separate script that parses and dumps the parameter names for all function definitions in https://github.com/cloudflare/workerd/tree/main/src/workerd/api into a Cap’n Proto file. We could then join this up with the RTTI when generating TypeScript types.

caass commented 1 year ago

@mrbbot can we close this?

mrbbot commented 1 year ago

Yep!