diff --git a/templates/typescript_gapic/src/$version/$service_client.ts.njk b/templates/typescript_gapic/src/$version/$service_client.ts.njk index e6a79e66b..548b97241 100644 --- a/templates/typescript_gapic/src/$version/$service_client.ts.njk +++ b/templates/typescript_gapic/src/$version/$service_client.ts.njk @@ -384,7 +384,6 @@ export class {{ service.name }}Client { {{ method.name.toCamelCase() }}( options?: gax.CallOptions): gax.CancellableStream{ - {{ util.buildHeaderRequestParam(method) }} return this._innerApiCalls.{{ method.name.toCamelCase() }}(options); } {%- elif method.serverStreaming %} @@ -426,8 +425,7 @@ export class {{ service.name }}Client { callback = optionsOrCallback; optionsOrCallback = {}; } - let options = optionsOrCallback as gax.CallOptions; - {{ util.buildHeaderRequestParam(method) }} + const options = optionsOrCallback as gax.CallOptions; return this._innerApiCalls.{{ method.name.toCamelCase() }}(null, options, callback); } {%- endif %} diff --git a/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline b/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline index c3e63187c..4c470d99f 100644 --- a/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline +++ b/typescript/test/testdata/showcase/src/v1beta1/echo_client.ts.baseline @@ -382,8 +382,7 @@ export class EchoClient { callback = optionsOrCallback; optionsOrCallback = {}; } - let options = optionsOrCallback as gax.CallOptions; - options = options || {}; + const options = optionsOrCallback as gax.CallOptions; return this._innerApiCalls.collect(null, options, callback); } @@ -402,7 +401,6 @@ export class EchoClient { chat( options?: gax.CallOptions): gax.CancellableStream{ - options = options || {}; return this._innerApiCalls.chat(options); }