(
params: DeleteMutationFnParams<T, TKey, LocalOnlyCollectionUtils>,
)
| 229 | * Wrapper for onDelete handler that also confirms the transaction immediately |
| 230 | */ |
| 231 | const wrappedOnDelete = async ( |
| 232 | params: DeleteMutationFnParams<T, TKey, LocalOnlyCollectionUtils>, |
| 233 | ) => { |
| 234 | // Call user handler first if provided |
| 235 | let handlerResult |
| 236 | if (onDelete) { |
| 237 | handlerResult = (await onDelete(params)) ?? {} |
| 238 | } |
| 239 | |
| 240 | // Then synchronously confirm the transaction by looping through mutations |
| 241 | syncResult.confirmOperationsSync(params.transaction.mutations) |
| 242 | |
| 243 | return handlerResult |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * Accepts mutations from a transaction that belong to this collection and persists them |
nothing calls this directly
no outgoing calls
no test coverage detected