Skip to content

Conversation

jameshfisher
Copy link

Using pg-connection-string with @types/pg currently results in a type error like this:

Argument of type 'ConnectionOptions' is not assignable to parameter of type 'PoolConfig'.
  Types of property 'database' are incompatible.
    Type 'string | null | undefined' is not assignable to type 'string | undefined'.
      Type 'null' is not assignable to type 'string | undefined'.ts(2345)

See clashing definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/08f0feedca9329fe95d23ccc64886e3db03195bf/types/pg/index.d.ts#L18

Using pg-connection-string with @types/pg currently results in a type error like this:

    Argument of type 'ConnectionOptions' is not assignable to parameter of type 'PoolConfig'.
      Types of property 'database' are incompatible.
        Type 'string | null | undefined' is not assignable to type 'string | undefined'.
          Type 'null' is not assignable to type 'string | undefined'.ts(2345)

See clashing definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/08f0feedca9329fe95d23ccc64886e3db03195bf/types/pg/index.d.ts#L18
@hjr3 hjr3 self-requested a review April 11, 2025 10:22
@hjr3 hjr3 self-assigned this Apr 11, 2025
@hjr3
Copy link
Collaborator

hjr3 commented Apr 11, 2025

There are more problems with having ConnectionOptions match ClientConfig. See #2280

We landed #3128 to remedy this issue. Please let me know if you are still having problems.

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.

2 participants