( state: Collection[], collectionId: number, data: any, )
| 206 | } |
| 207 | |
| 208 | function patchCollectionData( |
| 209 | state: Collection[], |
| 210 | collectionId: number, |
| 211 | data: any, |
| 212 | ): Collection[] { |
| 213 | return modifyCollection(state, collectionId, (c) => { |
| 214 | c.data = { ...c.data, ...data }; |
| 215 | }); |
| 216 | } |
| 217 | |
| 218 | function deleteCollection(state: Collection[], id: number): Collection[] { |
| 219 | const collection = findCollection(state, id); |
no test coverage detected