SINTEF-9012 / Proto2TypeScript

Generate TypeScript definitions from a Protocol Buffers model
MIT License
68 stars 29 forks source link

Missing Interface names in generated d.ts file #10

Open OwenOrsini opened 8 years ago

OwenOrsini commented 8 years ago

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

fungiboletus commented 8 years ago

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

OwenOrsini commented 8 years ago

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