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

[Feature Request] Support node subpath Import statements (import statements starting with #) #270

Open
alexblazevski opened this issue Aug 15, 2024 · 0 comments

Comments

@alexblazevski
Copy link

Is your feature request related to a problem? Please describe.
I'm using nodejs imports in my repo: https://nodejs.org/api/packages.html#imports, which mean that the imports start with #.

Say i have the following model:

/// @zod.import(["import { myFunction } from '#functions/myFunction'"])
model RandomModel {
  randomField                    String /// @zod.custom.use(myFunction)
}

When i try to generate, i get this error:

[@zod generator error]: import statement is not valid. Check for unusal characters. [Error Location]: Model: 'RandomModel'.

Describe the solution you'd like
Id like to be able to use imports that start with a #. I assume the # character needs to be whitelisted from whatever check is being done on the import statements

Thanks :)

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

1 participant