Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is typescript compiler changing my tsconfig.json file on server start up?

I'm trying to move my react app to a react-typescript app. firstly, this seems really tricky which is disappointing

the issue I'm having is that I get typescript errors in my console. I'm trying to fix them by changing my tsconfig.json file

but whenever I do and restart the server, I get a message in the console saying: the following changes are being made to your tsconfig.json file and then it lists the changes which are basically "undos" of the stuff I've just added or changed. why would it do this?

it is a create-react-app project and I followed this to migrate to typescript: https://facebook.github.io/create-react-app/docs/adding-typescript

like image 340
Red Baron Avatar asked Dec 27 '18 12:12

Red Baron


People also ask

What is Tsconfig server json?

The tsconfig. json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig. json file instead, which acts almost the same but has some JavaScript-related compiler flags enabled by default.

Which of the following option is correct about Tsconfig json?

Correct Answer : Option (C) : This file is used to give the options about TypeScript used for the Angular JS project.


1 Answers

You can manually add a tsconfig.path.json file with all the compilerOptions included and add "extends": "./tsconfig.path.json" to your tsconfig file.

like image 199
Liang Mingyi Avatar answered Oct 19 '22 05:10

Liang Mingyi