ts-proto
ts-proto copied to clipboard
fix: fixed addGrpcMetadata option
This PR should fix this issue https://github.com/stephenh/ts-proto/issues/188
I've removed addNestjsRestParameter
parameter completely from src/generate-services.ts
since NestJS
seems to be is handled in generate-nestjs
.
- [x] tests
Hey, @stephenh would you be so kind and have some time to look at this, please?
I've added 2 separate tests. The expected output:
-
metadataType=Foo
- this should fix the current behavior and add optionalmetadata?: Foo
to*Impl
methods as well (the metadata parameter is currently present only in the type definition https://github.com/stephenh/ts-proto/blob/main/integration/generic-metadata/hero.ts#L289-L293) -
metadataType=Foo,addGrpcMetadata=true
- the same as above -
addGrpcMetadata=true
- adds optionalmetadata?: Metadata
Looks great, thank you!
:tada: This PR is included in version 1.169.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket: