(snapshots: DataSnapshot[] | null)
| 127 | }; |
| 128 | |
| 129 | const setValue = (snapshots: DataSnapshot[] | null): KeyValueState => { |
| 130 | if (!snapshots) { |
| 131 | return { |
| 132 | keys: [], |
| 133 | values: [], |
| 134 | }; |
| 135 | } |
| 136 | |
| 137 | const keys: string[] = []; |
| 138 | const values: DataSnapshot[] = []; |
| 139 | snapshots.forEach((snapshot) => { |
| 140 | if (!snapshot.key) { |
| 141 | return; |
| 142 | } |
| 143 | keys.push(snapshot.key); |
| 144 | values.push(snapshot); |
| 145 | }); |
| 146 | |
| 147 | return { |
| 148 | keys, |
| 149 | values, |
| 150 | }; |
| 151 | }; |
| 152 | |
| 153 | const addChild = ( |
| 154 | currentState: KeyValueState, |
no outgoing calls
no test coverage detected
searching dependent graphs…