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.
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.