-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to disable detection of wrappers type? #756
Comments
Huh, I'm kinda surprised, but yeah I guess we don't have an option for that. If you'd like to work on a PR for |
Actually it also includes all the Timestamp, Structs and Duration field. I'm working a NestJs project and would like to generate the type definition. I found this library but this library automatically convert all the google wrappers type to primitive type. And Nestjs use protobufjs behind, which by default won't convert these fields to corresponding primitive. protobufjs contains pbts that can convert the protobuf file to typescript definition file, and of course, no NestJs interface. The encode/decode method generated here is not compatible to protobufjs one as well. Finally I choose to use pbts with manually typed interface for NestJs to solve my issue.... |
Ah yeah, another ts-proto user found this fix, using the protobufjs So if you have No one has contributed support for the other fields like Structs, Duration, etc. It'd be great if you wanted to help flush out NestJS support for the other wrapper types, but also definitely np if you want to just keep using raw protobufjs/pbts. |
As title. Is it possible to let ts-proto treat all google.protobuf.wrappers type as normal message field?
for example, instead of returning boolean, we return { value: boolean }.
I see the basicType function, the options.keepValue is hardcoded as
false
.The text was updated successfully, but these errors were encountered: