Jude
Jude
DTDrizzle Team
Created by Jude on 1/11/2024 in #help
How to type the Postgres transaction object?
I'm generating a transaction object using the following setup
await db.transaction(async (tx) => {
....
}
await db.transaction(async (tx) => {
....
}
What I'm trying to achieve is to be able to type the tx object when I pass it as a function but I'm not sure what the type should be.
const someFunctionCall = (tx : WhatIsTheTypeHere) => {
...
}
const someFunctionCall = (tx : WhatIsTheTypeHere) => {
...
}
8 replies