Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make client args credentials and options optional #512

Merged
merged 3 commits into from
Mar 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions javascript/net/grpc/web/grpc_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ void PrintTypescriptFile(Printer* printer, const FileDescriptor* file,
"credentials_: null | { [index: string]: string; };\n"
"options_: null | { [index: string]: string; };\n\n"
"constructor (hostname: string,\n"
" credentials: null | { [index: string]: string; },\n"
" options: null | { [index: string]: string; }) {\n");
" credentials?: null | { [index: string]: string; },\n"
" options?: null | { [index: string]: string; }) {\n");
printer->Indent();
printer->Print("if (!options) options = {};\n");
if (vars["mode"] == GetModeVar(Mode::GRPCWEB)) {
Expand Down Expand Up @@ -734,8 +734,8 @@ void PrintGrpcWebDtsClientClass(Printer* printer, const FileDescriptor* file,
printer->Indent();
printer->Print(
"constructor (hostname: string,\n"
" credentials: null | { [index: string]: string; },\n"
" options: null | { [index: string]: string; });\n\n");
" credentials?: null | { [index: string]: string; },\n"
" options?: null | { [index: string]: string; });\n\n");
for (int method_index = 0; method_index < service->method_count();
++method_index) {
const MethodDescriptor* method = service->method(method_index);
Expand Down