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

support tsx - typescript jsx files #145

Closed
prabirshrestha opened this issue Jun 30, 2015 · 8 comments
Closed

support tsx - typescript jsx files #145

prabirshrestha opened this issue Jun 30, 2015 · 8 comments

Comments

@prabirshrestha
Copy link

Typescript supports JSX via --jsx react flag for .tsx extensions. It is currently merged in master branch but will be released in 1.6.

microsoft/TypeScript#3564

@Daniel15
Copy link
Member

Daniel15 commented Aug 6, 2015

Hmm, I wonder how this would work. What language is the TypeScript compiler written in? Can I somehow embed it in ReactJS.NET?

@prabirshrestha
Copy link
Author

It is written in typescript but you can use the compiled javascript files.

JSX will be supported in typescript 1.6 which is not released yet. The best way to try it out is to use the nightly builds as documented in the ts readme.

npm install -g typescript@next

More details at http://www.jbrantly.com/typescript-and-jsx/

@xaclincoln
Copy link

Is typescript supported now (2015/10/24), guys?

@protron
Copy link

protron commented Jan 8, 2016

I configured my Visual Studio project to use typescript + jsx (tsx files). VS compiles those tsx files into js on save, and I use those js files as input for reactjs.net. Works great and now VS 2013 understands the html tags inside the javacript (which don't work in jsx files, but they do in tsx files).

@Daniel15
Copy link
Member

Closing this out since I think TypeScript is outside the scope of ReactJS.NET at the moment, and I won't get enough time to implement it. Personally I use Flow, and Flow types are already supported by Babel.

Unless someone wants to submit a pull request to add support! I'm always happy to accept pull requests :)

@ionescudev
Copy link

Flow ? I cant use flow in visual studio ( not visual code ).

@nmocruz

This comment has been minimized.

@dustinsoftware
Copy link
Member

This issue is really old but it’s always been possible to use webpack to build typescript files. With Babel 7 support it could probably support typescript types directly.

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

No branches or pull requests

7 participants