Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): use correct default export #901

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

plushdohn
Copy link

This PR fixes #862 by ensuring classes defined under the postgres namespace aren't also available as a named export, but only under the default postgres. export.

I've tested the change by patching the module in my projects, but I'm not sure if under some specific Typescript scenarios the behaviour could be incorrect.


Trying to import PostgresError as a named export:

Screenshot 2024-06-24 at 12 30 01

And here's the correct usage using the default export:

Screenshot 2024-06-24 at 12 31 14

@blechatellier
Copy link

Would like this one merged please 👍

@porsager
Copy link
Owner

Needs some more thumbs up from other typescript users to confirm this doesn't break anything? (i don't use typescript so can't tell)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect type definitions causing confusion when trying to catch PostgresError
3 participants