Merge branch 'proto-loader_type_generator' of https://github.com/murgatroid99/grpc-node into proto-loader_type_generator

This commit is contained in:
Michael Lumish 2020-07-06 09:01:59 -07:00
commit 06f63a22ca
1 changed files with 3 additions and 3 deletions

View File

@ -465,15 +465,15 @@ function generateServiceHandlerInterface(formatter: TextFormatter, serviceType:
formatter.writeLine(`${methodName}(call: grpc.ServerDuplexStream<${requestType}, ${responseType}>): void;`);
} else {
// Client streaming
formatter.writeLine(`${methodName}(call: grpc.ServerReadableStream<${requestType}>, callback: grpc.SendUnaryData<${responseType}>): void;`);
formatter.writeLine(`${methodName}(call: grpc.ServerReadableStream<${requestType}>, callback: grpc.sendUnaryData<${responseType}>): void;`);
}
} else {
if (method.responseStream) {
// Server streaming
formatter.writeLine(`${methodName}(call: grpc.ServerWriteableStream<${requestType}, ${responseType}>): void;`);
formatter.writeLine(`${methodName}(call: grpc.ServerWritableStream<${requestType}, ${responseType}>): void;`);
} else {
// Unary
formatter.writeLine(`${methodName}(call: grpc.ServerUnaryCall<${requestType}>, callback: grpc.SendUnaryData<${responseType}>): void;`);
formatter.writeLine(`${methodName}(call: grpc.ServerUnaryCall<${requestType}, ${responseType}>, callback: grpc.sendUnaryData<${responseType}>): void;`);
}
}
formatter.writeLine('');