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

feat: verbatimModuleSyntax #57

Closed
wants to merge 1 commit into from
Closed

Conversation

jansedlon
Copy link
Contributor

Hi, i was feeling bad for opening up yet another issue so i gave it a try by myself.

However, i got stuck. In this part of code

if (this.handleVerbatimModuleSyntax && getVerbatimModuleSyntax()) {
  return `import { type ${names.join(', type ')} } from '${path}';`
}

return `import { ${names.join(', ')} } from '${renderImportPath(path)}';`

Regardless of what i tried, the this.handleVerbatimModuleSyntax is always false. It's like the this is overriden. I have tracked it down to this

https://github.com/farreldarian/prisma-generator-drizzle/blob/5d64493c0d1ab5aa720e1856983d0f8e3d5cc942/packages/generator/src/generator.ts#L136

In that part the this is somehow overriden and the handleVerbatimModuleSyntax becomes false

@jansedlon jansedlon marked this pull request as draft May 30, 2024 05:47
@fdarian
Copy link
Owner

fdarian commented May 30, 2024

Will look into this tomorrow, really appreciate your PR

@fdarian
Copy link
Owner

fdarian commented Jun 4, 2024

Many apologies for the delay, I think we should just use import type as default.

@jansedlon
Copy link
Contributor Author

No problem :) Yeah i think so, i just didn't want to introduce a breaking change

@fdarian
Copy link
Owner

fdarian commented Jun 4, 2024

No problem :) Yeah i think so, i just didn't want to introduce a breaking change

I think the type keyword wouldn't break anything. I'm gonna push some changes

@fdarian
Copy link
Owner

fdarian commented Jun 4, 2024

Here's my patch #60

@fdarian
Copy link
Owner

fdarian commented Jun 4, 2024

Feel free to test [email protected]

@jansedlon
Copy link
Contributor Author

Thanks!

@jansedlon jansedlon closed this Jun 5, 2024
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