Skip to content

Commit 583c581

Browse files
dpebotJustinBeckwith
authored andcommitted
Switch to let/const (#254)
1 parent 45dc647 commit 583c581

11 files changed

Lines changed: 522 additions & 522 deletions

File tree

handwritten/pubsub/smoke-test/publisher_smoke_test.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ describe('PublisherSmokeTest', () => {
1818
if (!process.env.GCLOUD_PROJECT) {
1919
throw new Error("Usage: GCLOUD_PROJECT=<project_id> node #{$0}");
2020
}
21-
var projectId = process.env.GCLOUD_PROJECT;
21+
const projectId = process.env.GCLOUD_PROJECT;
2222

2323
it('successfully makes a call to the service using promises', done => {
2424
const pubsub = require('../src');
2525

26-
var client = new pubsub.v1.PublisherClient({
26+
const client = new pubsub.v1.PublisherClient({
2727
// optional auth parameters.
2828
});
2929

3030
// Iterate over all elements.
31-
var formattedProject = client.projectPath(projectId);
31+
const formattedProject = client.projectPath(projectId);
3232

3333
client.listTopics({project: formattedProject})
3434
.then(responses => {
35-
var resources = responses[0];
35+
const resources = responses[0];
3636
for (let i = 0; i < resources.length; i += 1) {
3737
console.log(resources[i]);
3838
}
@@ -44,22 +44,22 @@ describe('PublisherSmokeTest', () => {
4444
it('successfully makes a call to the service using callbacks', done => {
4545
const pubsub = require('../src');
4646

47-
var client = new pubsub.v1.PublisherClient({
47+
const client = new pubsub.v1.PublisherClient({
4848
// optional auth parameters.
4949
});
5050

5151
// Or obtain the paged response.
52-
var formattedProject = client.projectPath(projectId);
52+
const formattedProject = client.projectPath(projectId);
5353

5454

55-
var options = {autoPaginate: false};
56-
var callback = responses => {
55+
const options = {autoPaginate: false};
56+
const callback = responses => {
5757
// The actual resources in a response.
58-
var resources = responses[0];
58+
const resources = responses[0];
5959
// The next request if the response shows that there are more responses.
60-
var nextRequest = responses[1];
60+
const nextRequest = responses[1];
6161
// The actual response object, if necessary.
62-
// var rawResponse = responses[2];
62+
// const rawResponse = responses[2];
6363
for (let i = 0; i < resources.length; i += 1) {
6464
console.log(resources[i]);
6565
}
@@ -77,11 +77,11 @@ describe('PublisherSmokeTest', () => {
7777
it('successfully makes a call to the service using streaming', done => {
7878
const pubsub = require('../src');
7979

80-
var client = new pubsub.v1.PublisherClient({
80+
const client = new pubsub.v1.PublisherClient({
8181
// optional auth parameters.
8282
});
8383

84-
var formattedProject = client.projectPath(projectId);
84+
const formattedProject = client.projectPath(projectId);
8585
client.listTopicsStream({project: formattedProject})
8686
.on('data', element => {
8787
console.log(element);

handwritten/pubsub/src/v1/doc/google/iam/v1/doc_iam_policy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @memberof google.iam.v1
3636
* @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto}
3737
*/
38-
var SetIamPolicyRequest = {
38+
const SetIamPolicyRequest = {
3939
// This is for documentation. Actual contents will be loaded by gRPC.
4040
};
4141

@@ -51,7 +51,7 @@ var SetIamPolicyRequest = {
5151
* @memberof google.iam.v1
5252
* @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto}
5353
*/
54-
var GetIamPolicyRequest = {
54+
const GetIamPolicyRequest = {
5555
// This is for documentation. Actual contents will be loaded by gRPC.
5656
};
5757

@@ -73,7 +73,7 @@ var GetIamPolicyRequest = {
7373
* @memberof google.iam.v1
7474
* @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto}
7575
*/
76-
var TestIamPermissionsRequest = {
76+
const TestIamPermissionsRequest = {
7777
// This is for documentation. Actual contents will be loaded by gRPC.
7878
};
7979

@@ -88,6 +88,6 @@ var TestIamPermissionsRequest = {
8888
* @memberof google.iam.v1
8989
* @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto}
9090
*/
91-
var TestIamPermissionsResponse = {
91+
const TestIamPermissionsResponse = {
9292
// This is for documentation. Actual contents will be loaded by gRPC.
9393
};

handwritten/pubsub/src/v1/doc/google/iam/v1/doc_policy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
* @memberof google.iam.v1
7575
* @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto}
7676
*/
77-
var Policy = {
77+
const Policy = {
7878
// This is for documentation. Actual contents will be loaded by gRPC.
7979
};
8080

@@ -113,7 +113,7 @@ var Policy = {
113113
* @memberof google.iam.v1
114114
* @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto}
115115
*/
116-
var Binding = {
116+
const Binding = {
117117
// This is for documentation. Actual contents will be loaded by gRPC.
118118
};
119119

@@ -129,7 +129,7 @@ var Binding = {
129129
* @memberof google.iam.v1
130130
* @see [google.iam.v1.PolicyDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto}
131131
*/
132-
var PolicyDelta = {
132+
const PolicyDelta = {
133133
// This is for documentation. Actual contents will be loaded by gRPC.
134134
};
135135

@@ -157,6 +157,6 @@ var PolicyDelta = {
157157
* @memberof google.iam.v1
158158
* @see [google.iam.v1.BindingDelta definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto}
159159
*/
160-
var BindingDelta = {
160+
const BindingDelta = {
161161
// This is for documentation. Actual contents will be loaded by gRPC.
162162
};

handwritten/pubsub/src/v1/doc/google/protobuf/doc_duration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@
9292
* @memberof google.protobuf
9393
* @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto}
9494
*/
95-
var Duration = {
95+
const Duration = {
9696
// This is for documentation. Actual contents will be loaded by gRPC.
9797
};

handwritten/pubsub/src/v1/doc/google/protobuf/doc_empty.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
* @memberof google.protobuf
3030
* @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto}
3131
*/
32-
var Empty = {
32+
const Empty = {
3333
// This is for documentation. Actual contents will be loaded by gRPC.
3434
};

handwritten/pubsub/src/v1/doc/google/protobuf/doc_field_mask.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,6 @@
231231
* @memberof google.protobuf
232232
* @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto}
233233
*/
234-
var FieldMask = {
234+
const FieldMask = {
235235
// This is for documentation. Actual contents will be loaded by gRPC.
236236
};

handwritten/pubsub/src/v1/doc/google/protobuf/doc_timestamp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,6 @@
110110
* @memberof google.protobuf
111111
* @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto}
112112
*/
113-
var Timestamp = {
113+
const Timestamp = {
114114
// This is for documentation. Actual contents will be loaded by gRPC.
115115
};

0 commit comments

Comments
 (0)