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

Better typescript definitions + expose DatabaseError #36

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

Conversation

jacobdr
Copy link
Contributor

@jacobdr jacobdr commented Apr 17, 2024

  • Export more precise typings for data types
    This enabled the following:

    Screenshot 2024-04-17 at 10 40 06 AM
  • Expose the database error so that users can use instanceof checks
    This enabled the following:

    Screenshot 2024-04-17 at 10 41 58 AM

@erayhanoglu
Copy link
Member

erayhanoglu commented Apr 20, 2024

Hi Jacob,

  1. Exposing DatabaseError is ok.
  2. Setting DataTypeOIDs as const, i am not sure. We can not be sure that DataTypeOIDs is a complete list of all oids. So i think that it should allow adding items via augmentation. This is why we didn't use enum. Did you test that your code do not prevent augmentation?

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.

None yet

2 participants