How to type connection as conn or transaction?

My attempt was like below:
export type DBConn = PgTransaction<NodePgQueryResultHKT, Record<string, never>, ExtractTablesWithRelations<Record<string, never>>> | NodePgDatabase<Record<string, never>>
export type DBConn = PgTransaction<NodePgQueryResultHKT, Record<string, never>, ExtractTablesWithRelations<Record<string, never>>> | NodePgDatabase<Record<string, never>>
but passing transaction to function using it raise error. Any idea?
1 Reply
Want results from more Discord servers?
Add your server