Skip to content

Commit 6754f99

Browse files
committed
Export more precise typings for data types. Expose the database error so that users can use instanceof checks
1 parent 289c40c commit 6754f99

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const DataTypeOIDs = {
130130
_varbit: 1563,
131131
_uuid: 2951,
132132
_jsonb: 3807,
133-
};
133+
} as const;
134134

135135
export const DataTypeNames = {
136136
[DataTypeOIDs.bool]: 'bool',
@@ -247,4 +247,4 @@ export const DataTypeNames = {
247247
[DataTypeOIDs._varbit]: '_varbit',
248248
[DataTypeOIDs._uuid]: '_uuid',
249249
[DataTypeOIDs._jsonb]: '_jsonb',
250-
};
250+
} as const;

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export { DatabaseError } from './protocol/database-error.js';
2+
13
export * from './constants.js';
24
export * from './data-type-map.js';
35
export * from './types.js';

0 commit comments

Comments
 (0)