Skip to content

pg: Re-export DatabaseError from 'pg-protocol'#2445

Merged
brianc merged 3 commits intobrianc:masterfrom
cakoose:reexport-databaseerror
Mar 22, 2021
Merged

pg: Re-export DatabaseError from 'pg-protocol'#2445
brianc merged 3 commits intobrianc:masterfrom
cakoose:reexport-databaseerror

Conversation

@cakoose
Copy link
Contributor

@cakoose cakoose commented Jan 17, 2021

Before, users would have to import DatabaseError from 'pg-protocol'. If
there are multiple versions of 'pg-protocol', you might end up using the
wrong one.

Closes #2378

@cakoose cakoose force-pushed the reexport-databaseerror branch 2 times, most recently from dbfd1cf to 7a649d3 Compare January 18, 2021 01:57
Before, users would have to import DatabaseError from 'pg-protocol'. If there are multiple versions of 'pg-protocol', you might end up using the wrong one. Closes brianc#2378
@cakoose cakoose force-pushed the reexport-databaseerror branch from 7a649d3 to b3dc879 Compare January 18, 2021 02:12
@brianc brianc merged commit 4b22927 into brianc:master Mar 22, 2021
@Minishlink
Copy link

@cakoose I'm not sure how you consume it? Since pg is not a Typescript project, there's no types associated to DatabaseError even if pg-protocol is a Typescript project. Or am I missing something here?

@cakoose
Copy link
Contributor Author

cakoose commented May 7, 2021

Thanks for the reminder! Just opened a PR for "@types/pg": DefinitelyTyped/DefinitelyTyped#52804

(I had to wait until this landed before opening the PR on DefinitelyTyped. The last attempt opened the PR too early: DefinitelyTyped/DefinitelyTyped#49188)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants