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
Support circular dependencies with loops of length > 1 #114
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #114 +/- ##
==========================================
- Coverage 98.49% 95.55% -2.95%
==========================================
Files 8 13 +5
Lines 332 517 +185
Branches 102 172 +70
==========================================
+ Hits 327 494 +167
- Misses 5 20 +15
- Partials 0 3 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This PR addionally improve the generation process:
|
@fabien0102 Please check this out soon when you have time, so I can open further improvement PRs after this get merged, thanks! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just amazing! Huge thanks for this amazing contribution!!! 😍
@fabien0102 Thank you too for this amazing tool! |
* upstream/main: fix: support numeric literal keys (fabien0102#120) chore: release 3.0.0 (fabien0102#119) feat: Generate inferred types (fabien0102#85) feat!: Support circular dependencies with loops of length > 1 (fabien0102#114) build: add missing dependency on @oclif/errors (fabien0102#115)
Why
This PR add support for any circular dependencies with loops of length > 1 (unless there are missing dependencies)
Before this PR, This repo already supported types depending on itself with
z.lazy()
like:With
z.lazy()
actually circular dependencies with loops of length > 1 can also be supported, for example:With this PR will generate: