1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
.TH tsc "1" "November 2024" "Version 5.0.4" "User Commands"
.SH NAME
tsc - The TypeScript Compiler
.SH
COMMON COMMANDS
.PP
tsc
Compiles the current project (tsconfig.json in the working directory.)
.PP
tsc app.ts util.ts
Ignoring tsconfig.json, compiles the specified files with default compiler options.
.PP
tsc \fB\-b\fR
Build a composite project in the working directory.
.PP
tsc \fB\-\-init\fR
Creates a tsconfig.json with the recommended settings in the working directory.
.PP
tsc \fB\-p\fR ./path/to/tsconfig.json
Compiles the TypeScript project located at the specified path.
.PP
tsc \fB\-\-help\fR \fB\-\-all\fR
An expanded version of this information, showing all possible compiler options
.PP
tsc \fB\-\-noEmit\fR
tsc \fB\-\-target\fR esnext
Compiles the current project, with additional settings.
.SH
COMMAND LINE FLAGS
.PP
\fB\-\-help\fR, \fB\-h\fR
Print this message.
.PP
\fB\-\-watch\fR, \fB\-w\fR
Watch input files.
.PP
\fB\-\-all\fR
Show all compiler options.
.PP
\fB\-\-version\fR, \fB\-v\fR
Print the compiler's version.
.PP
\fB\-\-init\fR
Initializes a TypeScript project and creates a tsconfig.json file.
.PP
\fB\-\-project\fR, \fB\-p\fR
Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
.PP
\fB\-\-build\fR, \fB\-b\fR
Build one or more projects and their dependencies, if out of date
.PP
\fB\-\-showConfig\fR
Print the final configuration instead of building.
.PP
COMMON COMPILER OPTIONS
.PP
\fB\-\-pretty\fR
Enable color and formatting in TypeScript's output to make compiler errors easier to read.
type: boolean
default: true
.PP
\fB\-\-declaration\fR, \fB\-d\fR
Generate .d.ts files from TypeScript and JavaScript files in your project.
type: boolean
default: `false`, unless `composite` is set
.PP
\fB\-\-declarationMap\fR
Create sourcemaps for d.ts files.
type: boolean
default: false
.PP
\fB\-\-emitDeclarationOnly\fR
Only output d.ts files and not JavaScript files.
type: boolean
default: false
.PP
\fB\-\-sourceMap\fR
Create source map files for emitted JavaScript files.
type: boolean
default: false
.PP
\fB\-\-target\fR, \fB\-t\fR
Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
one of: es3, es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext
default: es5
.PP
\fB\-\-module\fR, \fB\-m\fR
Specify what module code is generated.
one of: none, commonjs, amd, umd, system, es6/es2015, es2020, es2022, esnext, node16, nodenext
default: undefined
.PP
\fB\-\-lib\fR
Specify a set of bundled library declaration files that describe the target runtime environment.
one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, 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, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, es2022.regexp, es2023.array/esnext.array, esnext.intl, decorators, decorators.legacy
default: undefined
.PP
\fB\-\-allowJs\fR
Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files.
type: boolean
default: false
.PP
\fB\-\-checkJs\fR
Enable error reporting in type\-checked JavaScript files.
type: boolean
default: false
.PP
\fB\-\-jsx\fR
Specify what JSX code is generated.
one of: preserve, react, react\-native, react\-jsx, react\-jsxdev
default: undefined
.PP
\fB\-\-outFile\fR
Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output.
.PP
\fB\-\-outDir\fR
Specify an output folder for all emitted files.
.PP
\fB\-\-removeComments\fR
Disable emitting comments.
type: boolean
default: false
.PP
\fB\-\-noEmit\fR
Disable emitting files from a compilation.
type: boolean
default: false
.PP
\fB\-\-strict\fR
Enable all strict type\-checking options.
type: boolean
default: false
.PP
\fB\-\-types\fR
Specify type package names to be included without being referenced in a source file.
.PP
\fB\-\-esModuleInterop\fR
Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility.
type: boolean
default: false
.PP
You can learn about all of the compiler options at https://aka.ms/tsc
|