mirror of https://github.com/grpc/grpc-node.git
Fix some type issues in the server interface
This commit is contained in:
parent
f37e7d43bf
commit
c6d4ea5a02
|
@ -461,15 +461,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('');
|
||||
|
|
Loading…
Reference in New Issue