tsconfig.json 配置文件说明

官方链接:TypeScript: Documentation - What is a tsconfig.jsonicon-default.png?t=M4ADhttps://www.typescriptlang.org/docs/handbook/tsconfig-json.html

目录中存在tsconfig.json文件表明该目录是 TypeScript 项目的根目录。该tsconfig.json文件指定编译项目所需的根文件和编译器选项。

JavaScript 项目可以使用jsconfig.json文件来代替,它的作用几乎相同,但默认启用了一些与 JavaScript 相关的编译器标志。

typescript 项目会通过 tsconfig.json 调用 tsc

如果懒得写配置文件可以下载指定配置,然后使用 extends 属性

当前社区提供的配置文件有

参考链接:

https://github.com/tsconfig/bases/icon-default.png?t=M4ADhttps://github.com/tsconfig/bases/

根属性配置参考链接

TypeScript: TSConfig Reference - Docs on every TSConfig optionicon-default.png?t=M4ADhttps://www.typescriptlang.org/tsconfig#files

猜你喜欢

转载自blog.csdn.net/weixin_42335036/article/details/124979210
今日推荐