What is the type of transaction prop?

When creating a transaction I get this prop
const transaction = client.transaction((tx) => {
  
})

I am trying to define a function like this
async function createUser(client:Client | Transaction = db, data:Data){
client.insert(...)
}

This way I can reuse the same functions with and without a transaction, I am having trouble typing the Transaction type, the type in vscode is a long complex type and I was wondering if there is some exported type I could use
Was this page helpful?