Skip to content

TypeScript client method signatures should mark metadata as optional #1368

@andrewmbenton

Description

@andrewmbenton

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions