type TransactionWithMutations<T, TOperation> = Omit<Transaction<T>, "mutations"> & object;
type TransactionWithMutations<T, TOperation> = Omit<Transaction<T>, "mutations"> & object;
Defined in: packages/db/src/types.ts:139
Utility type for a Transaction with at least one mutation This is used internally by the Transaction.commit method
mutations: NonEmptyArray<PendingMutation<T, TOperation>>;
mutations: NonEmptyArray<PendingMutation<T, TOperation>>;
We must omit the mutations property from Transaction<T> before intersecting because TypeScript intersects property types when the same property appears on both sides of an intersection.
Without Omit:
With Omit:
T extends object = Record<string, unknown>
TOperation extends OperationType = OperationType
