(eventType: EventType, successCallback?: (a: DataSnapshot, b: string) => any, failureCallbackContext?: (a: any) => void | Record<string, any>)
| 276 | } |
| 277 | |
| 278 | once(eventType: EventType, successCallback?: (a: DataSnapshot, b: string) => any, failureCallbackContext?: (a: any) => void | Record<string, any>): Promise<DataSnapshot> { |
| 279 | return new Promise((resolve, reject) => { |
| 280 | this.native.observeSingleEventOfTypeAndPreviousSiblingKeyWithBlockWithCancelBlock?.( |
| 281 | toFIRDataEventType(eventType), |
| 282 | (snapshot, key) => { |
| 283 | const ss = DataSnapshot.fromNative(snapshot); |
| 284 | successCallback?.(ss, key); |
| 285 | resolve(ss); |
| 286 | }, |
| 287 | (error) => { |
| 288 | failureCallbackContext?.({ |
| 289 | message: error.localizedDescription, |
| 290 | native: error, |
| 291 | }); |
| 292 | |
| 293 | reject({ |
| 294 | message: error.localizedDescription, |
| 295 | native: error, |
| 296 | }); |
| 297 | } |
| 298 | ); |
| 299 | }); |
| 300 | } |
| 301 | |
| 302 | orderByChild(path: string): Query { |
| 303 | return Query.fromNative(this.native.queryOrderedByChild(path)); |
nothing calls this directly
no test coverage detected