(
params: UpdateMutationFnParams<T, TKey, LocalOnlyCollectionUtils>,
)
| 211 | * Wrapper for onUpdate handler that also confirms the transaction immediately |
| 212 | */ |
| 213 | const wrappedOnUpdate = async ( |
| 214 | params: UpdateMutationFnParams<T, TKey, LocalOnlyCollectionUtils>, |
| 215 | ) => { |
| 216 | // Call user handler first if provided |
| 217 | let handlerResult |
| 218 | if (onUpdate) { |
| 219 | handlerResult = (await onUpdate(params)) ?? {} |
| 220 | } |
| 221 | |
| 222 | // Then synchronously confirm the transaction by looping through mutations |
| 223 | syncResult.confirmOperationsSync(params.transaction.mutations) |
| 224 | |
| 225 | return handlerResult |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Wrapper for onDelete handler that also confirms the transaction immediately |
nothing calls this directly
no outgoing calls
no test coverage detected