Skip to content

Commit e954dba

Browse files
authored
Expose PostgresError on module (porsager#227)
Fixes porsager#226.
1 parent 2ea8204 commit e954dba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function notTagged() {
3333
}
3434

3535
Object.assign(Postgres, {
36+
PostgresError,
3637
toPascal,
3738
toCamel,
3839
toKebab,

types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ type UnwrapPromiseArray<T> = T extends any[] ? {
103103
[k in keyof T]: T[k] extends Promise<infer R> ? R : T[k]
104104
} : T;
105105

106-
type PostgresErrorType = PostgresError
106+
type PostgresErrorType = typeof PostgresError
107107

108108
declare namespace postgres {
109-
type PostgresError = PostgresErrorType
109+
export const PostgresError: PostgresErrorType;
110110

111111
/**
112112
* Convert a string to Pascal case.

0 commit comments

Comments
 (0)