diff --git a/packages/documentation/copy/en/project-config/tsconfig.json.md b/packages/documentation/copy/en/project-config/tsconfig.json.md index 8bfc6c7cc0e6..5e0af0fad2d3 100644 --- a/packages/documentation/copy/en/project-config/tsconfig.json.md +++ b/packages/documentation/copy/en/project-config/tsconfig.json.md @@ -102,6 +102,30 @@ The `"compilerOptions"` property can be omitted, in which case the compiler's de To learn more about the hundreds of configuration options in the [TSConfig Reference](/tsconfig). +## File format + +`tsconfig.json` files are interpreted as JSON with some exceptions: + +* Both single line `//` and multiline `/* ... */` comments are allowed. +* Trailing commas are allowed as well. + +```json tsconfig +{ + /** + * This is a valid tsconfig.json + */ + "extends": "@tsconfig/node12/tsconfig.json", + + "compilerOptions": { + "preserveConstEnums": true, // Do not erase const enum declarations in generated code. + }, + + "include": ["src/**/*"], + "exclude": ["**/*.spec.ts"], +} +``` + + ## Schema The `tsconfig.json` Schema can be found at [the JSON Schema Store](http://json.schemastore.org/tsconfig).