-
-
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
Typescript generation of Generic Struct #2323
Comments
Tygo looks great. I'll look to see if we could just use that instead. |
Any update on this? |
Did you try using tygo to generate? |
I haven't try that. We can It looks promising. With this, I can match all of my Golang types with TS. I think we should add a document for using |
This won't be supported in v2 but will keep this open as a TODO for v3. |
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When using a generic struct as a return type of a public function, it generates invalid typescript
To Reproduce
Go
model.ts
Expected behaviour
It should generate a new generic type and use that instead
Screenshots
No response
Attempted Fixes
The only way to get around it is to return
interface{}
or something else that doesn't require generics.I tried this package and it was able to successfully generate the generics. Could possibly utilise that.
github.com/gzuidhof/tygo
System Details
Additional context
No response
The text was updated successfully, but these errors were encountered: