-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix: ignore file from typechecking #1846
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request primarily involve the Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Hi @genu , thanks for making the PR. Is this the only error you see with the generated code? I'm thinking if we should actually prevent the error from being there. |
So far in my testing, that is the only error I see with the generated code. Fixing the error would be resolve it, true. Does type checking in these files have any benefit though? |
The generated code is supposed to always pass typechecking 😄, but just in case there is a real problem, I think it's still nice for typescript compiler to catch it before failing at runtime ... what do you think? |
Hmm, well, my thought process is that this is generated code, so even if there are type issues, there is nothing that I would be able to do about it. The type checks would maybe make more sense during testing on the zenstack side? 🤔 |
Right, if it fails it's a zenstack bug. With a second thought, I think we can proceed with adding ts-nocheck first. |
Merging it now. Will include it in the next patch release. Thank you! |
Generating the zod schemas in a project causes the schemas to be subject to typechecking.
There can be cases where the zod plugin adds an import which doens't end up being used. This raises typechecking errors.
I don't see a reason why these files need to be typechecked.