How to infer connection type in TypeScript?
I'd like this function can receive transaction connection from another function, or can use normal db connection as default, so how to define type for this parameter?

1 Reply
I think this is what you're looking for. I use postgres, so I'm not 100% on this.
With this, the type you're looking for is
Database | Transaction
If you have the RQBv2 beta installed, it would look like this: