tsconfig.json文件参数说明

本文详细介绍了TypeScript的配置文件tsconfig.json的各项参数,包括编译选项、源文件包含排除等,旨在帮助开发者更好地理解和使用TypeScript编译器。
摘要由CSDN通过智能技术生成
{
   
  "compilerOptions": {
   
    /* Visit https://aka.ms/tsconfig to read more about this file */

    /* Projects */
    // TS编译器在第一次编译之后会生成一个存储编译信息的文件,第二次编译会在第一次的基础上进行增量编译,可以提高编译的速度
    // "incremental": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */

    // 启用允许TS项目与项目引用一起使用的约束
    // "composite": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */

    // 增量编译文件的存储位置
    // "tsBuildInfoFile": "./.tsbuildinfo",              /* Specify the path to .tsbuildinfo incremental compilation file. */

    // 在引用组合项目时,禁用首选源文件而不是声明文件
    // "disableSourceOfProjectReferenceRedirect": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */

    // 编译时从多项目引用检查中选择一个项目
    // "disableSolutionSearching": true,                 /* Opt a project out of multi-project reference checking when editing. */

    // 减少TS自动加载的项目数量
    // "disableReferencedProjectLoad": true,             /* Reduce the number of projects loaded automatically by TypeScript. */

    /* Language and Environment */
    // TS需要引用的库,即声明文件,es5默认引用dom
    "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
    // "lib": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */

    // 指定生成的JSX代码
    // "jsx": "preserve",                                /* Specify what JSX code is generated. */

    // 启用对TC39第二阶段draft装饰器的实验支持
    "experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,

    // 为源文件中的修饰声明发出设计类型元数据
    // "emitDecoratorMetadata": true,                    /* Emit design-type metadata for decorated declarations in source files. */

    // "jsxFactory": "",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值