Browse Source

Merge pull request #1705 from vvscode/patch-1

Fix command for initializing tsconfig
main
Alexey Pyltsyn 6 years ago
committed by GitHub
parent
commit
e7a4bf6420
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      content/docs/static-type-checking.md

12
content/docs/static-type-checking.md

@ -216,10 +216,18 @@ Congrats! You've installed the latest version of TypeScript into your project. I
``` ```
### Configuring the TypeScript Compiler {#configuring-the-typescript-compiler} ### 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:
If you use [Yarn](https://yarnpkg.com/), run:
```bash
yarn run tsc --init
```
If you use [npm](https://www.npmjs.com/), run:
```bash ```bash
tsc --init npx tsc --init
``` ```
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). 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).

Loading…
Cancel
Save