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

Fix 291: Add --lib documentation #315

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pages/Compiler Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Option | Type | Default
-----------------------------------------------|-----------|--------------------------------|----------------------------------------------------------------------
`--allowJs` | `boolean` | `true` | Allow JavaScript files to be compiled.
`--allowSyntheticDefaultImports` | `boolean` | `(module === "system")` | Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
`--allowUnreachableCode` | `boolean` | `false` | Do not report errors on unreachable code.
`--allowUnreachableCode` | `boolean` | `false` | Do not report errors on unreachable code.
`--allowUnusedLabels` | `boolean` | `false` | Do not report errors on unused labels.
`--charset` | `string` | `"utf8"` | The character set of the input files.
`--declaration`<br/>`-d` | `boolean` | `false` | Generates corresponding '.d.ts' file.
Expand All @@ -19,6 +19,7 @@ Option | Type | Default
`--init` | | | Initializes a TypeScript project and creates a `tsconfig.json` file.
`--isolatedModules` | `boolean` | `false` | Unconditionally emit imports for unresolved files.
`--jsx` | `string` | `"Preserve"` | Support JSX in '.tsx' files: `'React'` or `'Preserve'`. See [JSX](./JSX.md).
`--lib` | `string`<sup>[2]</sup> | *(target specific)* | Specify different library files to be used in compilation: `'es5'` `'es6'` `'es2015'` `'es7'` `'es2016'` `'es2017'` `'dom'` `'webworker'` `'scripthost'` `'es2015.core'` `'es2015.collection'` `'es2015.generator'` `'es2015.iterable'` `'es2015.promise'` `'es2015.proxy'` `'es2015.reflect'` `'es2015.symbol'` `'es2015.symbol.wellknown'` `'es2016.array.include'` `'es2017.object'` `'es2017.sharedmemory'`
`--listFiles` | `boolean` | `false` | Print names of files part of the compilation.
`--locale` | `string` | *(platform specific)* | The locale to use to show error messages, e.g. en-us.
`--mapRoot` | `string` | `null` | Specifies the location where debugger should locate map files instead of generated locations. Use this flag if the .map files will be located at run-time in a different location than than the .js files. The location specified will be embedded in the sourceMap to direct the debugger where the map files where be located.
Expand Down Expand Up @@ -55,6 +56,8 @@ Option | Type | Default

<sup>[1]</sup> These options are experimental.

<sup>[2]</sup> To specify more than one value for these options, use comma to separate between each value. These options when used in `tsconfig.json` will be array of string.

## Related

* Setting compiler options in [`tsconfig.json`](./tsconfig.json.md) files.
Expand Down