Skip to content

Commit

Permalink
fix: gts linter complains about prefer-spread
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhenliu-gg5 committed Mar 21, 2020
1 parent a0e7b40 commit ade3ffa
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ export class BigQueryStorageClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ export class EchoClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ export class IdentityClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ export class MessagingClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ export class TestingClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/dlp/src/v2/dlp_service_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ export class DlpServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ export class KeyManagementServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ export class ConfigServiceV2Client {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ export class LoggingServiceV2Client {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ export class MetricsServiceV2Client {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ export class AlertPolicyServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/monitoring/src/v3/group_service_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ export class GroupServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ export class MetricServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ export class NotificationChannelServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ export class ServiceMonitoringServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ export class UptimeCheckServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/redis/src/v1beta1/cloud_redis_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ export class CloudRedisClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/showcase/src/v1beta1/echo_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ export class EchoClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/showcase/src/v1beta1/identity_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ export class IdentityClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/showcase/src/v1beta1/messaging_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ export class MessagingClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
3 changes: 2 additions & 1 deletion baselines/showcase/src/v1beta1/testing_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ export class TestingClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ export class TextToSpeechClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ export class TranslationServiceClient {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ export class {{ service.name }}Client {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
return stub[methodName].apply(stub, args);
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error|null|undefined) => () => {
throw err;
Expand Down

0 comments on commit ade3ffa

Please sign in to comment.