Generate thenableCall() instead of unaryCall()

This commit is contained in:
Eryu Xia 2024-06-23 21:28:25 -07:00
parent 8ab32b945c
commit 508d76b58b
2 changed files with 2 additions and 7 deletions

View File

@ -689,7 +689,7 @@ void PrintTypescriptFile(Printer* printer, const FileDescriptor* file,
printer->Outdent();
printer->Print(vars,
"}\n"
"return this.client_.unaryCall(\n");
"return this.client_.thenableCall(\n");
printer->Print(vars,
"this.hostname_ +\n"
" '/$package_dot$$service_name$/$method_name$',\n"
@ -1179,7 +1179,7 @@ void PrintPromiseUnaryCall(Printer* printer, std::map<string, string> vars) {
printer->Indent();
printer->Print(vars,
" function(request, metadata) {\n"
"return this.client_.unaryCall(this.hostname_ +\n");
"return this.client_.thenableCall(this.hostname_ +\n");
printer->Indent();
printer->Indent();
if (vars["mode"] == GetModeVar(Mode::OP)) {

View File

@ -10,11 +10,6 @@ module.ClientReadableStream.prototype.removeListener =
function(eventType, callback) {};
module.ClientReadableStream.prototype.cancel = function() {};
module.GenericClient = function() {};
module.GenericClient.prototype.unaryCall = function(request) {};
module.GenericClient.prototype.call = function(requestMessage,
methodDescriptor) {};
module.UnaryInterceptor = function() {};
module.UnaryInterceptor.prototype.intercept = function(request, invoker) {};