Skip to content

support tsx - typescript jsx files #145

Description

@prabirshrestha

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

Activity

Daniel15 commented on Aug 6, 2015

@Daniel15
Contributor

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

prabirshrestha commented on Aug 6, 2015

@prabirshrestha
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 commented on Oct 24, 2015

@xaclincoln

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

protron commented on Jan 8, 2016

@protron

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 commented on Apr 13, 2016

@Daniel15
Contributor

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 :)

nmocruz commented on Mar 15, 2019

@nmocruz

dustinsoftware commented on Mar 16, 2019

@dustinsoftware
Contributor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions