mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
Update static-type-checking.md
This commit is contained in:
@@ -216,9 +216,17 @@ Congrats! You've installed the latest version of TypeScript into your project. I
|
||||
```
|
||||
|
||||
### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler}
|
||||
The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file run:
|
||||
The compiler is of no help to us until we tell it what to do. In TypeScript, these rules are defined in a special file called `tsconfig.json`. To generate this file:
|
||||
|
||||
```bash
|
||||
If you use [Yarn](https://yarnpkg.com/), run:
|
||||
|
||||
```shell
|
||||
yarn run tsc --init
|
||||
```
|
||||
|
||||
If you use [npm](https://www.npmjs.com/), run:
|
||||
|
||||
```shell
|
||||
npx tsc --init
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user