A @firebase/app#FirebaseApp holds the initialization information for a collection of services.

Do not call this constructor directly. Instead, use (initializeApp:1) | initializeApp() to create an app.

Hierarchy

  • FirebaseApp

Properties

automaticDataCollectionEnabled: boolean

The settable config flag for GDPR opt-in/opt-out

name: string

The (read-only) name for this app.

The default app's name is "[DEFAULT]".

Example

// The default app's name is "[DEFAULT]"
const app = initializeApp(defaultAppConfig);
console.log(app.name); // "[DEFAULT]"

Example

// A named app's name is what you provide to initializeApp()
const otherApp = initializeApp(otherAppConfig, "other");
console.log(otherApp.name); // "other"

The (read-only) configuration options for this app. These are the original parameters given in (initializeApp:1) | initializeApp().

Example

const app = initializeApp(config);
console.log(app.options.databaseURL === config.databaseURL); // true

Generated using TypeDoc