(eventType?: EventType, callback?: (a: DataSnapshot, b: string) => void, context?: Record<string, any>)
| 240 | _handles: Map<(a: DataSnapshot, b: string) => void, number> = new Map(); |
| 241 | |
| 242 | off(eventType?: EventType, callback?: (a: DataSnapshot, b: string) => void, context?: Record<string, any>): void { |
| 243 | const handle = callback?.['__fbHandle']; |
| 244 | const event = callback?.['__fbEventType']; |
| 245 | if (typeof handle === 'number' && event === eventType) { |
| 246 | if (this._handles.has(callback)) { |
| 247 | this.native.removeObserverWithHandle(handle); |
| 248 | callback['__fbHandle'] = undefined; |
| 249 | callback['__fbEventType'] = undefined; |
| 250 | callback['__fbContext'] = undefined; |
| 251 | this._handles.delete(callback); |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | on(eventType: EventType, callback: (data: DataSnapshot, previousChildKey: string) => void, cancelCallbackOrContext?: (a: any) => void | Record<string, any>, context?: Record<string, any>): (a: DataSnapshot, b: string) => void { |
| 257 | const handle = this.native?.observeEventTypeAndPreviousSiblingKeyWithBlockWithCancelBlock?.( |
nothing calls this directly
no test coverage detected