mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1778 from EduardoLaranjo/patch-1
Fix auto-generated service definition
This commit is contained in:
commit
4ed3bcf612
|
@ -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];
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue