merged
TanStack/db5:30 PM - Feb 18, 2026
kevin-dp
autofix-ci[bot]

Tightens TypeScript typing for collection utilities across Electric, Trailbase, PowerSync, and local-only collections so utils retain their concrete types through createCollection (especially when handler callbacks like onInsert/onUpdate/onDelete are present), and adds type-level tests to prevent regressions. This improves developer experience and correctness by avoiding widened UtilsRecord types and enabling safer autocomplete/compile-time guarantees across adapters. Main concerns are potential breaking type changes for downstream consumers relying on the previous widened behavior, plus the risk that overload/inference tweaks could expose new edge-case typing conflicts across different collection config shapes despite tests passing.