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
* 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