Angular应用中tsconfig.json文件配置说明及配置全局路径映射
tsconfig.json文件配置说明
- 1. tsconfig.json文件中的选项配置
- 2. 配置全局路径映射
1. tsconfig.json文件中的选项配置
TypeScript编译器配置文件的JSON模式
{"title": "JSON schema for the TypeScript compiler's configuration file","$schema": "http://json-schema.org/draft-04/schema#","definitions": {"filesDefinition": {"properties": {"files": {"description": "如果tsconfig.json文件中不存在files或者include属性, 则编译器包括包含目录和子目录中的所有文件,exclude属性指定的文件除外. 当指定files属性时, 仅包括files属性指定的文件和include属性指定的文件.","type": "array","items": {"type": "string"}}}},"excludeDefinition": {"properties": {"exclude": {"description": "指定要排除在编译之外的文件列表. exclude属性仅仅影响include属性包含的文件,而不影响files属性. 全局模式需要TypeScript 2.0或更改版本.","type": "array","items": {"type": "string"}}}},"includeDefinition": {"properties": {"include": {"description": "Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later.","type": "array","items": {"type": "string"}}}},"compileOnSaveDefinition": {"properties": {"compileOnSave": {"description": "Enable Compile-on-Save for this project.","type": "boolean"}}},"extendsDefinition": {"properties": {"extends": {"description": "Path to base configuration file to inherit from. Requires TypeScript version 2.1 or later.","type": "string"}}},"compilerOptionsDefinition": {"properties": {"compilerOptions": {"type": "object","description": "Instructs the TypeScript compiler how to compile .ts files.","properties": {"charset": {"description": "The character set of the input files.","type": "string"},"composite": {"description": "Enables building for project references.","type": "boolean"},"declaration": {"description": "Generates corresponding d.ts files.","type": "boolean"},"declarationDir": {"type": "string","description": "Specify output directory for generated declaration files. Requires TypeScript version 2.0 or later."},"diagnostics": {"description": "Show diagnostic information.","type": "boolean"},"emitBOM": {"description": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.","type": "boolean"},"emitDeclarationOnly": {"description": "Only emit '.d.ts' declaration files.","type": "boolean"},"incremental": {"description": "启用增量编译.","type": "boolean"},"tsBuildInfoFile": {"description": "指定用于存储增量编译信息的文件.","type": "string"},"inlineSourceMap": {"description": "Emit a single file with source maps instead of having a separate file.","type": "boolean"},"inlineSources": {"description": "Emit the source alongside the sourcemaps within a single file; requires --inlineSourceMap to be set.","type": "boolean"},"jsx": {"description": "Specify JSX code generation: 'preserve', 'react', or 'react-native'.","enum": [ "preserve", "react", "react-native" ]},"reactNamespace": {"description": "Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit.","type": "string"},"listFiles": {"description": "Print names of files part of the compilation.","type": "boolean"},"mapRoot": {"description": "Specifies the location where debugger should locate map files instead of generated locations","type": "string"},"module": {"description": "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015' or 'esnext'.","type": "string","anyOf": [{"enum": [ "commonjs", "amd", "umd", "system", "es6", "es2015", "esnext", "none" ]}, {"pattern": "^([cC][oO][mM][mM][oO][nN][jJ][sS]|[aAuU][mM][dD]|[sS][yY][sS][tT][eE][mM]|[eE][sS]([356]|(201[567])|[nN][eE][xX][tT])|[nN][oO][nN][eE])$"}]},"newLine": {"description": "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).","type": "string","anyOf": [{"enum": ["CRLF","LF"]},{"pattern": "^(CRLF|LF|crlf|lf)$"}]},"noEmit": {"description": "Do not emit output.","type": "boolean"},"noEmitHelpers": {"description": "Do not generate custom helper functions like __extends in compiled output.","type": "boolean"},"noEmitOnError": {"description": "Do not emit outputs if any type checking errors were reported.","type": "boolean"},"noImplicitAny": {"description": "Warn on expressions and declarations with an implied 'any' type.","type": "boolean"},"noImplicitThis": {"description": "Raise error on 'this' expressions with an implied any type.","type": "boolean"},"noUnusedLocals": {"description": "Report errors on unused locals. Requires TypeScript version 2.0 or later.","type": "boolean"},"noUnusedParameters": {"description": "Report errors on unused parameters. Requires TypeScript version 2.0 or later.","type": "boolean"},"noLib": {"description": "Do not include the default library file (lib.d.ts).","type": "boolean"},"noResolve": {"description": "Do not add triple-slash references or module import targets to the list of compiled files.","type": "boolean"},"noStrictGenericChecks": {"description": "Disable strict checking of generic signatures in function types.","type": "boolean"},"skipDefaultLibCheck": {"type": "boolean"},"skipLibCheck": {"description": "Skip type checking of declaration files. Requires TypeScript version 2.0 or later.","type": "boolean"},"outFile": {"description": "Concatenate and emit output to single file.","type": "string"},"outDir": {"description": "用于指定输出文件夹,值为一个文件夹路径字符串.","type": "string"},"preserveConstEnums": {"description": "Do not erase const enum declarations in generated code.","type": "boolean"},"preserveSymlinks": {"description": "Do not resolve symlinks to their real path; treat a symlinked file like a real one.","type": "boolean"},"preserveWatchOutput": {"description": "Keep outdated console output in watch mode instead of clearing the screen.","type": "boolean"},"pretty": {"description": "Stylize errors and messages using color and context (experimental).","type": "boolean"},"removeComments": {"description": "Do not emit comments to output.","type": "boolean"},"rootDir": {"description": "Specifies the root directory of input files. Use to control the output directory structure with --outDir.","type": "string"},"isolatedModules": {"description": "Unconditionally emit imports for unresolved files.","type": "boolean"},"sourceMap": {"description": "Generates corresponding '.map' file.","type": "boolean"},"sourceRoot": {"description": "Specifies the location where debugger should locate TypeScript files instead of source locations.","type": "string"},"suppressExcessPropertyErrors": {"description": "Suppress excess property checks for object literals.","type": "boolean"},"suppressImplicitAnyIndexErrors": {"description": "Suppress noImplicitAny errors for indexing objects lacking index signatures.","type": "boolean"},"stripInternal": {"description": "Do not emit declarations for code that has an '@internal' annotation.","type": "boolean"},"target": {"description": "Specify ECMAScript target version. Permitted values are 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020' or 'esnext'.","type": "string","default": "es3","anyOf": [{"enum": ["es3","es5","es6","es2015","es2016","es2017","es2018","es2019","es2020","esnext"]}, {"pattern": "^([eE][sS]([356]|(20(1[56789]|20))|[nN][eE][xX][tT]))$"}]},"watch": {"description": "Watch input files.","type": "boolean"},"experimentalDecorators": {"description": "Enables experimental support for ES7 decorators.","type": "boolean"},"emitDecoratorMetadata": {"description": "Emit design-type metadata for decorated declarations in source.","type": "boolean"},"moduleResolution": {"description": "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) .","type": "string","anyOf": [{"enum": ["classic","node"]},{"pattern": "^(([Nn]ode)|([Cc]lassic))$"}],"default": "classic"},"allowUnusedLabels": {"type": "boolean","description": "Do not report errors on unused labels."},"noImplicitReturns": {"description": "Report error when not all code paths in function return a value.","type": "boolean"},"noFallthroughCasesInSwitch": {"description": "Report errors for fallthrough cases in switch statement.","type": "boolean"},"allowUnreachableCode": {"description": "Do not report errors on unreachable code.","type": "boolean"},"forceConsistentCasingInFileNames": {"description": "Disallow inconsistently-cased references to the same file.","type": "boolean"},"baseUrl": {"description": "用于解析非相对模块名称的基本目录.","type": "string"},"paths": {"description": "指定基于baseUrl的路径映射.","type": "object","additionalProperties": {"type": "array","items": {"type": "string","description": "Path mapping to be computed relative to baseUrl option."}}},"plugins": {"description": "List of TypeScript language server plugins to load. Requires TypeScript version 2.3 or later.","type": "array","items": {"type": "object","properties": {"name": {"description": "Plugin name.","type": "string"}}}},"rootDirs": {"description": "Specify list of root directories to be used when resolving modules.","type": "array","items": {"type": "string"}},"typeRoots": {"description": "Specify list of directories for type definition files to be included. Requires TypeScript version 2.0 or later.","type": "array","items": {"type": "string"}},"types": {"description": "Type declaration files to be included in compilation. Requires TypeScript version 2.0 or later.","type": "array","items": {"type": "string"}},"traceResolution": {"description": "Enable tracing of the name resolution process.","type": "boolean"},"allowJs": {"description": "Allow javascript files to be compiled.","type": "boolean"},"noErrorTruncation": {"description": "Do not truncate error messages.","type": "boolean"},"allowSyntheticDefaultImports": {"description": "Allow default imports from modules with no default export. This does not affect code emit, just typechecking.","type": "boolean"},"noImplicitUseStrict": {"description": "Do not emit 'use strict' directives in module output.","type": "boolean"},"listEmittedFiles": {"description": "Enable to list all emitted files. Requires TypeScript version 2.0 or later.","type": "boolean"},"disableSizeLimit": {"description": "Disable size limit for JavaScript project. Requires TypeScript version 2.0 or later.","type": "boolean","default": false},"lib": {"description": "指定要包含在编译中的库文件。需要TypeScript版本2.0或更高版本.","type": "array","items": {"type": "string","enum": [ "es5", "es6", "es2015", "es7", "es2016", "es2017", "es2018", "es2019", "es2020", "esnext", "dom", "dom.iterable", "webworker", "webworker.importscripts", "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.intl", "es2017.sharedmemory", "es2017.string", "es2017.typedarrays","es2018.asynciterable", "es2018.intl", "es2018.promise", "es2018.regexp","es2019.array", "es2019.object", "es2019.string", "es2019.symbol","es2020.string", "es2020.symbol.wellknown","esnext.asynciterable", "esnext.array", "esnext.bigint", "esnext.intl", "esnext.symbol"]}},"strictNullChecks": {"description": "Enable strict null checks. Requires TypeScript version 2.0 or later.","type": "boolean"},"maxNodeModuleJsDepth": {"description": "The maximum dependency depth to search under node_modules and load JavaScript files. Only applicable with --allowJs.","type": "number","default": 0},"importHelpers": {"description": "Import emit helpers (e.g. '__extends', '__rest', etc..) from tslib. Requires TypeScript version 2.1 or later.","type": "boolean"},"jsxFactory": {"description": "Specify the JSX factory function to use when targeting react JSX emit, e.g. 'React.createElement' or 'h'. Requires TypeScript version 2.1 or later.","type": "string","default": "React.createElement"},"alwaysStrict": {"description": "Parse in strict mode and emit 'use strict' for each source file. Requires TypeScript version 2.1 or later.","type": "boolean"},"strict": {"description": "Enable all strict type checking options. Requires TypeScript version 2.3 or later.","type": "boolean"},"strictBindCallApply": {"description": "Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.","type": "boolean"},"downlevelIteration": {"description": "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. Requires TypeScript version 2.3 or later.","type": "boolean"},"checkJs": {"description": "Report errors in .js files. Requires TypeScript version 2.3 or later.","type": "boolean"},"strictFunctionTypes": {"description": "Disable bivariant parameter checking for function types. Requires TypeScript version 2.6 or later.","type": "boolean"},"strictPropertyInitialization": {"description": "Ensure non-undefined class properties are initialized in the constructor. Requires TypeScript version 2.7 or later.","type": "boolean"},"esModuleInterop": {"description": "Emit '__importStar' and '__importDefault' helpers for runtime babel ecosystem compatibility and enable '--allowSyntheticDefaultImports' for typesystem compatibility. Requires TypeScript version 2.7 or later.","type": "boolean"},"allowUmdGlobalAccess": {"description": "Allow accessing UMD globals from modules.","type": "boolean"},"keyofStringsOnly": {"description": "Resolve 'keyof' to string valued property names only (no numbers or symbols). Requires TypeScript version 2.9 or later.","type": "boolean"},"declarationMap": {"description": "Generates a sourcemap for each corresponding '.d.ts' file. Requires TypeScript version 2.9 or later.","type": "boolean"},"resolveJsonModule": {"description": "Include modules imported with '.json' extension. Requires TypeScript version 2.9 or later.","type": "boolean"}}}}},"typeAcquisitionDefinition": {"properties": {"typeAcquisition": {"type": "object","description": "Auto type (.d.ts) acquisition options for this project. Requires TypeScript version 2.1 or later.","properties": {"enable": {"description": "Enable auto type acquisition","type": "boolean","default": false},"include": {"description": "Specifies a list of type declarations to be included in auto type acquisition. Ex. [\"jquery\", \"lodash\"]","type": "array","items": {"type": "string"}},"exclude": {"description": "Specifies a list of type declarations to be excluded from auto type acquisition. Ex. [\"jquery\", \"lodash\"]","type": "array","items": {"type": "string"}}}}}},"referencesDefinition": {"properties": {"references": {"type": "array","description": "Referenced projects. Requires TypeScript version 3.0 or later.","items": {"type": "object","description": "Project reference.","properties": {"path": {"type": "string","description": "Path to referenced tsconfig or to folder containing tsconfig."}}}}}}},"type": "object","allOf": [{ "$ref": "#/definitions/compilerOptionsDefinition" },{ "$ref": "#/definitions/compileOnSaveDefinition" },{ "$ref": "#/definitions/typeAcquisitionDefinition" },{ "$ref": "#/definitions/extendsDefinition" },{"anyOf": [{ "$ref": "#/definitions/filesDefinition" },{ "$ref": "#/definitions/excludeDefinition" },{ "$ref": "#/definitions/includeDefinition" },{ "$ref": "#/definitions/referencesDefinition" }]}]
}
2. 配置全局路径映射
查看 全局路径映射的配置
相关文章:

疑问:c++中的memset
在dev c下调试 1 #include <mem.h>2 #include <iostream.h>3 #include <cstdlib>//配合system("PAUSE");用于看调试结果 4 5 intmain()6 {7 intia1[10];8 memset(ia1,1,10*sizeof(int));9 for(inti0;i<(sizeof(ia1)/sizeof(int));i)10 cout <…

Scrapy shell
一、Scrapy shell简介 Scrapy终端是一个交互终端,供您在未启动spider的情况下尝试及调试您的爬取代码。 其本意是用来测试提取数据的代码,不过您可以将其作为正常的Python终端,在上面测试任何的Python代码。 该终端是用来测试XPath或CSS表达式…

堆排序——HeapSort
基本思想: 图示: (88,85,83,73,72,60,57,48,42,6) 平均时间复杂度: O(NlogN)由于每次重新恢复堆的时间复杂度为O(logN),共N - 1次重新恢复堆操作,再加上前面建立堆时N / 2次向下调整,…

一个web蠕虫的简单实现
在这之前先鄙视下一些人发现漏洞就挂马的无耻行为,我曾经因为一个公开的漏洞而在一个网站站上发现24个各个所谓组织,所谓黑客的后门,鄙视!所谓蠕虫,其本质是利用计算机或者应用程序的漏洞进行感染和传播的一段程序&…

SpringBoot设置Session失效时间
1 #Session超时时间设置,单位是秒,默认是30分钟 2 server.session.timeout10 然而并没有什么用,因为SpringBoot在TomcatServletWebServerFactory代码中写了这个 1 private long getSessionTimeoutInMinutes() { 2 Duration sessi…

js url传值中文乱码完美解决(JAVA)
首先在你的jsp页面这样更改: var url"你要传入的Action的位置&ipid"ipid"&keyWord"key; 这里的key是中文,从input中取到值后,使用alert(key)发现中文没有乱码。 那么我们可以对url进行一下处理:urlen…

Angular应用中配置全局路径映射
Angular应用中配置全局路径映射1. tsconfig.json文件配置说明2. 配置全局路径映射2.1 指定baseUrl属性值2.2 配置paths属性值2.3 使用示例为了避免移动文件时调整基本文件的引用路径,或者为了引用部分文件时缩短引用路径,可以在配置文件中配置全局路径映…

对Oracle中索引叶块分裂而引起延迟情况的测试和分析
在版本10.2.0.4未打上相关one-off补丁的情况下,分别对ASSM和MSSM管理模式表空间进行索引分裂测试,经过测试的结论如下: l 在10gr2版本中MSSM方式是不能避免索引分裂引起交易超时问题; l 10.2.0.4上的one-off补丁因为目前仅存在L…

node.js和npm版本升级及升级过程中遇到的问题和解决方案
Node.js和NPM版本升级1. 安装Node.js1.1 版本检查1.2 下载安装程序1.3 安装2. npm升级2.1 版本检查2.2 升级3. 检查Node.js和npm之间的版本对应关系4. 检查Angular CLI、Angular、Node.js、TypeScript 和 RxJS 兼容性矩阵最初在本地安装Node.js和npm时,是通过Angula…

学习进度(5)
记录时间: 第六周 所花时间(包括上课) 20h 代码量(行) 400行 博客量(篇) 0篇 了解到的知识点 结对开发石家庄地铁软件,迪杰斯特拉算法的应用 转载于:https://www.cnblogs.c…

Windows搭建wnmp
http://www.cnblogs.com/wujuntian/p/7252343.html转载于:https://www.cnblogs.com/xiaobai-y/p/7815945.html

我的名字叫博客
我的部落是一个小部落,人口比较少,资源很贫瘠,但是我的人们很努力,他们都是最强的!转载于:https://www.cnblogs.com/cchenry/archive/2009/06/25/1511162.html

实例15 判断某一年是否为闰年
package wjf; import java.util.Scanner; public class wjf1{public static void main(String[] args){ //主方法Scanner scannew Scanner(System.in); System.out.println("请输入一个年份"); //向控制台输出一个提示信息long year;try{yearsc…

前端开发知识总结思维导图
前端开发扮演的一个角色: 前端开发知识点总结: 转载于:https://www.cnblogs.com/zhaodagang8/p/7821427.html

Angular应用提高打包速度
当Angular应用功能不断增加时,其打包速度会变慢,可以尝试使用以下方法缩短打包时间。 打开node_modules/webpack/lib/optimize/ModuleConcatenationPlugin.js文件,注释以下代码片段: for (let i 0; i < newModule.dependencie…

iCup,USB加热饮品方案
词条: iCup USB加热杯 USB电器 猛料: 其实看用的macbook作为例子,就知道这个设计很有一段时间啦,用i打头来为苹果打造各种莫名其妙的周边产品也是前几年的潮流,iCup出自Onur Karaalioglu的设计,将USB作为加…

Angular 文件上传与下载
Angular文件上传与下载文件上传方式1 使用NG ZORRO中的组件。文件下载方式1 直接下载方式2 通过HTTP请求后端数据的方式进行下载文件上传 方式1 使用NG ZORRO中的组件。 文件下载 方式1 直接下载 已知明确的下载链接,可以直接进行下载。 <a href"downlo…

包装类接受string 会自动将数字类型string转换成对应得包装类型
转载于:https://www.cnblogs.com/classmethond/p/10663229.html

tensorflow常用函数解析
一、tf.transpose函数的用法 tf.transpose(input, [dimension_1, dimenaion_2,..,dimension_n]):这个函数主要适用于交换输入张量的不同维度用的,如果输入张量是二维,就相当是转置。dimension_n是整数,如果张量是三维,就是用0,1,2…

FLASH处理图像的移动、缩放、旋转、颜色变换的类推荐。
这3个都是比较好的外部类,帮助操作图像的。 教程也比较详细。 看了以后发现,需要把图形学的书翻出来再补补课鸟... http://www.adobe.com/devnet/flash/articles/matrix_transformations_print.html http://blog.joa-ebert.com/imageprocessing-library/…

机器学习——XGBoost大杀器,XGBoost模型原理,XGBoost参数含义
0.随机森林的思考 随机森林的决策树是分别采样建立的,各个决策树之间是相对独立的。那么,在我们得到了第k-1棵决策树之后,能否通过现有的样本和决策树的信息, 对第m颗树的建立产生有益的影响呢?在随机森林建立之后&…

使用存储过程更新数据库!成功了但是返回值为 -1 的变态问题的解决办法!
今天遇到个表态的问题!使用带事务的存储过程执行sql语句,看数据库里面插入更新都正常! 但是返回值一直为-1! 头那个大哦!先贴2个存储过程吧!看大侠们能否找到问题的存在 USE [My_DB] GO/****** Object: St…

poj2289二分图多重匹配
题意:给你一张二分图,求右边点到汇点的最小容量(保证流量为n)是多少 题解:二分答案,每次重新建边跑最大流,看是不是为n就好了 #include<map> #include<set> #include<cmath> #include<…

Express应用配置端口
Express应用设置端口方法1 静态修改--直接修改代码中配置的默认端口号方法2 动态修改--修改代码逻辑使其获取启动命令中的端口号参数相关文章在Express应用创建成功后,应用会自动配置一个端口号,比如3000,有时会遇到端口号被占用的情况&#…

Oracle中PL/SQL的循环语句
PL/SQL的三种形式的循环:1.LOOP(无条件循环):loopstatements;end loop;2.WHILE(有条件循环):while condition loopstatements;end loop;3.FOR(固定次数循环):…

处理器调度算法
1. P117页,练习15:最高响应比 HRRF: 作业 提交时刻 运行时刻 开始时刻 完成时刻 周转时间/min 带权周转时间/min 1 10:00 2:00 10:00 12:00 120 120/120 2 10:10 1:00 12:25 13:25 195 195/60 3 10:25 0:25 12:00 12:25 120 …

bzoj4516
后缀自动机 留个板子 upd:大概懂了 每次新加入的npRight集合肯定只有最后一个位置,那么求所有长得不一样的子串贡献就是Max-Min1,因为Right集合只有这一个位置,所以这Max-Min1个子串只出现在最后一个位置。 #include<bits/stdc.h> using namespace…

npm : 无法加载文件 D:\...\nodejs\npm.ps1,因为在此系统上禁止运行脚本
问题: 在VSCode终端使用npm命令时,出现如下报错信息: npm : 无法加载文件 D:\ProgramFiles\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?Link ID135170 中的 …

Mybatis注解学习记录
Mybatis注解使用1. SQL语句映射1.1 Select注解:实现查询功能1.1.1 用法1.2 Insert注解:实现新增功能1.2.1 用法1.3 Update注解:实现更新功能1.3.1 用法1.4 Delete注解:实现删除功能1.4.1 用法2. 结果集映射2.1 Results注解&#x…

路由和交换机工作原理
路由器与交换机的工作原理 计算机网络往往由许多种不同类型的网络互连连接而成。如果几个计算机网络只是在物理上连接在一起,它们之间并不能进行通信,那么这种“互连”并没有什么实际意义。因此通常在谈到“互连”时,就已经暗示这些相互连接的…