protobuf.js icon indicating copy to clipboard operation
protobuf.js copied to clipboard

pbts produces incorrect typings for `message Object`

Open alexander-fenster opened this issue 5 months ago • 0 comments

If a proto has message Object, the following code in pbts will emit lowercase object in the types, which won't compile.

https://github.com/protobufjs/protobuf.js/blob/2f846fe09c1e4033bdfb63ea622a63dc7ae559db/cli/lib/tsd-jsdoc/publish.js#L298-L300

The resulting strings in the generated .d.ts will look like whatever.package.name.object instead of whatever.package.name.Object.

I believe the conversion from Object to object should not happen if there is a preceding . before Object, but I need to spend more time figuring out if it would be the proper fix.

alexander-fenster avatar Feb 27 '24 20:02 alexander-fenster