-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Adds TSC_COMPILE_ON_ERROR env var... #6931
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
Changes from 2 commits
c1c56de
1955a07
c6c9bd8
e837044
92e381c
1d86b8a
1bedff1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,9 @@ yarn add typescript @types/node @types/react @types/react-dom @types/jest | |
|
||
Next, rename any file to be a TypeScript file (e.g. `src/index.js` to `src/index.tsx`) and **restart your development server**! | ||
|
||
Type errors will show up in the same console as the build one. | ||
Type errors will show up in the same console as the build one. By default, Create React App prevents you from running the dev server if your code has type errors. If you introduce type errors to your project, you have to fix or ignore them before you continue development. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather we omit this for now, as we don't want users to do this unless they absolutely must. Perhaps just as small snippet like "for advanced configuration, see (advanced config)" - as a terrible example. That way, people can find it if they need, but they won't assume it's a normal practice to use this. Ideally, this should never be used unless you're migrating a lot of legacy code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @mrmckeb I've changed the above to the following:
Now it doesn't explicitly or even implicitly encourage anyone to do this =) Thanks for your feedback! |
||
|
||
You can remove this restriction by running your app with the `TSC_COMPILE_ON_ERROR` environment variable set to `true`, for example, by adding `TSC_COMPILE_ON_ERROR=true` to your `.env` file. [Read more about setting environment variables here](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables). | ||
kylebebak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To learn more about TypeScript, check out [its documentation](https://www.typescriptlang.org/). | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.