Skip to content

Commit

Permalink
feat(typescript): mark some metadata parameters as optional
Browse files Browse the repository at this point in the history
Resolves #1368
  • Loading branch information
andrewmbenton committed Oct 5, 2023
1 parent 9cb8524 commit 95b74ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/net/grpc/web/generator/grpc_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ void PrintTypescriptFile(Printer* printer, const FileDescriptor* file,
printer->Indent();
printer->Print(vars,
"request: $input_type$,\n"
"metadata: grpcWeb.Metadata | null): "
"metadata?: grpcWeb.Metadata | null): "
"$promise$<$output_type$>;\n\n");
printer->Outdent();

Expand All @@ -671,7 +671,7 @@ void PrintTypescriptFile(Printer* printer, const FileDescriptor* file,
printer->Indent();
printer->Print(vars,
"request: $input_type$,\n"
"metadata: grpcWeb.Metadata | null,\n"
"metadata?: grpcWeb.Metadata | null,\n"
"callback?: (err: grpcWeb.RpcError,\n"
" response: $output_type$) => void) {\n");
printer->Print(vars, "if (callback !== undefined) {\n");
Expand Down

0 comments on commit 95b74ac

Please sign in to comment.