Skip to content

Commit 454eac3

Browse files
authored
fix(): FirebaseApp Class should not implement app.App (#2060)
While giving us a bit more type safety in development, implementing app.App allows the Firebase JS SDK to break our builds in minor releases. Which has bit us more than once. I do not believe this is worth keeping around any longer. Fixes #2059
1 parent 4242268 commit 454eac3

File tree

3 files changed

+294
-186
lines changed

3 files changed

+294
-186
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
"utf-8-validate": "~4.0.0"
4747
},
4848
"devDependencies": {
49+
"@angular/animations": ">=6.0.0 <8",
4950
"@angular/compiler-cli": ">=6.0.0 <8",
5051
"@angular/platform-server": ">=6.0.0 <8",
51-
"@angular/animations": ">=6.0.0 <8",
5252
"@types/jasmine": "^2.5.36",
5353
"@types/request": "0.0.30",
5454
"concurrently": "^2.2.0",

src/core/firebase.app.module.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { InjectionToken, NgModule, Optional } from '@angular/core';
2-
import { app, auth, database, firestore, functions, messaging, storage } from 'firebase/app';
2+
import { auth, database, firestore, functions, messaging, storage } from 'firebase/app';
33
// @ts-ignore (https://github.com/firebase/firebase-js-sdk/pull/1206)
44
import firebase from 'firebase/app'; // once fixed can pull in as "default as firebase" above
55

@@ -19,14 +19,11 @@ export type FirebaseFunctions = functions.Functions;
1919

2020
// Have to implement as we need to return a class from the provider, we should consider exporting
2121
// this in the firebase/app types as this is our highest risk of breaks
22-
export class FirebaseApp implements app.App {
22+
export class FirebaseApp {
2323
name: string;
2424
options: {};
2525
auth: () => FirebaseAuth;
26-
// app.App database() doesn't take a databaseURL arg in the public types?
2726
database: (databaseURL?: string) => FirebaseDatabase;
28-
// automaticDataCollectionEnabled is now private? _automaticDataCollectionEnabled?
29-
// automaticDataCollectionEnabled: true,
3027
messaging: () => FirebaseMessaging;
3128
storage: (storageBucket?: string) => FirebaseStorage;
3229
delete: () => Promise<void>;

0 commit comments

Comments
 (0)