-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: parse struct references for type generation #2552
fix: parse struct references for type generation #2552
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@leaanthony bump, just following up on this to get a review, thanks! |
👍 this looks way better |
Please LMK if you test this and it fixes your issue 👍 |
https://github.com/dominictwlee/test-ts-gen @zllovesuki minimal example. clone my fork, uncomment go.mod replace, point to local wails dir and you're good to go. TLDR; |
@leaanthony thanks for the review. Anything else you need from me to get this merged in? |
I was updating from 2.3.1 to 2.4.1 to fix the CreateWebResourceResponse issue and experienced this |
Thanks for this @dominictwlee. It would be good if you could update |
…fix-generate-regex
889b976
to
9213f14
Compare
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.
Thanks so much for this 🙏
* fix: parse struct references for type generation * chore: update changelog for typescript generation fix
this should fix the issues in v2.4.0 where reference type structs were breaking return types in Typescript. I think the issue stems from valueType capturing what should've been part of the valuePackage group because of ".+".
This should remedy the concerns raised in #2490 around stripping the asterix. In case we need it in the future, we could capture the asterix in a new group. I've added it to the non-capturing group for now.
@OlegGulevskyy @leaanthony let me know what you think.
I've also added a few additional cases to cover promise bindings.
closes #2489