runTransaction

external fun runTransaction(ref: DatabaseReference, transactionUpdate: <Error class: unknown class>, options: <Error class: unknown class>? = definedExternally): <Error class: unknown class><TransactionResult>(source)

transactionUpdate is the JS function itself rather than a Kotlin function type: a value returned through a Kotlin function wrapper loses undefined (it becomes null, which the SDK writes as a deletion), and the SDK aborts on it.