struct2ts
struct2ts copied to clipboard
[]interface{} not converted to any[]
From https://github.com/OneOfOne/struct2ts/issues/13#issuecomment-572788815
A struct with
Vars []map[string]interface{} `config:"vars" json:"vars,omitempty"`
is converted to:
vars?: map[string]interface {}[];
instead of
vars?: { [key: string]: any }[];
but if we drop the array
Vars map[string]interface{} `config:"vars" json:"vars,omitempty"`
it's converted to
vars?: { [key: string]: any };