(collection: ModCollection, config: ModConfig)
| 283 | } |
| 284 | |
| 285 | export function addMod(collection: ModCollection, config: ModConfig): ModCollection { |
| 286 | return { |
| 287 | ...collection, |
| 288 | items: { |
| 289 | ...collection.items, |
| 290 | [config.id]: { config, state: defaultState(config) }, |
| 291 | }, |
| 292 | }; |
| 293 | } |
| 294 | |
| 295 | export function updateModEntry(collection: ModCollection, entry: ModEntry): ModCollection { |
| 296 | return { |