Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 60c9fb3

Browse files
committed
Add docs for --keyofStringsOnly, --declarationMap and --resolveJsonModule`
Addresses microsoft/TypeScript#23627
1 parent cbfa0ca commit 60c9fb3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pages/Compiler Options.md

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Option | Type | Default
1212
`--checkJs` | `boolean` | `false` | Report errors in `.js` files. Use in conjunction with `--allowJs`.
1313
`--declaration`<br/>`-d` | `boolean` | `false` | Generates corresponding `.d.ts` file.
1414
`--declarationDir` | `string` | | Output directory for generated declaration files.
15+
`--declarationMap` | `boolean` | `false` | Generates a sourcemap for each corresponding '.d.ts' file.
1516
`--diagnostics` | `boolean` | `false` | Show diagnostic information.
1617
`--disableSizeLimit` | `boolean` | `false` | Disable size limitation on JavaScript project.
1718
`--downlevelIteration` | `boolean` | `false` | Provide full support for iterables in `for..of`, spread and destructuring when targeting ES5 or ES3.
@@ -29,6 +30,7 @@ Option | Type | Default
2930
`--isolatedModules` | `boolean` | `false` | Transpile each file as a separate module (similar to "ts.transpileModule").
3031
`--jsx` | `string` | `"Preserve"` | Support JSX in `.tsx` files: `"React"` or `"Preserve"`. See [JSX](./JSX.md).
3132
`--jsxFactory` | `string` | `"React.createElement"` | Specify the JSX factory function to use when targeting react JSX emit, e.g. `React.createElement` or `h`.
33+
`--keyofStringsOnly` | `boolean` | `false` | Resolve `keyof` to string valued property names only (no numbers or symbols).
3234
`--lib` | `string[]`| | List of library files to be included in the compilation.<br/>Possible values are: <br/>► `ES5` <br/>► `ES6` <br/>► `ES2015` <br/>► `ES7` <br/>► `ES2016` <br/>► `ES2017` <br/>► `ES2018` <br/>► `ESNext` <br/>► `DOM` <br/>► `DOM.Iterable` <br/>► `WebWorker` <br/>► `ScriptHost` <br/>► `ES2015.Core` <br/>► `ES2015.Collection` <br/>► `ES2015.Generator` <br/>► `ES2015.Iterable` <br/>► `ES2015.Promise` <br/>► `ES2015.Proxy` <br/>► `ES2015.Reflect` <br/>► `ES2015.Symbol` <br/>► `ES2015.Symbol.WellKnown` <br/>► `ES2016.Array.Include` <br/>► `ES2017.object` <br/>► `ES2017.Intl` <br/>► `ES2017.SharedMemory` <br/>► `ES2017.TypedArrays` <br/>► `ES2018.Intl` <br/>► `ES2018.Promise` <br/>► `ES2018.RegExp` <br/>► `ESNext.AsyncIterable` <br/>► `ESNext.Array` <br/><br/> Note: If `--lib` is not specified a default list of librares are injected. The default libraries injected are: <br/> ► For `--target ES5`: `DOM,ES5,ScriptHost`<br/> ► For `--target ES6`: `DOM,ES6,DOM.Iterable,ScriptHost`
3335
`--listEmittedFiles` | `boolean` | `false` | Print names of generated files part of the compilation.
3436
`--listFiles` | `boolean` | `false` | Print names of files part of the compilation.
@@ -63,6 +65,7 @@ Option | Type | Default
6365
`--project`<br/>`-p` | `string` | | Compile a project given a valid configuration file.<br/>The argument can be a file path to a valid JSON configuration file, or a directory path to a directory containing a `tsconfig.json` file.<br/>See [tsconfig.json](./tsconfig.json.md) documentation for more details.
6466
`--reactNamespace` | `string` | `"React"` | DEPRECATED. Use `--jsxFactory` instead.<br/>Specifies the object invoked for `createElement` and `__spread` when targeting `"react"` JSX emit.
6567
`--removeComments` | `boolean` | `false` | Remove all comments except copy-right header comments beginning with `/*!`
68+
`--resolveJsonModule` | `boolean` | `false` | Include modules imported with `.json` extension.
6669
`--rootDir` | `string` | *(common root directory is computed from the list of input files)* | Specifies the root directory of input files. Only use to control the output directory structure with `--outDir`.
6770
`rootDirs`<sup>[2]</sup> | `string[]`| | List of <i>root</i> folders whose combined content represent the structure of the project at runtime. See [Module Resolution documentation](./Module Resolution.md#virtual-directories-with-rootdirs) for more details.
6871
`--skipDefaultLibCheck` | `boolean` | `false` | DEPRECATED. Use `--skipLibCheck` instead.<br/>Skip type checking of [default library declaration files](./Triple-Slash Directives.md#-reference-no-default-libtrue).

0 commit comments

Comments
 (0)