Comments (3)
According to the syn docs, this should be as simple as matching on syn::Type::Tuple(TypeTuple)
and then using the inner TypeTuple
to get the necessary data
from tsync.
Thanks again for the write up @Starwort. I agree, this should be very doable! Again, Iβd love help implementing this but at the moment I wonβt be able to address this right away.
from tsync.
Alongside supporting tuples themselves, it would be nice to also support structs, as noted in #46:
Input:
struct Todo(i32, String)
Output:
type Todo = [number, string]
from tsync.
Related Issues (16)
- Feature Request: Generate documentation in jsdoc format HOT 3
- Feature request - `undefined` fields using the "optional parameter" `?` syntax HOT 1
- Feature Request: Supporting `const` scalars such as numbers and strings + enums (?) HOT 5
- tsync from other proc-macros? HOT 3
- Const JSON does not compile HOT 4
- error[E0603]: enum `TokenTree` is private HOT 3
- Enums with custom types HOT 3
- Custom type mapping HOT 1
- [feature request] Honour `#[serde(rename = "...")]` in the generated TypeScript types HOT 2
- [bug] Numeric enum is not converted correctly on v2.0.0. HOT 1
- Feature request: support tuple structs HOT 4
- [feature request] Support serde flatten HOT 3
- Support for const enums HOT 3
- Fix broken CI workflow
- Enhanced enum support and types HOT 8
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 tsync.