(events?: ChildEvent[], options?: {idField?: K})
| 29 | return auditTrail<T>(query, events, outsideAngularScheduler).pipe(pendingUntilEvent(injector)); |
| 30 | }, |
| 31 | valueChanges<K extends string>(events?: ChildEvent[], options?: {idField?: K}): Observable<(T & Record<string, string>)[]> { |
| 32 | const snapshotChanges$ = snapshotChanges<T>(query, events, outsideAngularScheduler); |
| 33 | return snapshotChanges$.pipe( |
| 34 | map(actions => actions.map(a => { |
| 35 | if (options && options.idField) { |
| 36 | return { |
| 37 | ...a.payload.val() as T, |
| 38 | ...{ |
| 39 | [options.idField]: a.key |
| 40 | } |
| 41 | }; |
| 42 | } else { |
| 43 | return a.payload.val() as T & Record<string, string> |
| 44 | } |
| 45 | })), |
| 46 | pendingUntilEvent(injector) |
| 47 | ); |
| 48 | } |
| 49 | }; |
| 50 | } |
nothing calls this directly
no test coverage detected