diff --git a/src/bucket.ts b/src/bucket.ts index b251192d7..14b081842 100644 --- a/src/bucket.ts +++ b/src/bucket.ts @@ -31,7 +31,7 @@ import * as fs from 'fs'; import * as http from 'http'; import * as mime from 'mime-types'; import * as path from 'path'; -import pLimit = require('p-limit'); +import * as pLimit from 'p-limit'; import {promisify} from 'util'; import retry = require('async-retry'); import {convertObjKeysToSnakeCase} from './util'; @@ -309,7 +309,7 @@ export interface BucketMetadata extends BaseMetadata { }; }; labels?: { - [key: string]: string; + [key: string]: string | null; }; lifecycle?: { rule?: LifecycleRule[]; diff --git a/system-test/storage.ts b/system-test/storage.ts index ad56a902d..3cf0b3950 100644 --- a/system-test/storage.ts +++ b/system-test/storage.ts @@ -18,7 +18,7 @@ import * as crypto from 'crypto'; import * as fs from 'fs'; import fetch from 'node-fetch'; import * as FormData from 'form-data'; -import pLimit = require('p-limit'); +import * as pLimit from 'p-limit'; import {promisify} from 'util'; import * as path from 'path'; import * as tmp from 'tmp'; @@ -1108,7 +1108,7 @@ describe('storage', () => { it('should be available from updating a bucket', async () => { await bucket.setMetadata({labels: {a: 'b'}}); - assert(types.includes(bucket.metadata.locationType)); + assert(types.includes(bucket.metadata.locationType!)); }); });