Skip to content

Commit 4ada0c4

Browse files
devversionandrewseguin
authored andcommitted
build: fix firebase app type warnings (#13469)
* The `firebase` packages comes by default without typings. Firebase defines the app types as peer dependencies, so we should fix those.
1 parent d1e59a2 commit 4ada0c4

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@angular/upgrade": "7.0.0-rc.0",
5555
"@bazel/ibazel": "0.3.1",
5656
"@bazel/typescript": "^0.19.1",
57+
"@firebase/app-types": "^0.3.2",
5758
"@google-cloud/storage": "^1.1.1",
5859
"@octokit/rest": "^15.9.4",
5960
"@schematics/angular": "7.0.0-rc.1",

tools/gulp/util/firebase.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import {initializeApp} from 'firebase';
2+
3+
// This import lacks type definitions.
14
const firebaseAdmin = require('firebase-admin');
2-
const firebase = require('firebase');
35

46
/** Database URL of the dashboard firebase project. */
57
const dashboardDatabaseUrl = 'https://material2-board.firebaseio.com';
@@ -22,7 +24,7 @@ export function openFirebaseDashboardApp() {
2224

2325
/** Opens a connection to the Firebase dashboard app with no authentication. */
2426
export function openFirebaseDashboardAppAsGuest() {
25-
return firebase.initializeApp({ databaseURL: dashboardDatabaseUrl });
27+
return initializeApp({ databaseURL: dashboardDatabaseUrl });
2628
}
2729

2830
/** Decodes a Travis CI variable that is public in favor for PRs. */

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
tsickle "0.28.0"
274274
tsutils "2.27.2"
275275

276-
"@firebase/[email protected]":
276+
"@firebase/[email protected]", "@firebase/app-types@^0.3.2":
277277
version "0.3.2"
278278
resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.3.2.tgz#a92dc544290e2893bd8c02a81e684dae3d8e7c85"
279279
integrity sha512-ZD8lTgW07NGgo75bTyBJA8Lt9+NweNzot7lrsBtIvfciwUzaFJLsv2EShqjBeuhF7RpG6YFucJ6m67w5buCtzw==

0 commit comments

Comments
 (0)