Skip to content

Commit e7a4bf6

Browse files
authored
Merge pull request #1705 from vvscode/patch-1
Fix command for initializing tsconfig
2 parents 0569c21 + 0948bf5 commit e7a4bf6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

content/docs/static-type-checking.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,18 @@ Congrats! You've installed the latest version of TypeScript into your project. I
216216
```
217217

218218
### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler}
219-
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:
219+
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:
220+
221+
If you use [Yarn](https://yarnpkg.com/), run:
222+
223+
```bash
224+
yarn run tsc --init
225+
```
226+
227+
If you use [npm](https://www.npmjs.com/), run:
220228

221229
```bash
222-
tsc --init
230+
npx tsc --init
223231
```
224232

225233
Looking at the now generated `tsconfig.json`, you can see that there are many options you can use to configure the compiler. For a detailed description of all the options, check [here](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html).

0 commit comments

Comments
 (0)