@@ -17,41 +17,41 @@ Examples: tsc hello.ts
17
17
Options:
18
18
- h , -- help Print this message .
19
19
- w , -- watch Watch input files .
20
- -- pretty Stylize errors and messages using color and context ( experimental ) .
20
+ -- pretty Enable color and formatting in output to make compiler errors easier to read
21
21
-- all Show all compiler options .
22
22
- v , -- version Print the compiler 's version.
23
23
-- init Initializes a TypeScript project and creates a tsconfig . json file .
24
24
- p FILE OR DIRECTORY , -- project FILE OR DIRECTORY Compile the project given the path to its configuration file , or to a folder with a 'tsconfig.json' .
25
25
- b , -- build Build one or more projects and their dependencies , if out of date
26
- - t VERSION , -- target VERSION Specify ECMAScript target version : 'ES3' ( default ) , 'ES5' , 'ES2015' , 'ES2016' , 'ES2017' , 'ES2018' , 'ES2019' , 'ES2020' , 'ES2021' , or 'ESNEXT' .
27
- - m KIND , -- module KIND Specify module code generation: 'none' , 'commonjs' , 'amd' , 'system' , 'umd' , 'es2015' , 'es2020' , or 'ESNext' .
28
- -- lib Specify library files to be included in the compilation .
26
+ - t VERSION , -- target VERSION Set the JavaScript language version for emitted JavaScript and include compatible library declarations .
27
+ - m KIND , -- module KIND Specify what module code is generated .
28
+ -- lib Specify a set of bundled library declaration files that describe the target runtime environment .
29
29
'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'es2018' 'es2019' 'es2020' 'es2021' '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' 'es2018.intl' 'es2018.promise' 'es2018.regexp' 'es2019.array' 'es2019.object' 'es2019.string' 'es2019.symbol' 'es2020.bigint' 'es2020.promise' 'es2020.sharedmemory' 'es2020.string' 'es2020.symbol.wellknown' 'es2020.intl' 'es2021.promise' 'es2021.string' 'es2021.weakref' 'esnext.array' 'esnext.symbol' 'esnext.asynciterable' 'esnext.intl' 'esnext.bigint' 'esnext.string' 'esnext.promise' 'esnext.weakref'
30
- -- allowJs Allow javascript files to be compiled .
31
- -- jsx KIND Specify JSX code generation: 'preserve' , 'react-native' , 'react' , 'react-jsx' or 'react-jsxdev' .
32
- - d , -- declaration Generates corresponding ' .d.ts' file .
33
- -- declarationMap Generates a sourcemap for each corresponding '. d.ts' file .
34
- -- sourceMap Generates corresponding '. map' file .
35
- -- outFile FILE Concatenate and emit output to single file .
36
- -- outDir DIRECTORY Redirect output structure to the directory .
37
- -- removeComments Do not emit comments to output .
38
- -- noEmit Do not emit outputs .
30
+ -- allowJs Allow JavaScript files to be a part of your program . Use the `checkJS` option to get errors from these files .
31
+ -- jsx KIND Specify what JSX code is generated .
32
+ - d , -- declaration Generate . d . ts files from TypeScript and JavaScript files in your project .
33
+ -- declarationMap Create sourcemaps for d . ts files .
34
+ -- sourceMap Create source map files for emitted JavaScript files .
35
+ -- outFile FILE 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 .
36
+ -- outDir DIRECTORY Specify an output folder for all emitted files .
37
+ -- removeComments Disable emitting comments .
38
+ -- noEmit Disable emitting file from a compilation .
39
39
-- strict Enable all strict type - checking options .
40
- -- noImplicitAny Raise error on expressions and declarations with an implied ' any' type .
41
- -- strictNullChecks Enable strict null checks .
42
- -- strictFunctionTypes Enable strict checking of function types .
43
- -- strictBindCallApply Enable strict ' bind' , ' call' , and ' apply' methods on functions .
44
- -- strictPropertyInitialization Enable strict checking of property initialization in classes .
40
+ -- noImplicitAny Enable error reporting for expressions and declarations with an implied ` any` type . .
41
+ -- strictNullChecks When type checking , take into account ` null` and `undefined` .
42
+ -- strictFunctionTypes When assigning functions , check to ensure parameters and the return values are subtype - compatible .
43
+ -- strictBindCallApply Check that the arguments for ` bind` , ` call` , and ` apply` methods match the original function .
44
+ -- strictPropertyInitialization Check for class properties that are declared but not set in the constructor .
45
45
-- strictOptionalProperties Enable strict checking of optional properties .
46
- -- noImplicitThis Raise error on ' this' expressions with an implied ' any' type .
46
+ -- noImplicitThis Enable error reporting when ` this` is given the type ` any` .
47
47
-- useUnknownInCatchVariables Type catch clause variables as 'unknown' instead of 'any' .
48
- -- alwaysStrict Parse in strict mode and emit " use strict" for each source file .
49
- -- noUnusedLocals Report errors on unused locals .
50
- -- noUnusedParameters Report errors on unused parameters .
51
- -- noImplicitReturns Report error when not all code paths in function return a value .
52
- -- noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement .
53
- -- types Type declaration files to be included in compilation .
54
- -- esModuleInterop Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports . Implies 'allowSyntheticDefaultImports' .
48
+ -- alwaysStrict Ensure ' use strict' is always emitted .
49
+ -- noUnusedLocals Enable error reporting when a local variables aren 't read .
50
+ -- noUnusedParameters Raise an error when a function parameter isn 't read
51
+ -- noImplicitReturns Enable error reporting for codepaths that do not explicitly return in a function .
52
+ -- noFallthroughCasesInSwitch Enable error reporting for fallthrough cases in switch statements .
53
+ -- types Specify type package names to be included without being referenced in a source file .
54
+ -- esModuleInterop Emit additional JavaScript to ease support for importing CommonJS modules . This enables `allowSyntheticDefaultImports` for type compatibility .
55
55
@< file > Insert command line options and files from a file .
56
56
exitCode :: ExitStatus . DiagnosticsPresent_OutputsSkipped
57
57
0 commit comments