File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ ' firebase ' : minor
2
3
' @firebase/database ' : minor
4
+ ' @firebase/database-types ' : minor
3
5
---
4
6
5
- Add a useEmulator(host, port) method
7
+ Add a useEmulator(host, port) method to Realtime Database
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export interface DataSnapshot {
34
34
35
35
export interface Database {
36
36
app : FirebaseApp ;
37
+ useEmulator ( host : string , port : number ) : void ;
37
38
goOffline ( ) : void ;
38
39
goOnline ( ) : void ;
39
40
ref ( path ?: string | Reference ) : Reference ;
@@ -43,6 +44,7 @@ export interface Database {
43
44
export class FirebaseDatabase implements Database {
44
45
private constructor ( ) ;
45
46
app : FirebaseApp ;
47
+ useEmulator ( host : string , port : number ) : void ;
46
48
goOffline ( ) : void ;
47
49
goOnline ( ) : void ;
48
50
ref ( path ?: string | Reference ) : Reference ;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export class Database implements FirebaseService {
103
103
* @param host the emulator host (ex: localhost)
104
104
* @param port the emulator port (ex: 8080)
105
105
*/
106
- useEmulator ( host : string , port : number ) {
106
+ useEmulator ( host : string , port : number ) : void {
107
107
if ( this . instanceUsed_ ) {
108
108
fatal (
109
109
'Cannot call useEmulator() after instance has already been initialized.'
Original file line number Diff line number Diff line change @@ -5647,6 +5647,15 @@ declare namespace firebase.database {
5647
5647
* ```
5648
5648
*/
5649
5649
app : firebase . app . App ;
5650
+ /**
5651
+ * Modify this instance to communicate with the Realtime Database emulator.
5652
+ *
5653
+ * <p>Note: this must be called before this instance has been used to do any operations.
5654
+ *
5655
+ * @param host the emulator host (ex: localhost)
5656
+ * @param port the emulator port (ex: 8080)
5657
+ */
5658
+ useEmulator ( host : string , port : number ) : void ;
5650
5659
/**
5651
5660
* Disconnects from the server (all Database operations will be completed
5652
5661
* offline).
You can’t perform that action at this time.
0 commit comments