Sharing types between Nest.js and Nextjs #10582
Unanswered
browinskipl
asked this question in
Help
Replies: 2 comments 1 reply
-
|
How about we use Zod as a common package and then we can use the infer type to share the types b/w the two ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
If you're willing to consider a pure TS approach -- look at typia (and nestia). |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Summary
Hi everyone,
just wanted to make sure what's the proper way to share types between nestjs and nextjs.
There are entities in nestjs app with decorators etc., so I think a normal interface/type is not a better way to use in controllers/services etc.
On the other way I think it's not possible to use entities in nextjs app.
How to do it correctly?
Thanks
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions