type ResolveTransactionChanges<T, TOperation> = TOperation extends "delete" ? T : Partial<T>;
type ResolveTransactionChanges<T, TOperation> = TOperation extends "delete" ? T : Partial<T>;
Defined in: packages/db/src/types.ts:94
• T extends object = Record<string, unknown>
• TOperation extends OperationType = OperationType
update and insert are both represented as Partial<T>, but changes for insert could me made more precise by inferring the schema input type. In practice, this has almost 0 real world impact so it's not worth the added type complexity.
https://github.com/TanStack/db/pull/209#issuecomment-3053001206
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.