protobuf-ts icon indicating copy to clipboard operation
protobuf-ts copied to clipboard

Google wrappers for nullable properties

Open c5racing opened this issue 4 years ago • 3 comments
trafficstars

We currently use google wrappers for nullable wrappers from google/protobuf/wrappers.proto in our proto3 files such as StringValue.

In the generated typescript, i need to use .value for these to be work i.e.

const req = <AddCarRequest>{
      tableName: TableName.Car,
      name: this.name,
      description: {
        value: this.description
     }
 }

Is there a way to generate the model in such a way to remove the value and just apply it to the property such as:

const req = <AddCarRequest>{
      tableName: TableName.Car,
      name: this.name,
      description: this.description
 }

I'm currently using proto3 and need to use the google wrappers to generate my c# code as nullable properties.

c5racing avatar Oct 27 '21 19:10 c5racing