zoukankan      html  css  js  c++  java
  • TypeScript

    {
      "compilerOptions": {
        // target 用来指定ts被编译为的ES版本
        // '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'esnext'.
        "target": "ES6",
        // 指定要使用的模块化的规范
        // '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'esnext'.
        "module": "System",
        // library 用来指定项目中要使用的库
        // 代码提示
        // '--lib' option must be: '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', 'es202.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'.
        // "lib": ['dom']
    
        // outDir 用来指定编译后文件所在的目录
        "outDir": "./dist",
    
        // outFile 将代码合并为一个文件
        // 设置outFile后,所有全局作用域中的代码 会合并到同一个文件, 但是如果文件中有模块引用,则module需要改为System
        // 该功能一般是打包工具来做,仅作了解,
        "outFile": "./dist/app.js",
    
        // 是否编辑js文件, 默认false
        "allowJs": true,
        // 是否检查js代码是否符合语法规范
        // js中, let a = 10; a = 'hello'; true的情况下,会变检查
        "checkJs": true,
    
        // 是否移除注释
        "removeComments": true,
    
        // 不生成编译后的文件 即dist内的东西
        "noEmit": false,
    
        // 当有错误的时候,是否生成编译文件,避免编译错误代码
        "noEmitOnError": true,
    
        // 语法检查相关属性
    
        // 所有严格检查的总开关, 下面的一些是否启动,即使后面的是true, 如果此处是false,同样不执行
        "strict": true,
    
        // 用来设置编译后的文件是否启用严格模式,默认false
        "alwaysStrict": true,
    
        // 否否允许隐式的any类型
        // function sum(a, b){ return a + b } 此处a b就是隐式的any
        "noImplicitAny": true,
    
        //不允许不明确类型的this
        // function a(){ console.log(this) }
        "noImplicitThis": true,
    
        // 是否检测null值
        "strictNullChecks": true
      }
    }
  • 相关阅读:
    DeepLearning.ai学习笔记(二)改善深层神经网络:超参数调试、正则化以及优化--Week2优化算法
    DeepLearning.ai学习笔记(二)改善深层神经网络:超参数调试、正则化以及优化--Week1深度学习的实用层面
    通俗理解决策树中的熵&条件熵&信息增益
    KNN实现手写数字识别
    softmax分类算法原理(用python实现)
    DeepLearning.ai学习笔记(一)神经网络和深度学习--Week4深层神经网络
    博客园自定义皮肤扁平化设计
    神经网络权重初始化问题
    OpenVirteX 安装
    从个人的角度谈谈本次GNTC大会的收获
  • 原文地址:https://www.cnblogs.com/ningxin/p/15094377.html
Copyright © 2011-2022 走看看