Merge pull request #1778 from EduardoLaranjo/patch-1

Fix auto-generated service definition
This commit is contained in:
Michael Lumish 2021-05-06 10:50:30 -07:00 committed by GitHub
commit 4ed3bcf612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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];

View File

@ -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>

View File

@ -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>