Skip to content

Conversation

jamesdaniels
Copy link
Member

@jamesdaniels jamesdaniels commented May 22, 2018

Checklist

Description

Per firebase/firebase-js-sdk#853 we're moving over to the firebase dependency and it's public types, rather than @firebase/* and @firebase/*-types.

// app.App database() doesn't take a databaseURL arg in the public types?
database: (databaseURL?: string) => FirebaseDatabase;
// automaticDataCollectionEnabled is now private? _automaticDataCollectionEnabled?
// automaticDataCollectionEnabled: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @jshcrowthe, if this goes public again it's going to be a breaking change for us; as it was the first time; as we need to export an "implementing" class to ngModule.

Copy link
Member Author

@jamesdaniels jamesdaniels May 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a lot better for us if firebase/app exported FirebaseAppImpl, not just an interface; then we wouldn't have the chance of breaking changes.

automaticDataCollectionEnabled: boolean;
options: {};
auth: () => FirebaseAuth;
// app.App database() doesn't take a databaseURL arg in the public types?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return (existingApp || firebase.initializeApp(options, config)) as FirebaseApp;
const existingApp = apps.filter(app => app && app.name === config.name)[0];
// We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any
return (existingApp || (initializeApp as any)(options, config)) as FirebaseApp;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @param events
*/
export function combineChanges(current: DocumentChange[], changes: DocumentChange[], events: DocumentChangeType[]) {
export function combineChanges<T>(current: DocumentChange<T>[], changes: DocumentChange<T>[], events: DocumentChangeType[]) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These <T>'s are needed because we're pulling in our DocumentChange now.

'angularfire2/functions': 'angularfire2.functions',
'angularfire2/storage': 'angularfire2.storage',
'zone.js': 'Zone'
'angularfire2/storage': 'angularfire2.storage'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zone.js and @angular/compiler were not needed, dropped while I was in here.

import { FirebaseOptionsToken, FirebaseNameOrConfigToken } from './angularfire2';
// Public types don't expose FirebaseOptions or FirebaseAppConfig
export type FirebaseOptions = {[key:string]: any};
export type FirebaseAppConfig = {[key:string]: any};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@davideast davideast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants