-
-
Notifications
You must be signed in to change notification settings - Fork 540
Clarify README for tsx/jsx endings. #1179
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1179 +/- ##
==========================================
- Coverage 79.74% 79.48% -0.26%
==========================================
Files 12 12
Lines 780 780
Branches 165 165
==========================================
- Hits 622 620 -2
Misses 102 102
- Partials 56 58 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This isn't entirely unambiguous, as you could read it as both tsx and jsx are enabled if you set |
Good point; how do you feel about this wording? Too verbose? Still ambiguous? **TypeScript Node** works by registering the TypeScript compiler for `.ts`, `.tsx`, `.js`, and `.jsx` extensions.
`.js` and `.jsx` are only registered when allowJs is true. `.tsx` and `.jsx` are only registered when jsx is enabled.
When node.js has an extension registered (via `require.extensions`), it will use the extension internally for module resolution.
When an extension is unknown to node.js, it handles the file as `.js` (JavaScript). By default, **TypeScript Node** avoids compiling files in `/node_modules/` for three reasons: |
No, that's better 👍 |
I changed it. I left the link in to make it obvious that jsx refers to the compiler option in this context. |
Thanks, I took your lead and also added the best link I could find for allowJs. If it looks good to you, I'll go ahead and merge. |
Well we both tried to quote jsx at the same time. I guess you were faster 😋 LGTG |
Perfect, thank you! |
Fix #1178