Skip to content

Commit 4179dd3

Browse files
authored
Fixing GCS typings (#340)
1 parent 333f6f7 commit 4179dd3

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

package-lock.json

Lines changed: 7 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"optionalDependencies": {
6262
"@google-cloud/firestore": "^0.16.0",
6363
"@google-cloud/storage": "^1.6.0",
64-
"@types/google-cloud__storage": "^1.1.7"
64+
"@types/google-cloud__storage": "^1.7.1"
6565
},
6666
"devDependencies": {
6767
"@types/chai": "^3.4.34",

src/storage/storage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ class StorageInternals implements FirebaseServiceInternalsInterface {
4141
* Storage service bound to the provided app.
4242
*/
4343
export class Storage implements FirebaseServiceInterface {
44-
public INTERNAL: StorageInternals = new StorageInternals();
44+
public readonly INTERNAL: StorageInternals = new StorageInternals();
4545

46-
private appInternal: FirebaseApp;
47-
private storageClient: any;
46+
private readonly appInternal: FirebaseApp;
47+
private readonly storageClient: gcs;
4848

4949
/**
5050
* @param {FirebaseApp} app The app for this Storage service.
@@ -74,7 +74,7 @@ export class Storage implements FirebaseServiceInterface {
7474
if (cert != null) {
7575
// cert is available when the SDK has been initialized with a service account JSON file,
7676
// or by setting the GOOGLE_APPLICATION_CREDENTIALS envrionment variable.
77-
this.storageClient = storage({
77+
this.storageClient = new storage({
7878
projectId: cert.projectId,
7979
credentials: {
8080
private_key: cert.privateKey,
@@ -83,7 +83,7 @@ export class Storage implements FirebaseServiceInterface {
8383
});
8484
} else if (app.options.credential instanceof ApplicationDefaultCredential) {
8585
// Try to use the Google application default credentials.
86-
this.storageClient = storage();
86+
this.storageClient = new storage();
8787
} else {
8888
throw new FirebaseError({
8989
code: 'storage/invalid-credential',

0 commit comments

Comments
 (0)