Comments (4)
Hmmm I'll look into that, can you open a new bug so I don't forget
from struct2ts.
Can you share an example struct?
from struct2ts.
Sure, here it is:
type FunctionCallResponse struct {
Data *mf.Data `json:"data"`
}
// Meanwhile, in package mf...
type Data map[string]interface{}
from struct2ts.
@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 };
from struct2ts.
Related Issues (20)
- Support anonymous (embedded) structs HOT 4
- To be compatible with the lastest tslint HOT 1
- Allow to change the struct name to upper-case when converting HOT 4
- NoDate option generates invalid typescript HOT 6
- How to handle go modules HOT 9
- Read source from vendor/ folder HOT 10
- Underscore in package name causes havoc HOT 4
- Can I use it with urls? HOT 1
- Examples for use in code HOT 1
- helper.ts: ToObject returns null if o == 0 or o == ""
- fatal error: stack overflow HOT 2
- Date to string type HOT 3
- Generate all Structs in a file HOT 1
- nullable arrays HOT 1
- []interface{} not converted to any[]
- Strict mode on ToObject
- Doesn't handle []*string
- Anything that is not `-` or `date` should be use as type for interfaces
- New release HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from struct2ts.