You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am starting to use typia with NextJS. I was wondering if there is some fresh idea how to prevent co-developers from importing the functions from the template file instead of the generation result?
I have tried moving the template file out of the hierarchy for the project, but ide still seems to give two suggestions: the template file and the actual implementation generated from template... Just worried of what happens if someone is using the version from template file.
The text was updated successfully, but these errors were encountered:
damischa1
changed the title
When using typia in generate mode, how to prevent importing template file?
[Question] When using typia in generate mode, how to prevent importing template file?
Mar 2, 2024
I can try something like this. Not tried yet. Anyways it seems a little backwards, since the template file and (and the generated file) are using the types defined in the NextJS project. So the typia-module would have to have access to the source tree of the NextJS ptoject.
I was actually thinking something like this would be usefult.
More limited template file, with only typia function generator invocations. In template file nothing would be exported. But the generator would add export keywords to the generated file.
Then there would be nothing to import from the template file and not possible to have such issues.
IntelliJ Idea is suggesting still the two options: the template export and generated export.
This might be intended behaviour from the IDE, because the exclude does not exclude files from build if they are explicitly included from some another file. So importing from excluded files is perfectly valid: https://www.typescriptlang.org/tsconfig#exclude
Hello,
thanks for great type checking tool.
I am starting to use typia with NextJS. I was wondering if there is some fresh idea how to prevent co-developers from importing the functions from the template file instead of the generation result?
I have tried moving the template file out of the hierarchy for the project, but ide still seems to give two suggestions: the template file and the actual implementation generated from template... Just worried of what happens if someone is using the version from template file.
The text was updated successfully, but these errors were encountered: