(app?: FirebaseApp)
| 618 | _app: FirebaseApp; |
| 619 | |
| 620 | constructor(app?: FirebaseApp) { |
| 621 | if (app?.native) { |
| 622 | this._native = FIRDatabase.databaseForApp(app.native); |
| 623 | } else { |
| 624 | if (defaultDatabase) { |
| 625 | return defaultDatabase; |
| 626 | } |
| 627 | defaultDatabase = this; |
| 628 | this._native = FIRDatabase.database(); |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | useEmulator(host: string, port: number) { |
| 633 | this.native.useEmulatorWithHostPort(host, port); |