(tables: Tables, forceDel?: boolean)
| 636 | ); |
| 637 | |
| 638 | const setValidTables = (tables: Tables, forceDel?: boolean): TablesMap => |
| 639 | ifTransformed( |
| 640 | tables, |
| 641 | () => |
| 642 | forceDel |
| 643 | ? tables |
| 644 | : ifNotUndefined( |
| 645 | middleware[1], |
| 646 | (willSetTables) => |
| 647 | whileMutating(() => willSetTables(structuredClone(tables))), |
| 648 | () => tables, |
| 649 | ), |
| 650 | (validTables) => |
| 651 | mapMatch( |
| 652 | tablesMap, |
| 653 | validTables, |
| 654 | (_tables, tableId, table) => setValidTable(tableId, table), |
| 655 | (_tables, tableId) => delValidTable(tableId), |
| 656 | ), |
| 657 | objIsEqual, |
| 658 | ) as TablesMap; |
| 659 | |
| 660 | const setValidTable = ( |
| 661 | tableId: Id, |
no test coverage detected
searching dependent graphs…