Skip to content
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

livescript + flow = awesome! #7

Open
AriaMinaei opened this issue Apr 1, 2017 · 1 comment
Open

livescript + flow = awesome! #7

AriaMinaei opened this issue Apr 1, 2017 · 1 comment

Comments

@AriaMinaei
Copy link

First off, thanks for the great work @dk00! I've been following this project from the beginning, and I couldn't be more excited about it and more grateful.

Now, I don't know if you've considered the possibility of adding type annotation syntax in the future, but just wanted to let you know that there is some new discussion about this in the flow issue tracker, and I thought you might want to weigh in.

@dk00
Copy link
Owner

dk00 commented Apr 1, 2017

babel-types refuses to create AST nodes with type annotations, but the code generator knows annotations and output them correctly.

We can build AST with type annotations, by adding them to AST nodes generated by babel-types:

declaration = t.function-declaration id, params, body, false false
declaration.return-type = t.type-annotation t.void-type-annotation!

Type annotation syntax can be implemented in this way, if it is added to livescript (gkz/LiveScript#803 ?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants