Reputation: 25793
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?
Upvotes: 2
Views: 391
Reputation: 1387
@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/
Upvotes: 2