There are methods defined on the base protobuf Message class which conflict with the default getter/setter methods. The protoc compiler works around this by adding a '$' suffix to the methods so there are no conflicts, however ts-protoc-gen doesn't use the same algorithm.
What happened
Typescript types for field named 'extension' are incorrect. The base message class has methods 'getExtension' and 'setExtension' and so the protoc compiler adds a '$' suffix on the getter/setter method names to not conflict.
What you expected to happen
Types to match the generated JS code from protoc.
How to reproduce it (as minimally and precisely as possible):
Create a simple message:
Run the protoc compiler and ts-protoc-gen. Notice that the typescript types have conflicting methods 'getExtension', 'setExtension', 'getJsPbMessageId', 'setJsPbMessageId'
There are methods defined on the base protobuf Message class which conflict with the default getter/setter methods. The protoc compiler works around this by adding a '$' suffix to the methods so there are no conflicts, however ts-protoc-gen doesn't use the same algorithm.
Reference: https://github.com/protocolbuffers/protobuf/blob/97cb3a862f132c6ab98e240be11990b89f7d5467/src/google/protobuf/compiler/js/js_generator.cc#L528-L531
Versions of relevant software used 0.14.0
What happened Typescript types for field named 'extension' are incorrect. The base message class has methods 'getExtension' and 'setExtension' and so the protoc compiler adds a '$' suffix on the getter/setter method names to not conflict.
What you expected to happen Types to match the generated JS code from protoc.
How to reproduce it (as minimally and precisely as possible): Create a simple message:
Run the protoc compiler and ts-protoc-gen. Notice that the typescript types have conflicting methods 'getExtension', 'setExtension', 'getJsPbMessageId', 'setJsPbMessageId'
Full logs to relevant components
n/a
Anything else we need to know
n/a