Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"optionalDependencies": {
"@google-cloud/firestore": "^0.16.0",
"@google-cloud/storage": "^1.6.0",
"@types/google-cloud__storage": "^1.1.7"
"@types/google-cloud__storage": "^1.7.1"
},
"devDependencies": {
"@types/chai": "^3.4.34",
Expand Down
10 changes: 5 additions & 5 deletions src/storage/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class StorageInternals implements FirebaseServiceInternalsInterface {
* Storage service bound to the provided app.
*/
export class Storage implements FirebaseServiceInterface {
public INTERNAL: StorageInternals = new StorageInternals();
public readonly INTERNAL: StorageInternals = new StorageInternals();

private appInternal: FirebaseApp;
private storageClient: any;
private readonly appInternal: FirebaseApp;
private readonly storageClient: gcs;

/**
* @param {FirebaseApp} app The app for this Storage service.
Expand Down Expand Up @@ -74,7 +74,7 @@ export class Storage implements FirebaseServiceInterface {
if (cert != null) {
// cert is available when the SDK has been initialized with a service account JSON file,
// or by setting the GOOGLE_APPLICATION_CREDENTIALS envrionment variable.
this.storageClient = storage({
this.storageClient = new storage({
projectId: cert.projectId,
credentials: {
private_key: cert.privateKey,
Expand All @@ -83,7 +83,7 @@ export class Storage implements FirebaseServiceInterface {
});
} else if (app.options.credential instanceof ApplicationDefaultCredential) {
// Try to use the Google application default credentials.
this.storageClient = storage();
this.storageClient = new storage();
} else {
throw new FirebaseError({
code: 'storage/invalid-credential',
Expand Down