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

pg driver imports as value instead of types #55

Open
mbaklor opened this issue Jan 16, 2025 · 1 comment
Open

pg driver imports as value instead of types #55

mbaklor opened this issue Jan 16, 2025 · 1 comment

Comments

@mbaklor
Copy link

mbaklor commented Jan 16, 2025

it seems the current implementation of the pg driver imports the QueryArrayConfig and QueryArrayResult types as values, which typescript throws an error for.

Image

I have found the point in the code where this happens and tested locally a fix but I need time to fork and open a PR so for now I'm opening an issue in case someone else manages to do it first. I have also not tried yet other drivers to see if this issue exists elsewhere.

@gfx
Copy link

gfx commented Feb 4, 2025

+1

The following patch will fix it (probably!):

index 95828cf..848de1f 100644
--- a/src/drivers/pg.ts
+++ b/src/drivers/pg.ts
@@ -340,7 +340,7 @@ export class Driver {
       factory.createImportDeclaration(
         undefined,
         factory.createImportClause(
-          false,
+          true,
           undefined,
           factory.createNamedImports([
             factory.createImportSpecifier(

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

No branches or pull requests

2 participants