File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @firebase/database-types " : patch
3
+ " @firebase/database " : patch
4
+ " firebase " : patch
5
+ ---
6
+
7
+ Updated the type definition for ` ThenableReference ` to only implement ` then ` and ` catch ` , which matches the implementation.
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export interface Reference extends Query {
108
108
key : string | null ;
109
109
onDisconnect ( ) : OnDisconnect ;
110
110
parent : Reference | null ;
111
- push ( value ?: any , onComplete ?: ( a : Error | null ) => any ) : Reference ;
111
+ push ( value ?: any , onComplete ?: ( a : Error | null ) => any ) : ThenableReference ;
112
112
remove ( onComplete ?: ( a : Error | null ) => any ) : Promise < any > ;
113
113
root : Reference ;
114
114
set ( value : any , onComplete ?: ( a : Error | null ) => any ) : Promise < any > ;
@@ -134,7 +134,9 @@ export interface ServerValue {
134
134
increment ( delta : number ) : Object ;
135
135
}
136
136
137
- export interface ThenableReference extends Reference , Promise < Reference > { }
137
+ export interface ThenableReference
138
+ extends Reference ,
139
+ Pick < Promise < Reference > , 'then' | 'catch' > { }
138
140
139
141
export function enableLogging (
140
142
logger ?: boolean | ( ( a : string ) => any ) ,
Original file line number Diff line number Diff line change @@ -6902,7 +6902,7 @@ declare namespace firebase.database {
6902
6902
6903
6903
interface ThenableReference
6904
6904
extends firebase . database . Reference ,
6905
- Promise < Reference > { }
6905
+ Pick < Promise < Reference > , 'then' | 'catch' > { }
6906
6906
6907
6907
/**
6908
6908
* Logs debugging information to the console.
You can’t perform that action at this time.
0 commit comments