Skip to content

Commit

Permalink
feat(typescript): mark some metadata parameters as optional (#1369)
Browse files Browse the repository at this point in the history
Resolves #1368
  • Loading branch information
andrewmbenton authored Oct 16, 2023
1 parent 49d3b70 commit 1ab0bdc
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 1ab0bdc

Please sign in to comment.