Skip to content

Commit

Permalink
Expose PostgresError on module (#227)
Browse files Browse the repository at this point in the history
Fixes #226.
  • Loading branch information
iby authored Sep 10, 2021
1 parent 2ea8204 commit e954dba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function notTagged() {
}

Object.assign(Postgres, {
PostgresError,
toPascal,
toCamel,
toKebab,
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ type UnwrapPromiseArray<T> = T extends any[] ? {
[k in keyof T]: T[k] extends Promise<infer R> ? R : T[k]
} : T;

type PostgresErrorType = PostgresError
type PostgresErrorType = typeof PostgresError

declare namespace postgres {
type PostgresError = PostgresErrorType
export const PostgresError: PostgresErrorType;

/**
* Convert a string to Pascal case.
Expand Down

0 comments on commit e954dba

Please sign in to comment.