Proto2TypeScript icon indicating copy to clipboard operation
Proto2TypeScript copied to clipboard

Missing Interface names in generated d.ts file

Open OwenOrsini opened this issue 9 years ago • 2 comments

When generating the types for a proto file that has extensions that reference the message that extends the generated typescript contains errors and I'm unable to include the types in my ts scripts.

I've included a simple .proto the json from the proto file and the generated types test_generation.zip

OwenOrsini avatar Jun 07 '16 21:06 OwenOrsini

Hi. I unfortunately don't have time to investigate and fix the problem now. Maybe someone else has a solution.

fungiboletus avatar Jun 08 '16 07:06 fungiboletus

Looks like the problem is that the json message object created for an extension has a 'ref' property but no 'name' property which is what the Dust.js template is looking for.

The quick fix is the add the 'name' property with the value of the 'ref' property. I'd make a pull request if I had permissions on github

OwenOrsini avatar Jun 08 '16 22:06 OwenOrsini