This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11185|Reply: 0

[TypeScript] Use the tsconfig configuration file

[Copy link]
Posted on 7/3/2018 9:35:26 AM | | | |
function

Guides the compiler on how to generate JS files

parameter

target: 编译目标平台(es3, es5, es2015)
module: 组织代码方式(commonjs, AMD)
sourceMap: The compilation file correspondence
outDir: Output directory
exclude: The compiled directory that is not included
removeComments: Whether the compiled Javascrip{filter}t file removes comments
noImplicitAny:true/false; false, if the compiler cannot determine the type based on the use of the variable, it will be replaced with any type. If true, a strong type check will result in an error
tasks.json: Specifies the command to compile
"sourceMap": true When compiling the ts file into a js file, the corresponding map file is generated at the same time
"removeComments": true When compiling js, delete the comments

More parameters explained:https://www.tslang.cn/docs/handbook/compiler-options.html

After configuring the tsconfig.json file, run the following command:









Previous:js.map file meaning (turn)
Next:seo title keyword description word limit Title, keywords, descrip{filter}tion length
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com