-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Typescript zod (and effect) language uses block scoped variables before they've been declared #2419
Conversation
…fined before they are referenced
@ryoid @Southclaws @dvdsgl any chance of a review on this PR? I believe it straightens out issues with generated typescript zod code in the current release. |
Yep! Will review next weekend. |
Much appreciated @dvdsgl |
adding a warning to Typescript Zod generator on (unlikely) exceeeding max num passes when determining output order + correcting a comment typo
I’m pretty sure the type graph already provides this for other languages where declaration order matters, although I am not sure where that functionality is. I think we can still merge this however, and replace it if there’s a built-in way to do it. |
Thank you! |
🎉
I did wonder if that was the case - but couldn't figure it out. If you come across the info let me know and I might be able to contribute a replacement using it one day. |
By ensuring that referenced types are defined before they are referenced. Tested on a fairly large set of interconnected schemas for the bridging API in the FDC3 standard.
Please let me know if there's a more idiomatic way to get to the types underlying sets, unions, intersections, arrays etc..
resolves #2414
@ryoid @Southclaws @dvdsgl
P.S. The TypeScript effect schema language uses the same code in its generation and probably also needs these changes - I don't have a test set-up for that one however.