-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from microsoft/tsconfig_doc
TSConfig Reference Overview
- Loading branch information
Showing
144 changed files
with
2,891 additions
and
1,625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Website | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Check out, and set up the node/ruby infra | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
|
||
# Get local dependencies | ||
- run: yarn install | ||
- run: yarn bootstrap | ||
- run: yarn build | ||
|
||
# PR: Deploy if we can | ||
- name: Deploy PR Version | ||
if: github.event_name == 'pull_request' | ||
run: 'if test -z "$NOW_ACCESS_TOKEN"; then echo "Skipping deploy"; | ||
else npx now packages/typescriptlang-org/public/ --token="$NOW_ACCESS_TOKEN" --name="typescript-v2-$PR_NUMBER"; fi' | ||
env: | ||
NOW_ACCESS_TOKEN: ${{ secrets.NOW_ACCESS_TOKEN }} | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
|
||
# Run any tests | ||
- run: yarn workspaces run test --ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,5 +66,3 @@ typings/ | |
# tdsx | ||
dist | ||
|
||
packages/typescriptlang-org/schema.json | ||
packages/typescriptlang-org/apollo.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": false, | ||
"printWidth": 120 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.rts2_cache*": true | ||
} | ||
} | ||
}, | ||
"workbench.colorCustomizations": { | ||
"activityBar.background": "#3178C6", | ||
"activityBar.foreground": "#000000", | ||
"activityBar.inactiveForeground": "#15202b99", | ||
"activityBarBadge.background": "#ffffff", | ||
"activityBarBadge.foreground": "#15202b" | ||
}, | ||
"peacock.color": "#3178C6", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### Generating the TSConfig Reference | ||
|
||
This "package" hosts multi-lingual docs for the TSConfig. As much as possible is based | ||
off pulling data from `require("typescript")` then augmented with markdown from inside the | ||
[`./copy`](./copy) folder. | ||
|
||
## Contributing | ||
|
||
To improve a single compiler option's documentation; all you need to do is go into the [`./copy`](./copy) folder and | ||
edit the page option in markdown and send a PR. No need to leave GitHub. | ||
|
||
Then, during a deploy, all of the markdown files are bundled together and any merged changes are uploaded. | ||
|
||
## Contributing a new language | ||
|
||
If you'd like to create a new language: | ||
|
||
- Do you plan on making an evening or two on it and go all out? then you can use the | ||
script [`./scripts/createLanguage.ts`](./scripts/createLanguage.ts) to set up a new language. | ||
|
||
- Do you want to work on it incrementally? Create a new subfolder in `./copy` with your language code and | ||
then make sure the files you work on have the same name as English and your changes will overwrite the English | ||
version. | ||
|
||
## Building | ||
|
||
The TSConfig reference is created by a two step process: | ||
|
||
- Creating the JSON dump of all the useful info via [`./scripts/generateJSON.ts`](scripts/generateJSON.ts) which you can find in [`./data`](./data). | ||
|
||
- A script which uses the JSON, and the copy to generate per-language markdown docs which are meant to be embedded inside webpages `` |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Additional_Checks_6176.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Additional Checks" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Advanced_Options_6178.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Advanced" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Basic_Options_6172.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Basic Options" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Command_line_Options_6171.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Command Line" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Experimental_Options_6177.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Experimental" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Module_Resolution_Options_6174.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Module Resolution" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/categories/Source_Map_Options_6175.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Source Maps" | ||
--- | ||
|
||
Additional Checks Copy |
5 changes: 5 additions & 0 deletions
5
...ages/tsconfig-reference/copy/en/categories/Strict_Type_Checking_Options_6173.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Strict Checks" | ||
--- | ||
|
||
Additional Checks Copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Allow JS" | ||
--- | ||
|
||
Allow javascript files to be compiled. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/allowSyntheticDefaultImports.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Allow Synthetic Default Imports" | ||
--- | ||
|
||
Allow default imports from modules with no default export. This does not affect code emit, just typechecking. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/allowUmdGlobalAccess.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Allow Umd Global Access" | ||
--- | ||
|
||
Allow accessing UMD globals from modules. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/allowUnreachableCode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Allow Unreachable Code" | ||
--- | ||
|
||
Do not report errors on unreachable code. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/allowUnusedLabels.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Allow Unused Labels" | ||
--- | ||
|
||
Do not report errors on unused labels. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Always Strict" | ||
--- | ||
|
||
Parse in strict mode and emit "use strict" for each source file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Base Url" | ||
--- | ||
|
||
Base directory to resolve non-absolute module names. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Charset" | ||
--- | ||
|
||
The character set of the input files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Check JS" | ||
--- | ||
|
||
Report errors in .js files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Composite" | ||
--- | ||
|
||
Enable project compilation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Declaration" | ||
--- | ||
|
||
Generates corresponding '.d.ts' file. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/declarationDir.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Declaration Dir" | ||
--- | ||
|
||
Output directory for generated declaration files. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/declarationMap.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Declaration Map" | ||
--- | ||
|
||
Generates a sourcemap for each corresponding '.d.ts' file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Diagnostics" | ||
--- | ||
|
||
Show diagnostic information. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/disableSizeLimit.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Disable Size Limit" | ||
--- | ||
|
||
Disable size limitations on JavaScript projects. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/downlevelIteration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Downlevel Iteration" | ||
--- | ||
|
||
Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Emit B O M" | ||
--- | ||
|
||
Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/emitDeclarationOnly.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Emit Declaration Only" | ||
--- | ||
|
||
Only emit '.d.ts' declaration files. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/emitDecoratorMetadata.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Emit Decorator Metadata" | ||
--- | ||
|
||
Enables experimental support for emitting type metadata for decorators. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/esModuleInterop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Es Module Interop" | ||
--- | ||
|
||
Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/experimentalDecorators.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Experimental Decorators" | ||
--- | ||
|
||
Enables experimental support for ES7 decorators. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/extendedDiagnostics.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Extended Diagnostics" | ||
--- | ||
|
||
Show verbose diagnostic information. |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/forceConsistentCasingInFileNames.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Force Consistent Casing In File Names" | ||
--- | ||
|
||
Disallow inconsistently-cased references to the same file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Import Helpers" | ||
--- | ||
|
||
Import emit helpers from 'tslib'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Incremental" | ||
--- | ||
|
||
Enable incremental compilation |
5 changes: 5 additions & 0 deletions
5
packages/tsconfig-reference/copy/en/options/inlineSourceMap.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
display: "Inline Source Map" | ||
--- | ||
|
||
Emit a single file with source maps instead of having a separate file. |
Oops, something went wrong.