// Fixture for `no-collections-in-stores`. Every line the rule must reject carries a trailing // `// flag`; every other line is correct code the rule must leave alone. // Checked by `scripts/anti-slop-rules.test.ts`; not compiled and not linted. const readOperations = new Map>(); const [collapsed, setCollapsed] = createStore({ sections: [] as string[], pending: false }); const [duplicating, setDuplicating] = createSignal>(new Set()); setDuplicating((current) => new Set(current).add(botId)); function reconcileRows(rows: readonly Row[]) { const byId = new Map(rows.map((row) => [row.id, row])); return byId; } const [seen, setSeen] = createStore({ ids: new Set() }); // flag const [index, setIndex] = createStore({ rows: new Map() }); // flag const [nested, setNested] = createStore({ view: { ids: new Set() } }); // flag const [bare, setBare] = createStore({ ids: new Set() }); // flag const [seeded, setSeeded] = createStore({ rows: new Map(rows.map((row) => [row.id, row])) }); // flag const [typed, setTyped] = createStore({ ids: new Set() }); // flag const [typedRows, setTypedRows] = createStore({ rows: new Map() }); // flag const [shallow, setShallow] = createStore({ rows: new Map() }, { shallow: true }); // flag