Using as source of truth for types. Imported types aren't coming across. #234
Replies: 1 comment
-
Update: Looks like this was a bug on an open issue where imports don't go through without splitting multiple files. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So far I have been using this package in combination with custom validators in my Prisma schema to manage my types instead of maintaining a separate type file for something that would be 100% identical in most cases which would lead me open to inconsistencies and additional maintenance.
The issue arises when importing custom types on a field, for example:
Now when I import my Container type or schema from ZPT, the file doesn't have any reference of what this type is, or the types my custom type depends on.
Is there a way to ensure these custom type imports are actually imported into the generated file, along with the types they depend on? This feels like such a perfect solution but this students in the way.
I am quite new to JS development. Is this a bad idea? If so, what else could I do?
My only other idea at this point was to maintain a types file where I import the type in question from the ZPT file, import my custom types and make a new type based off of both.
Beta Was this translation helpful? Give feedback.
All reactions