草庐IT

TSCONFIG

全部标签

tsconfig.json 详解与常用配置(笔记)

概述参考文档:tsconfig.json·TypeScript中文网·TypeScript——JavaScript的超集(tslang.cn)如果一个目录下存在一个tsconfig.json文件,那么它意味着这个目录是TypeScript项目的根目录。 tsconfig.json文件中指定了用来编译这个项目的根文件和编译选项。tsconfig.json文件可以是个空文件,那么所有默认的文件都会以默认配置选项编译。在命令行上指定的编译选项会覆盖在tsconfig.json文件里的相应选项一个项目可以通过以下方式之一来编译:不带任何输入文件的情况下调用tsc,编译器会从当前目录开始去查找tscon

tsconfig.json 详解与常用配置(笔记)

概述参考文档:tsconfig.json·TypeScript中文网·TypeScript——JavaScript的超集(tslang.cn)如果一个目录下存在一个tsconfig.json文件,那么它意味着这个目录是TypeScript项目的根目录。 tsconfig.json文件中指定了用来编译这个项目的根文件和编译选项。tsconfig.json文件可以是个空文件,那么所有默认的文件都会以默认配置选项编译。在命令行上指定的编译选项会覆盖在tsconfig.json文件里的相应选项一个项目可以通过以下方式之一来编译:不带任何输入文件的情况下调用tsc,编译器会从当前目录开始去查找tscon

node.js - tsconfig.json 中模块类型的区别

在tsconfig.json中{"compilerOptions":{"target":"es5","module":"commonjs","moduleResolution":"node","sourceMap":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"removeComments":false,"noImplicitAny":false}}我无法理解以下module类型之间的区别:"commonjs","amd","umd","system","es6","es2015","none"问题:我

node.js - tsconfig.json 中模块类型的区别

在tsconfig.json中{"compilerOptions":{"target":"es5","module":"commonjs","moduleResolution":"node","sourceMap":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"removeComments":false,"noImplicitAny":false}}我无法理解以下module类型之间的区别:"commonjs","amd","umd","system","es6","es2015","none"问题:我

html - Angular 中 tsconfig.json 和 tsconfig.app.json 文件的区别

我是Angular的新手。我使用angular-cli了解Angular,我找到了文件tsconfig.json和tsconfig.app.json。这两个都与typescript相关,我发现thislink有用。但是为什么使用了两个这样的文件呢?为什么不能将这两个文件中的配置合并到一个文件中呢?请帮我解决这个问题。 最佳答案 没有什么可以阻止您摆脱tsconfig.app.json。它只是一个额外的配置文件,允许您在应用程序的基础上调整您的配置。这是例如当您在同一个angular-cli工作区中有多个应用程序时很有用。您可以拥有包

node.js - 在 mocha 中覆盖 ts-node 的 `tsconfig.json`

是否可以覆盖从mocha调用时使用的tsconfig.jsonts-node?我的主tsconfig.json包含"module":"es2015",但我想使用"module":"commonjs"仅适用于tsNode。我试过了mocha--compilersts:ts-node/register,tsx:ts-node/register\--compilerOptions'{"module":"commonjs"}'\--requirets-node/registertest/**/*.spec.ts*但它不起作用:SyntaxError:Unexpectedtokenimporta

json - tsconfig.json 的目的是什么?

我在阅读Angular2引用资料时发现:tsconfig.json。我想知道以下参数是什么意思?{"compilerOptions":{"target":"es5","module":"system","moduleResolution":"node","sourceMap":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"removeComments":false,"noImplicitAny":false},"exclude":["node_modules"]} 最佳答案

tsconfig.json 中的 typescript outDir 设置不起作用

在package.json中使用时,我似乎无法让outDir标志工作。目录结构非常简单:根级别的tsconfig.json,以及一个src/目录和一个index.ts文件以及代表其他模块的其他目录。当在索引文件上运行tsc命令时,它会在它旁边而不是在构建目录中创建一个新的。我做错了什么?我的tsconfig:{"compilerOptions":{"outDir":"build"}}我的npm构建脚本:"build":"tscsrc/index.ts"我从项目的根目录调用脚本。有趣的是,使用--outDir标志运行相同的脚本就可以了。 最佳答案

json - tsconfig.json : Build:No inputs were found in config file

我有一个ASP.NET核心项目,当我尝试构建它时出现此错误:errorTS18003:Build:Noinputswerefoundinconfigfile'Z:/Projects/client/ZV/src/ZV/Scripts/tsconfig.json'.Specified'include'pathswere'["**/*"]'and'exclude'pathswere'["../wwwroot/app","node_modules/*"]'.1>Thecommandexitedwithcode1.1>Doneexecutingtask"VsTsc"--FAILED.这是我的ts

json - tsconfig.json : Build:No inputs were found in config file

我有一个ASP.NET核心项目,当我尝试构建它时出现此错误:errorTS18003:Build:Noinputswerefoundinconfigfile'Z:/Projects/client/ZV/src/ZV/Scripts/tsconfig.json'.Specified'include'pathswere'["**/*"]'and'exclude'pathswere'["../wwwroot/app","node_modules/*"]'.1>Thecommandexitedwithcode1.1>Doneexecutingtask"VsTsc"--FAILED.这是我的ts