Skip to content

Commit b854dbe

Browse files
renovate[bot]JustinBeckwith
authored andcommitted
chore(deps): update dependency typescript to ~3.2.0 (#380)
1 parent dac327d commit b854dbe

7 files changed

Lines changed: 22 additions & 21 deletions

File tree

handwritten/pubsub/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"proxyquire": "^2.0.0",
9393
"sinon": "^7.1.1",
9494
"source-map-support": "^0.5.9",
95-
"typescript": "~3.1.5"
95+
"typescript": "~3.2.0"
9696
},
9797
"nyc": {
9898
"exclude": [

handwritten/pubsub/src/iam.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@
2121
import {promisifyAll} from '@google-cloud/promisify';
2222
import * as arrify from 'arrify';
2323
import {CallOptions} from 'google-gax';
24-
import * as is from 'is';
25-
import * as r from 'request';
2624
import {PubSub} from '.';
2725

28-
2926
/**
3027
* @callback GetPolicyCallback
3128
* @param {?Error} err Request error, if any.
@@ -175,7 +172,8 @@ export class IAM {
175172
this.Promise = pubsub.Promise;
176173
}
177174
this.pubsub = pubsub;
178-
this.request = pubsub.request.bind(pubsub);
175+
// tslint:disable-next-line no-any
176+
this.request = pubsub.request.bind(pubsub) as any;
179177
this.id = id;
180178
}
181179

handwritten/pubsub/src/subscriber.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ export class Subscriber extends EventEmitter {
264264
deadline =>
265265
this.modifyAckDeadline_(modAcks[deadline], Number(deadline)));
266266

267-
requests.push.apply(requests, modAckRequests);
267+
// tslint:disable-next-line no-any
268+
requests.push.apply(requests, modAckRequests as any);
268269

269270
Promise.all(modAckRequests).then(() => {
270271
this.inventory_.nack = [];

handwritten/pubsub/src/topic.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export class Topic {
7171
* @type {PubSub}
7272
*/
7373
this.parent = this.pubsub = pubsub;
74-
this.request = pubsub.request.bind(pubsub);
74+
// tslint:disable-next-line no-any
75+
this.request = pubsub.request.bind(pubsub) as any;
7576
/**
7677
* [IAM (Identity and Access
7778
* Management)](https://cloud.google.com/pubsub/access_control) allows you

handwritten/pubsub/test/subscriber.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ class FakeConnectionPool extends EventEmitter {
4747
calledWith_: IArguments;
4848
constructor() {
4949
super();
50-
this.calledWith_ = [].slice.call(arguments);
50+
this.calledWith_ = arguments;
5151
}
5252
}
5353

5454
class FakeHistogram {
5555
calledWith_: IArguments;
5656
constructor() {
57-
this.calledWith_ = [].slice.call(arguments);
57+
this.calledWith_ = arguments;
5858
}
5959
}
6060
// tslint:disable-next-line no-any

handwritten/pubsub/test/subscription.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@ const fakePromisify = Object.assign({}, pfy, {
3535
class FakeIAM {
3636
calledWith_: IArguments;
3737
constructor() {
38-
this.calledWith_ = [].slice.call(arguments);
38+
this.calledWith_ = arguments;
3939
}
4040
}
4141

4242
class FakeSnapshot {
4343
calledWith_: IArguments;
4444
static formatName_?: Function;
4545
constructor() {
46-
this.calledWith_ = [].slice.call(arguments);
46+
this.calledWith_ = arguments;
4747
}
4848
}
4949

5050
class FakeSubscriber {
5151
calledWith_: IArguments;
5252
constructor() {
53-
this.calledWith_ = [].slice.call(arguments);
53+
this.calledWith_ = arguments;
5454
}
5555
}
5656

@@ -149,17 +149,14 @@ describe('Subscription', () => {
149149

150150
it('should create an IAM object', () => {
151151
assert(subscription.iam instanceof FakeIAM);
152-
153152
const args = subscription.iam.calledWith_;
154-
155153
assert.strictEqual(args[0], PUBSUB);
156154
assert.strictEqual(args[1], subscription.name);
157155
});
158156

159157
it('should inherit from Subscriber', () => {
160158
const options = {};
161159
const subscription = new Subscription(PUBSUB, SUB_NAME, options);
162-
163160
assert(subscription instanceof FakeSubscriber);
164161
assert.strictEqual(subscription.calledWith_[0], options);
165162
});

handwritten/pubsub/test/topic.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@ const fakePromisify = Object.assign({}, pfy, {
3333
});
3434

3535
class FakeIAM {
36-
calledWith_: IArguments;
37-
constructor() {
38-
this.calledWith_ = [].slice.call(arguments);
36+
// tslint:disable-next-line no-any
37+
calledWith_: any[];
38+
// tslint:disable-next-line no-any
39+
constructor(...args: any[]) {
40+
this.calledWith_ = args;
3941
}
4042
}
4143

4244
class FakePublisher {
43-
calledWith_: IArguments;
44-
constructor() {
45-
this.calledWith_ = [].slice.call(arguments);
45+
// tslint:disable-next-line no-any
46+
calledWith_: any[];
47+
// tslint:disable-next-line no-any
48+
constructor(...args: any[]) {
49+
this.calledWith_ = args;
4650
}
4751
}
4852

0 commit comments

Comments
 (0)