This is an inverse issue to #408
There are a couple of method signatures in the generated TypeScript client that should mark the metadata parameter as optional, to reduce explicitly passing unnecessary null values:
|
printer->Print(vars, |
|
"request: $input_type$,\n" |
|
"metadata: grpcWeb.Metadata | null): " |
|
"$promise$<$output_type$>;\n\n"); |
|
printer->Print(vars, |
|
"request: $input_type$,\n" |
|
"metadata: grpcWeb.Metadata | null,\n" |
|
"callback?: (err: grpcWeb.RpcError,\n" |
|
" response: $output_type$) => void) {\n"); |
Making the metadata parameter optional in the method returning a Promise would bring the TypeScript client closer in line with the PromiseClient interface available when generating with import_style=commonjs+dts.
This is an inverse issue to #408
There are a couple of method signatures in the generated TypeScript client that should mark the
metadataparameter as optional, to reduce explicitly passing unnecessarynullvalues:grpc-web/javascript/net/grpc/web/generator/grpc_generator.cc
Lines 652 to 655 in 0ec55aa
grpc-web/javascript/net/grpc/web/generator/grpc_generator.cc
Lines 670 to 674 in 0ec55aa
Making the
metadataparameter optional in the method returning aPromisewould bring the TypeScript client closer in line with thePromiseClientinterface available when generating withimport_style=commonjs+dts.