With the new --typescript option, Create React App generates a dependency on the typescript compiler (among several other changes). However it uses @babel/preset-typescript for compiling TypeScript. So what does it use the TypeScript compiler for? Also, what is the tsconfig.js file used for?
1 Answer
@babel/plugin-transform-typescript that is used by @babel/preset-typescript doesn't make type checking, it just strips out type information which is much faster. For type checking you need to install and set up TypeScript.
https://babeljs.io/docs/en/babel-plugin-transform-typescript/
tsconfigthe settings which specifies the root files, and other options required to compile the application.