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

Typescript support #213

Closed
Pajn opened this issue Mar 22, 2017 · 3 comments · Fixed by #249
Closed

Typescript support #213

Pajn opened this issue Mar 22, 2017 · 3 comments · Fixed by #249

Comments

@Pajn
Copy link

Pajn commented Mar 22, 2017

Hello!
There is an ongoing effort to add TypeScript support to prettier. To do this, typescript-eslint-parser is used to convert the AST from TypeScript into an estree compatible format. Due to some additional syntax, additional node types is required. It would be awesome to collect those here.

I have started defining some of them here. So I opened this issue to check with you first, if you are interested in integrating this at all and secondly, how to handle the development process.
To not create to big PRs and ease collaboration it would be great to integrate often which mean that these types will be extended and may see some churn until things stabilize. Should I hold off sending these to you now and instead include them in the prettier PR so that they can move from there at a later point in time or do you prefer to keep the development here?

@benjamn
Copy link
Owner

benjamn commented Mar 22, 2017

Please feel free to open a WIP pull request with these changes, and push to it as you add more types. Thanks for working on this!

@benjamn
Copy link
Owner

benjamn commented Mar 22, 2017

I would love to support the full un-converted TypeScript AST at some point, but that's obviously a lot more work.

@georgeedwards
Copy link

Disclaimer: I am fairly far out of my knowledge zone here - but I am trying to add Typescript support to the feathers-cli whihc is dependant on this and in turn dependant on recast.

However, two thoughts,

  1. Can we not use the TypeScript's compiler API which has AST support, or at least see the sourcecode for the API?

  2. How about using he tscodeshift project as a startign point for AST definitons for TypeScript?

Appologies if I have missunderstood what is required here.

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

Successfully merging a pull request may close this issue.

3 participants