type TransactionWithMutations<T, TOperation, TCollection> = Omit<Transaction<T>, "mutations"> & object;type TransactionWithMutations<T, TOperation, TCollection> = Omit<Transaction<T>, "mutations"> & object;Defined in: packages/db/src/types.ts:156
Utility type for a Transaction with at least one mutation This is used internally by the Transaction.commit method
mutations: NonEmptyArray<PendingMutation<T, TOperation, TCollection>>;mutations: NonEmptyArray<PendingMutation<T, TOperation, TCollection>>;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
TCollection extends Collection<T, any, any, any, any> = Collection<T, any, any, any, any>