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 7227ce26d..ceb8d214f 100644 --- a/system-test/storage.ts +++ b/system-test/storage.ts @@ -1629,7 +1629,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(); }); }); @@ -1838,12 +1838,7 @@ describe('storage', () => { it('should not download from the unencrypted file', done => { unencryptedFile.download(err => { - if (!err) { - done(new Error('Expected an error.')); - return; - } - - assert(err.message.indexOf([ + assert(err!.message.indexOf([ 'The target object is encrypted by a', 'customer-supplied encryption key.', ].join(' ')) > -1);