Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gts linter complains about prefer-spread #347

Merged
merged 1 commit into from
Mar 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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