-
Notifications
You must be signed in to change notification settings - Fork 15
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
Interface{} type not converted to any #13
Comments
Can you share an example struct? |
Sure, here it is:
|
hasenj
pushed a commit
to hasenj/struct2ts
that referenced
this issue
Jun 27, 2019
@OneOfOne Can this be extended to support arrays as well? A struct with Vars []map[string]interface{} `config:"vars" json:"vars,omitempty"` is still converted to: vars?: map[string]interface {}[]; but if we drop the array Vars map[string]interface{} `config:"vars" json:"vars,omitempty"` it's converted to vars?: { [key: string]: any }; |
Hmmm I'll look into that, can you open a new bug so I don't forget |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Small fix needed when converting an
interface{}
to typescript. At the moment the generated code is:While it should be:
The text was updated successfully, but these errors were encountered: