Closed nikotili closed 3 years ago
The purpose of the type generator in the @grpc/proto-loader
library is to generate types for objects output by the proto-loader library. Generating types for other libraries is out of scope for that type generator.
I'm using NestJS to create a gRPC microservice and
proto-loader-gen-types
to generate types from the.proto
file. However, generated interfaces only have methods which returnSurfaceCall
types likeClientUnaryCall
and have acallback
param likecallback: (err, res: R) => void
.I'm suggesting a feature for
proto-loader-gen-types
to generate an extra method definition which looks likeFindOne(arg: A, metadata?: Metadata): Observable<T>
for the services.I have considered using nestjs-proto-gen-ts which does exactly what I'm suggesting, but it lacks the generated methods from
proto-loader-gen-types