From 3c6ad61bd768501c0546a9089439c9d3c8136bab Mon Sep 17 00:00:00 2001 From: BrendanC23 <4711227+BrendanC23@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:12:20 -0600 Subject: [PATCH] Add SQL_TXN_* types to TypeScript definition The odbc object contains transaction isolation level constants that were not included in the TypeScript definition. They could be accessed at runtime but the TypeScript compiler would give a compile-time error. This commit exposes the following constants (all have type `number`): * `SQL_TXN_READ_UNCOMMITTED` * `SQL_TXN_READ_COMMITTED` * `SQL_TXN_REPEATABLE_READ` * `SQL_TXN_SERIALIZABLE` Note that the odbc object also has constants with the full word "transaction" (ex: `SQL_TRANSACTION_READ_UNCOMMITTED`) that have the same value. It also has constants for various SQL types. Signed-off-by: BrendanC23 <4711227+BrendanC23@users.noreply.github.com> --- lib/odbc.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/odbc.d.ts b/lib/odbc.d.ts index 4907643a..3ae4ff3e 100644 --- a/lib/odbc.d.ts +++ b/lib/odbc.d.ts @@ -205,6 +205,11 @@ declare namespace odbc { function pool(connectionString: string): Promise; function pool(connectionObject: PoolParameters): Promise; + + const SQL_TXN_READ_UNCOMMITTED: number; + const SQL_TXN_READ_COMMITTED: number; + const SQL_TXN_REPEATABLE_READ: number; + const SQL_TXN_SERIALIZABLE: number; } export = odbc;