Skip to content

Conversation

maxcbc
Copy link

@maxcbc maxcbc commented Oct 2, 2025

TransactionSql is missing properties from Sql added in

postgres/src/index.js

Lines 69 to 82 in 32feb25

Object.assign(sql, {
get parameters() { return options.parameters },
largeObject: largeObject.bind(null, sql),
subscribe,
CLOSE,
END: CLOSE,
PostgresError,
options,
reserve,
listen,
begin,
close,
end
})
.

This PR updates the type definition of TransactionSql to reflect this.

This means typescript will now raise an error if consuming code tries the following:

sql.begin((trx) => {
   trx.begin((trx2) => {
       ...
   })
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant