Skip to content

Commit

Permalink
Merge pull request #1778 from EduardoLaranjo/patch-1
Browse files Browse the repository at this point in the history
Fix auto-generated service definition
  • Loading branch information
murgatroid99 authored May 6, 2021
2 parents bf2e5cb + a5fb029 commit 4ed3bcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/proto-loader/bin/proto-loader-gen-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ function generateServiceHandlerInterface(formatter: TextFormatter, serviceType:
}

function generateServiceDefinitionInterface(formatter: TextFormatter, serviceType: Protobuf.Service) {
formatter.writeLine(`export interface ${serviceType.name}Definition {`);
formatter.writeLine(`export interface ${serviceType.name}Definition extends grpc.ServiceDefinition {`);
formatter.indent();
for (const methodName of Object.keys(serviceType.methods).sort()) {
const method = serviceType.methods[methodName];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export interface OperationsHandlers extends grpc.UntypedServiceImplementation {

}

export interface OperationsDefinition {
export interface OperationsDefinition extends grpc.ServiceDefinition {
CancelOperation: MethodDefinition<_google_longrunning_CancelOperationRequest, _google_protobuf_Empty, _google_longrunning_CancelOperationRequest__Output, _google_protobuf_Empty__Output>
DeleteOperation: MethodDefinition<_google_longrunning_DeleteOperationRequest, _google_protobuf_Empty, _google_longrunning_DeleteOperationRequest__Output, _google_protobuf_Empty__Output>
GetOperation: MethodDefinition<_google_longrunning_GetOperationRequest, _google_longrunning_Operation, _google_longrunning_GetOperationRequest__Output, _google_longrunning_Operation__Output>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export interface EchoHandlers extends grpc.UntypedServiceImplementation {

}

export interface EchoDefinition {
export interface EchoDefinition extends grpc.ServiceDefinition {
Block: MethodDefinition<_google_showcase_v1beta1_BlockRequest, _google_showcase_v1beta1_BlockResponse, _google_showcase_v1beta1_BlockRequest__Output, _google_showcase_v1beta1_BlockResponse__Output>
Chat: MethodDefinition<_google_showcase_v1beta1_EchoRequest, _google_showcase_v1beta1_EchoResponse, _google_showcase_v1beta1_EchoRequest__Output, _google_showcase_v1beta1_EchoResponse__Output>
Collect: MethodDefinition<_google_showcase_v1beta1_EchoRequest, _google_showcase_v1beta1_EchoResponse, _google_showcase_v1beta1_EchoRequest__Output, _google_showcase_v1beta1_EchoResponse__Output>
Expand Down

0 comments on commit 4ed3bcf

Please sign in to comment.