From 56b2fc56a056a993a48a39b611adb826d8281a4c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 4 Oct 2018 11:46:11 -0700 Subject: [PATCH] fix: use ~ for typescript (and fix compile errors) (#426) --- package.json | 2 +- system-test/storage.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 23ceba23f..2379b5066 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "proxyquire": "^2.0.0", "source-map-support": "^0.5.6", "tmp": "^0.0.33", - "typescript": "^3.0.1", + "typescript": "~3.1.1", "uuid": "^3.1.0" } } diff --git a/system-test/storage.ts b/system-test/storage.ts index 32e7ecd3b..7faf8f162 100644 --- a/system-test/storage.ts +++ b/system-test/storage.ts @@ -1384,7 +1384,7 @@ describe('storage', () => { it('should handle non-network errors', done => { const file = bucket.file('hi.jpg'); file.download(err => { - assert.strictEqual(err.code, 404); + assert.strictEqual((err as ApiError).code, 404); done(); }); }); @@ -1593,7 +1593,7 @@ describe('storage', () => { it('should not download from the unencrypted file', done => { unencryptedFile.download(err => { - assert(err.message.indexOf([ + assert(err!.message.indexOf([ 'The target object is encrypted by a', 'customer-supplied encryption key.', ].join(' ')) > -1);