File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -68,20 +68,20 @@ export interface Query {
68
68
limitToLast ( limit : number ) : Query ;
69
69
off (
70
70
eventType ?: EventType ,
71
- callback ?: ( a : DataSnapshot , b ?: string | null ) => any ,
72
- context ?: Object | null
73
- ) : any ;
71
+ callback ?: ( a : DataSnapshot , b ?: string ) => any ,
72
+ context ?: Object
73
+ ) : void ;
74
74
on (
75
75
eventType : EventType ,
76
- callback : ( a : DataSnapshot | null , b ?: string ) => any ,
77
- cancelCallbackOrContext ?: Object | null ,
78
- context ?: Object | null
79
- ) : ( a : DataSnapshot | null , b ?: string ) => any ;
76
+ callback : ( a : DataSnapshot , b ?: string ) => any ,
77
+ cancelCallbackOrContext ?: ( ( a : Error ) => any ) | Object ,
78
+ context ?: Object
79
+ ) : ( a : DataSnapshot , b ?: string ) => any ;
80
80
once (
81
81
eventType : EventType ,
82
82
successCallback ?: ( a : DataSnapshot , b ?: string ) => any ,
83
- failureCallbackOrContext ?: Object | null ,
84
- context ?: Object | null
83
+ cancelCallbackOrContext ?: ( ( a : Error ) => void ) | Object ,
84
+ context ?: Object
85
85
) : Promise < DataSnapshot > ;
86
86
orderByChild ( path : string ) : Query ;
87
87
orderByKey ( ) : Query ;
Original file line number Diff line number Diff line change @@ -263,7 +263,11 @@ export class Query {
263
263
* @param {(function(!DataSnapshot, ?string=))= } callback
264
264
* @param {Object= } context
265
265
*/
266
- off ( eventType ?: string , callback ?: SnapshotCallback , context ?: Object ) {
266
+ off (
267
+ eventType ?: string ,
268
+ callback ?: SnapshotCallback ,
269
+ context ?: Object
270
+ ) : void {
267
271
validateArgCount ( 'Query.off' , 0 , 3 , arguments . length ) ;
268
272
validateEventType ( 'Query.off' , 1 , eventType , true ) ;
269
273
validateCallback ( 'Query.off' , 2 , callback , true ) ;
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export class DataEvent implements Event {
65
65
| ' child_removed' ,
66
66
public eventRegistration : EventRegistration ,
67
67
public snapshot : DataSnapshot ,
68
- public prevName ?: string | null
68
+ public prevName ?: string
69
69
) { }
70
70
71
71
/**
You can’t perform that action at this time.
0 commit comments