-
Notifications
You must be signed in to change notification settings - Fork 926
Explore TypeScript Support #757
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
Comments
One thing I didn't think about was that Visual Studio already lets users transpile code on save from TypeScript to JavaScript. So this project should work just fine already with TypeScript -- which is being supported through a roundabout way (e.g. A developer hits save, Visual Studio transpiles from TS to JS and then React.NET now has JS files to work with). So maybe this might not be needed. The one thing that could be a pro is that there wouldn't be 2 files per React Component (e.g. a TS and generated JS file). Instead, we could disable the |
Yeah, an update to Babel 7 would be very nice. We should make the change opt in, so that people can still use Babel 6 if they need to. If you’d like to do some exploratory work, that would be great, otherwise I’ll take a look at this soon :) |
Upgrading to Babel 7 should be doable, we'd just need to double check that all the JS engines support it. The MSIE engine might not like it, but perhaps nobody is actually using that engine any more? I'm not sure. |
Yeah that’s part of why I’d like to make it opt in, but I’m pretty sure the
IE engine doesn’t work well anyway with the latest react.. not sure about
use stats :)
…On Tue, Mar 12, 2019 at 19:49, Daniel Lo Nigro ***@***.***> wrote:
Upgrading to Babel 7 should be doable, we'd just need to double check that
all the JS engines support it. The MSIE engine might not like it, but
perhaps nobody is actually using that engine any more? I'm not sure.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5hFv5J9zMDtzJ5wtvF-YWgTc808RU0ks5vWGc7gaJpZM4brbvg>
.
|
Yeah, latest React version does not work properly in IE due to the use of |
@Weffe These features are only supported in the |
Would love to see this! Also, I think avoiding any tooling that VS offers is wise as not everyone is necessarily using it and VS tends to add bad coupling that makes headless automation more difficult. |
Yeah, the plan is that users can use TSC manually if they need type
checking, and this library would just handle stripping the types off with
Babel 7.
…On Tue, Mar 26, 2019 at 06:37, Alexander Trauzzi ***@***.***> wrote:
Would love to see this! Also, I think avoiding any tooling that VS offers
is wise as not everyone is necessarily using it and VS tends to add bad
coupling that makes headless automation more difficult.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5hFvnLaPV9MJ2IcZSiHI3rsky_KEVIks5vafhigaJpZM4brbvg>
.
|
Intro
As of babel v7, TypeScript support has been added: https://babeljs.io/blog/2018/08/27/7.0.0#typescript-support-babel-preset-typescript
I personally love TypeScript and am sure others would love to see if TypeScript support could be added. As to my knowledge, babel does not do any type checking so that would be left to Visual Studio's intellisense and type checker. I think that works out fine because Visual Studio has pretty good TypeScript support and babel can be left to just transpile code.
What needs to change?
As of right now, the project will need to upgrade babel to v7. Proper configuration could be inspired from babel-preset-react-app.
Final Comments
I think TypeScript support would be an amazing feature to add to React.NET and would grant this project a wider audience. Especially those developers who prefer using TypeScript over JavaScript.
The text was updated successfully, but these errors were encountered: