Comments (5)
At present, the biggest problem is that flutter is imported through package.
This is completely different from ts or JS
So the d.ts file cannot be generated if TS is used for editing.
So I would like to write a script like Babel that converts all flutter code into ts.
This facilitates writing and completes the effect in this way.
from astprinter.
Hi @fangkyi03, thanks for your interest in astprinter!
This is currently a command line tool which works with files. It will take a file in, and it will output AST as a string. You can't use it programmatically as a library.
However, it won't be hard to make it into a library, I'd be interested in doing that. Would you mind sharing how you'd like to ideally use it? What sort of features are important to you?
Thanks
from astprinter.
Hello, I actually have an idea that I want to convert flutter code into ts.
It also supports converting TS code into flutter
After all, the code in the flutter section is really too verbose.
I want to write flutter in a react-like way
In order to get through all the mobile phone development links
from astprinter.
This is great! I've long been wishing flutter was more react-like.
So astprinter may not be that useful to you in this case, as all it does is output the entire AST as a string. This is usually helpful to have as a reference while developing a transformer that acts on the actual AST with its type information intact.
Take a look at how this package uses the analyzer to parse and traverse a file's AST. Here's an example that transforms JSX (DSX) to regular Flutter code https://spark-heroku-dsx.herokuapp.com/index.html
from astprinter.
I found a way to write react directly in dart and use Babel or TS directly without using flutter's AST transformation.
from astprinter.
Related Issues (3)
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 astprinter.