@@ -6,7 +6,6 @@ import { Reference } from './Reference';
6
6
import { Repo } from '../core/Repo' ;
7
7
import { RepoManager } from '../core/RepoManager' ;
8
8
import { validateArgCount } from '../../utils/validation' ;
9
- import { FirebaseApp } from "../../app/firebase_app" ;
10
9
import { validateUrl } from '../core/util/validation' ;
11
10
import { FirebaseApp , FirebaseService } from '../../app/firebase_app' ;
12
11
import { RepoInfo } from '../core/RepoInfo' ;
@@ -16,13 +15,9 @@ import { RepoInfo } from '../core/RepoInfo';
16
15
* @implements {FirebaseService}
17
16
*/
18
17
export class Database implements FirebaseService {
19
- /** @type {Reference } */
20
- private root_ : Reference ;
21
-
22
- /** @type {DatabaseInternals } */
23
18
INTERNAL : DatabaseInternals ;
24
19
25
- app : FirebaseApp | null ;
20
+ private root_ : Reference ;
26
21
27
22
static readonly ServerValue = {
28
23
'TIMESTAMP' : {
@@ -45,6 +40,10 @@ export class Database implements FirebaseService {
45
40
this . INTERNAL = new DatabaseInternals ( this ) ;
46
41
}
47
42
43
+ get app ( ) : FirebaseApp {
44
+ return this . repo_ . app ;
45
+ }
46
+
48
47
/**
49
48
* Returns a reference to the root or the path specified in opt_pathString.
50
49
* @param {string= } pathString
@@ -105,8 +104,7 @@ export class Database implements FirebaseService {
105
104
}
106
105
}
107
106
108
- class DatabaseInternals {
109
- database
107
+ export class DatabaseInternals {
110
108
/** @param {!Database } database */
111
109
constructor ( public database : Database ) {
112
110
}
0 commit comments