mirror of https://github.com/grpc/grpc-web.git
Generate thenableCall() instead of unaryCall()
This commit is contained in:
parent
8ab32b945c
commit
508d76b58b
|
@ -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)) {
|
||||
|
|
|
@ -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) {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue