( config: TransactionConfig<T>, )
| 155 | * await tx.commit() |
| 156 | */ |
| 157 | export function createTransaction<T extends object = Record<string, unknown>>( |
| 158 | config: TransactionConfig<T>, |
| 159 | ): Transaction<T> { |
| 160 | const newTransaction = new Transaction<T>(config) |
| 161 | transactions.push(newTransaction) |
| 162 | return newTransaction |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * Gets the currently active ambient transaction, if any |
no outgoing calls
no test coverage detected