package.json
{
"name": "@smart/text", // 项目名字
"version": "1.0.0", // 项目版本
"description": "自定义组件测试", // 项目的描述,会展示在 npm 官网,让别人能快速了解该项目
"main": "index.ts", // 项目发布时,默认会包括 package.json,license,README 和main 字段里指定的文件,因为 main 字段里指定的是项目的入口文件,在 browser 和 Node 环境中都可以使用
"types": "index.d.ts", // node 支持 ES 模块后,要求 ES 模块采用 .mjs 后缀文件名。只要遇到 .mjs 文件,就认为它是 ES 模块。如果不想修改文件后缀,就可以在 package.json文件中,指定 type 字段为 module
"scripts": { // 指定项目的一些内置脚本命令,这些命令可以通过 npm run 来执行。通常包含项目开发,构建 等 CI 命令
"start": "vite",
"build": "vue-tsc -b && vite build",
"preview": "vite preview",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"peerDependencies": { // 同伴依赖,一种特殊的依赖,不会被自动安装,通常用于表示与另一个包的依赖与兼容性关系来警示使用者。比如我们安装 A,A 的正常使用依赖 B@2.x 版本,那么 B@2.x 就应该被列在 A 的 peerDependencies 下,表示“如果你使用我,那么你也需要安装 B,并且至少是 2.x 版本”。比如 React 组件库 Ant Design,它的 package.json 里 peerDependencies
"monaco-editor": "^0.51.0",
"tdesign-vue-next": "1.10.1",
"tdesign-icons-vue-next": "^0.2.6",
"vue": "^3.5.6"
},
"dependencies": { // 行依赖,也就是项目生产环境下需要用到的依赖。比如 react,vue,状态管理库以及组件库等
"monaco-editor": "^0.51.0",
"tdesign-vue-next": "1.10.1",
"tdesign-icons-vue-next": "^0.2.6",
"vue": "^3.5.6"
},
"devDependencies": { // 开发依赖,项目开发环境需要用到而运行时不需要的依赖,用于辅助开发,通常包括项目工程化工具比如 webpack,vite,eslint 等
"@types/node": "^22.5.5",
"@vitejs/plugin-vue": "^5.1.4",
"autoprefixer": "^10.4.20",
"less": "^4.2.0",
"path": "^0.12.7",
"postcss": "^8.4.47",
"postcss-import": "^16.1.0",
"postcss-loader": "^8.1.1",
"postcss-nested": "^6.2.0",
"typescript": "^5.6.2",
"vite": "^5.4.6",
"vue-tsc": "^2.1.6"
},
"keywords": [ // 一组项目的技术关键词,增加搜索机会,好的关键词可以帮助别人在 npm 官网上更好地检索到此项目,增加曝光率
],
"repository": { // 项目的仓库地址以及版本控制信息
"type": "git",
"url": "https://gitee.com/beginnera/smart-agency-web.git"
},
"bugs": { // 项目bug反馈地址,通常是一个链接
"url": "https://gitee.com/beginnera/smart-agency-web/issues"
},
// 项目主页的链接,通常是项目 github 链接,项目官网或文档首页。,简称标题
"homepage": "https://gitee.com/beginnera/smart-agency-web#smart-agency-web",
"private": true, // 如果是私有项目,不希望发布到公共 npm 仓库上,可以将 private 设为 true
"author": "1184010001@qq.com", // 项目作者
"license": "MIT" // 项目的开源许可证
}
一、基础配置
1、name:项目名字。
2、version:项目版本。
3、repository:项目的仓库地址以及版本控制信息。
4、description:项目的描述,会展示在 npm 官网,让别人能快速了解该项目。
5、keywords:一组项目的技术关键词,增加搜索机会,好的关键词可以帮助别人在 npm 官网上更好地检索到此项目,增加曝光率。
6、homepage:项目主页的链接,通常是项目 github 链接,项目官网或文档首页,简称标题。
7、bugs:项目bug反馈地址,通常是一个链接。
8、license:项目的开源许可证。
9、author:项目作者。
二、文件配置
1、files:项目在进行npm发布时,可以通过files指定需要跟随一起发布的内容来控制npm包的大小,避免安装时间太长,般情况下,files 里会指定构建出来的产物以及类型文件,而 src,test 等目录下的文件不需要跟随发布。
2、type: node 支持 ES 模块后,要求 ES 模块采用 .mjs 后缀文件名。只要遇到 .mjs 文件,就认为它是 ES 模块。如果不想修改文件后缀,就可以在 package.json文件中,指定 type 字段为 module。
3、main:项目发布时,默认会包括 package.json,license,README 和main 字段里指定的文件,因为 main 字段里指定的是项目的入口文件,在 browser 和 Node 环境中都可以使用。如果不设置 main 字段,那么入口文件就是根目录下的 index.js。main:项目发布时,默认会包括 package.json,license,README 和main 字段里指定的文件,因为 main 字段里指定的是项目的入口文件,在 browser 和 Node 环境中都可以使用。如果不设置 main 字段,那么入口文件就是根目录下的 index.js。
4、browser:main 字段里指定的入口文件在 browser 和 Node 环境中都可以使用。如果只想在 web 端使用,不允许在 server 端使用,可以通过 browser 字段指定入口。
5、module:同样,项目也可以指定 ES 模块的入口文件,这就是 module 字段的作用。
6、exports:node 在 14.13 支持在 package.json 里定义 exports 字段,拥有了条件导出的功能。
7、exports 字段可以配置不同环境对应的模块入口文件,并且当它存在时,它的优先级最高。比如使用 require 和 import 字段根据模块规范分别定义入口:
8、workspaces:目的工作区配置,用于在本地的根目录下管理多个子项目。可以自动地在 npm install 时将 workspaces 下面的包,软链到根目录的 node_modules 中,不用手动执行 npm link 操作。
三、脚本设置
1、scripts:指定项目的一些内置脚本命令,这些命令可以通过 npm run 来执行。通常包含项目开发,构建 等 CI 命令
2、config:config 用于设置 scripts 里的脚本在运行时的参数。比如设置 port 为 3001
四、依赖配置
1、dependencies:行依赖,也就是项目生产环境下需要用到的依赖。比如 react,vue,状态管理库以及组件库等
2、devDependencies:开发依赖,项目开发环境需要用到而运行时不需要的依赖,用于辅助开发,通常包括项目工程化工具比如 webpack,vite,eslint 等。
3、peerDependencies:同伴依赖,一种特殊的依赖,不会被自动安装,通常用于表示与另一个包的依赖与兼容性关系来警示使用者。比如我们安装 A,A 的正常使用依赖 B@2.x 版本,那么 B@2.x 就应该被列在 A 的 peerDependencies 下,表示“如果你使用我,那么你也需要安装 B,并且至少是 2.x 版本”。比如 React 组件库 Ant Design,它的 package.json 里 peerDependencies
4、optionalDependencies:可选依赖,顾名思义,表示依赖是可选的,它不会阻塞主功能的使用,安装或者引入失败也无妨。这类依赖如果安装失败,那么 npm 的整个安装过程也是成功的。比如我们使用 colors 这个包来对 console.log 打印的信息进行着色来增强和区分提示,但它并不是必需的,所以可以将其加入到 optionalDependencies,并且在运行时处理引入失败的逻辑。
5、peerDependenciesMeta:同伴依赖也可以使用 peerDependenciesMeta 将其指定为可选的。
6、bundleDependencies:打包依赖。它的值是一个数组,在发布包时,bundleDependencies 里面的依赖都会被一起打包。
7、overrides:overrides 可以重写项目依赖的依赖,及其依赖树下某个依赖的版本号,进行包的替换。
五、发布配置
1、private:如果是私有项目,不希望发布到公共 npm 仓库上,可以将 private 设为 true。
2、publishConfig:名思义,publishConfig 就是 npm 包发布时使用的配置。比如在安装依赖时指定了 registry 为 taobao 镜像源,但发布时希望在公网发布,就可以指定 publishConfig.registry。
六、系统配置
1、engines:一些项目由于兼容性问题会对 node 或者包管理器有特定的版本号要求,如:
"engines": {
"node": ">=14 <16",
"pnpm": ">7"
}
要求 node 版本大于等于 14 且小于 16,同时 pnpm 版本号需要大于 7。
2、os:在 linux 上能正常运行的项目可能在 windows 上会出现异常,使用 os 字段可以指定项目对操作系统的兼容性要求。
3、cpu:指定项目只能在特定的 CPU 体系上运行。
七、第三方配置
1、types 或者 typings:指定 TypeScript 的类型定义的入口文件
2、unpkg:可以让 npm 上所有的文件都开启 CDN 服务。比如 vue package.json 的 unpkg 定义为 dist/vue.global.js
3、jsdelivr:与 unpkg 类似,vue 通过如下的配置
4、browserslist:设置项目的浏览器兼容情况。babel 和 autoprefixer 等工具会使用该配置对代码进行转换。当然你也可以使用 .browserslistrc 单文件配置。
5、sideEffects:显示设置某些模块具有副作用,用于 webpack 的 tree-shaking 优化。比如在项目中整体引入 Ant Design 组件库的 css 文件。
6、lint-staged:lint-staged 是用于对 git 的暂存区的文件进行操作的工具,比如可以在代码提交前执行 lint 校验,类型检查,图片优化等操作。
tsconfig.json
"compilerOptions": {
"incremental": true, // TS编译器在第一次编译之后会生成一个存储编译信息的文件,第二次编译会在第一次的基础上进行增量编译,可以提高编译的速度
"tsBuildInfoFile": "./buildFile", // 增量编译文件的存储位置
"diagnostics": true, // 打印诊断信息
"target": "ES5", // 目标语言的版本
"module": "CommonJS", // 生成代码的模板标准
"outFile": "./app.js", // 将多个相互依赖的文件生成一个文件,可以用在AMD模块中,即开启时应设置"module": "AMD",
"lib": ["DOM", "ES2015", "ScriptHost", "ES2019.Array"], // TS需要引用的库,即声明文件,es5 默认引用dom、es5、scripthost,如需要使用es的高级版本特性,通常都需要配置,如es8的数组新特性需要引入"ES2019.Array",
"allowJS": true, // 允许编译器编译JS,JSX文件
"checkJs": true, // 允许在JS文件中报错,通常与allowJS一起使用
"outDir": "./dist", // 指定输出目录
"rootDir": "./", // 指定输出文件目录(用于输出),用于控制输出目录结构
"declaration": true, // 生成声明文件,开启后会自动生成声明文件
"declarationDir": "./file", // 指定生成声明文件存放目录
"emitDeclarationOnly": true, // 只生成声明文件,而不会生成js文件
"sourceMap": true, // 生成目标文件的sourceMap文件
"inlineSourceMap": true, // 生成目标文件的inline SourceMap,inline SourceMap会包含在生成的js文件中
"declarationMap": true, // 为声明文件生成sourceMap
"typeRoots": [], // 声明文件目录,默认时node_modules/@types
"types": [], // 加载的声明文件包
"removeComments":true, // 删除注释
"noEmit": true, // 不输出文件,即编译后不会生成任何js文件
"noEmitOnError": true, // 发送错误时不输出任何文件
"noEmitHelpers": true, // 不生成helper函数,减小体积,需要额外安装,常配合importHelpers一起使用
"importHelpers": true, // 通过tslib引入helper函数,文件必须是模块
"downlevelIteration": true, // 降级遍历器实现,如果目标源是es3/5,那么遍历器会有降级的实现
"strict": true, // 开启所有严格的类型检查
"jsx": "preserve", // 指定 jsx 格式
"alwaysStrict": true, // 在代码中注入'use strict'
"noImplicitAny": true, // 不允许隐式的any类型
"strictNullChecks": true, // 不允许把null、undefined赋值给其他类型的变量
"strictFunctionTypes": true, // 不允许函数参数双向协变
"strictPropertyInitialization": true, // 类的实例属性必须初始化
"strictBindCallApply": true, // 严格的bind/call/apply检查
"noImplicitThis": true, // 不允许this有隐式的any类型
"noUnusedLocals": true, // 检查只声明、未使用的局部变量(只提示不报错)
"noUnusedParameters": true, // 检查未使用的函数参数(只提示不报错)
"noFallthroughCasesInSwitch": true, // 防止switch语句贯穿(即如果没有break语句后面不会执行)
"noImplicitReturns": true, //每个分支都会有返回值
"esModuleInterop": true, // 允许export=导出,由import from 导入
"allowUmdGlobalAccess": true, // 允许在模块中全局变量的方式访问umd模块
"moduleResolution": "node", // 模块解析策略,ts默认用node的解析策略,即相对的方式导入
"baseUrl": "./", // 解析非相对模块的基地址,默认是当前目录
"paths": { // 路径映射,相对于baseUrl
// 如使用jq时不想使用默认版本,而需要手动指定版本,可进行如下配置
"jquery": ["node_modules/jquery/dist/jquery.min.js"]
},
"rootDirs": ["src","out"], // 将多个目录放在一个虚拟目录下,用于运行时,即编译后引入文件的位置可能发生变化,这也设置可以虚拟src和out在同一个目录下,不用再去改变路径也不会报错
"listEmittedFiles": true, // 打印输出文件
"listFiles": true// 打印编译的文件(包括引用的声明文件)
}
官方完整配置
{
"title": "JSON schema for the TypeScript compiler's configuration file",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://json.schemastore.org/tsconfig",
"definitions": {
"//": {
"explainer": "https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#overview",
"reference": "https://www.typescriptlang.org/tsconfig",
"reference metadata": "https://github.com/microsoft/TypeScript-Website/blob/v2/packages/tsconfig-reference/scripts/tsconfigRules.ts"
},
"filesDefinition": {
"properties": {
"files": {
"description": "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'. When a 'files' property is specified, only those files and those specified by 'include' are included.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"excludeDefinition": {
"properties": {
"exclude": {
"description": "Specifies a list of files to be excluded from compilation. The 'exclude' property only affects the files included via the 'include' property and not the 'files' property. Glob patterns require TypeScript version 2.0 or later.",
"type": "array",
"uniqueItems": true,
"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",
"uniqueItems": true,
"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": "No longer supported. In early versions, manually set the text encoding for reading files.",
"type": "string",
"markdownDescription": "No longer supported. In early versions, manually set the text encoding for reading files.\n\nSee more: https://www.typescriptlang.org/tsconfig#charset"
},
"composite": {
"description": "Enable constraints that allow a TypeScript project to be used with project references.",
"type": "boolean",
"default": true,
"markdownDescription": "Enable constraints that allow a TypeScript project to be used with project references.\n\nSee more: https://www.typescriptlang.org/tsconfig#composite"
},
"declaration": {
"description": "Generate .d.ts files from TypeScript and JavaScript files in your project.",
"type": "boolean",
"default": false,
"markdownDescription": "Generate .d.ts files from TypeScript and JavaScript files in your project.\n\nSee more: https://www.typescriptlang.org/tsconfig#declaration"
},
"declarationDir": {
"description": "Specify the output directory for generated declaration files.",
"type": ["string", "null"],
"markdownDescription": "Specify the output directory for generated declaration files.\n\nSee more: https://www.typescriptlang.org/tsconfig#declarationDir"
},
"diagnostics": {
"description": "Output compiler performance information after building.",
"type": "boolean",
"markdownDescription": "Output compiler performance information after building.\n\nSee more: https://www.typescriptlang.org/tsconfig#diagnostics"
},
"disableReferencedProjectLoad": {
"description": "Reduce the number of projects loaded automatically by TypeScript.",
"type": "boolean",
"markdownDescription": "Reduce the number of projects loaded automatically by TypeScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableReferencedProjectLoad"
},
"noPropertyAccessFromIndexSignature": {
"description": "Enforces using indexed accessors for keys declared using an indexed type",
"type": "boolean",
"markdownDescription": "Enforces using indexed accessors for keys declared using an indexed type\n\nSee more: https://www.typescriptlang.org/tsconfig#noPropertyAccessFromIndexSignature"
},
"emitBOM": {
"description": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",
"type": "boolean",
"default": false,
"markdownDescription": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitBOM"
},
"emitDeclarationOnly": {
"description": "Only output d.ts files and not JavaScript files.",
"type": "boolean",
"default": false,
"markdownDescription": "Only output d.ts files and not JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitDeclarationOnly"
},
"incremental": {
"description": "Save .tsbuildinfo files to allow for incremental compilation of projects.",
"type": "boolean",
"markdownDescription": "Save .tsbuildinfo files to allow for incremental compilation of projects.\n\nSee more: https://www.typescriptlang.org/tsconfig#incremental"
},
"tsBuildInfoFile": {
"description": "Specify the folder for .tsbuildinfo incremental compilation files.",
"default": ".tsbuildinfo",
"type": "string",
"markdownDescription": "Specify the folder for .tsbuildinfo incremental compilation files.\n\nSee more: https://www.typescriptlang.org/tsconfig#tsBuildInfoFile"
},
"inlineSourceMap": {
"description": "Include sourcemap files inside the emitted JavaScript.",
"type": "boolean",
"default": false,
"markdownDescription": "Include sourcemap files inside the emitted JavaScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#inlineSourceMap"
},
"inlineSources": {
"description": "Include source code in the sourcemaps inside the emitted JavaScript.",
"type": "boolean",
"default": false,
"markdownDescription": "Include source code in the sourcemaps inside the emitted JavaScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#inlineSources"
},
"jsx": {
"description": "Specify what JSX code is generated.",
"enum": [
"preserve",
"react",
"react-jsx",
"react-jsxdev",
"react-native"
]
},
"reactNamespace": {
"description": "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.",
"type": "string",
"default": "React",
"markdownDescription": "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.\n\nSee more: https://www.typescriptlang.org/tsconfig#reactNamespace"
},
"jsxFactory": {
"description": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'",
"type": "string",
"default": "React.createElement",
"markdownDescription": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFactory"
},
"jsxFragmentFactory": {
"description": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.",
"type": "string",
"default": "React.Fragment",
"markdownDescription": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFragmentFactory"
},
"jsxImportSource": {
"description": "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.`",
"type": "string",
"default": "react",
"markdownDescription": "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.`\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxImportSource"
},
"listFiles": {
"description": "Print all of the files read during the compilation.",
"type": "boolean",
"default": false,
"markdownDescription": "Print all of the files read during the compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#listFiles"
},
"mapRoot": {
"description": "Specify the location where debugger should locate map files instead of generated locations.",
"type": "string",
"markdownDescription": "Specify the location where debugger should locate map files instead of generated locations.\n\nSee more: https://www.typescriptlang.org/tsconfig#mapRoot"
},
"module": {
"description": "Specify what module code is generated.",
"type": "string",
"anyOf": [
{
"enum": [
"CommonJS",
"AMD",
"System",
"UMD",
"ES6",
"ES2015",
"ES2020",
"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]|2020|[Nn][Ee][Xx][Tt])|[Nn][Oo][Nn][Ee])$"
}
],
"markdownDescription": "Specify what module code is generated.\n\nSee more: https://www.typescriptlang.org/tsconfig#module"
},
"moduleResolution": {
"description": "Specify how TypeScript looks up a file from a given module specifier.",
"type": "string",
"anyOf": [
{
"enum": ["Classic", "Node"]
},
{
"pattern": "^(([Nn]ode)|([Cc]lassic))$"
}
],
"default": "classic",
"markdownDescription": "Specify how TypeScript looks up a file from a given module specifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#moduleResolution"
},
"newLine": {
"description": "Set the newline character for emitting files.",
"type": "string",
"anyOf": [
{
"enum": ["crlf", "lf"]
},
{
"pattern": "^(CRLF|LF|crlf|lf)$"
}
],
"markdownDescription": "Set the newline character for emitting files.\n\nSee more: https://www.typescriptlang.org/tsconfig#newLine"
},
"noEmit": {
"description": "Disable emitting file from a compilation.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable emitting file from a compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmit"
},
"noEmitHelpers": {
"description": "Disable generating custom helper functions like `__extends` in compiled output.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable generating custom helper functions like `__extends` in compiled output.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmitHelpers"
},
"noEmitOnError": {
"description": "Disable emitting files if any type checking errors are reported.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable emitting files if any type checking errors are reported.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmitOnError"
},
"noImplicitAny": {
"description": "Enable error reporting for expressions and declarations with an implied `any` type..",
"type": "boolean",
"markdownDescription": "Enable error reporting for expressions and declarations with an implied `any` type..\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitAny"
},
"noImplicitOverride": {
"description": "Enable error reporting when overriding a method without using the 'override' keyword. Requires TypeScript version 4.3 or later.",
"type": "boolean",
"markdownDescription": "Enable error reporting when overriding a method without using the `override` keyword. Requires TypeScript version 4.3 or later.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitOverride"
},
"noImplicitThis": {
"description": "Enable error reporting when `this` is given the type `any`.",
"type": "boolean",
"markdownDescription": "Enable error reporting when `this` is given the type `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitThis"
},
"noUnusedLocals": {
"description": "Enable error reporting when a local variables aren't read.",
"type": "boolean",
"default": false,
"markdownDescription": "Enable error reporting when a local variables aren't read.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedLocals"
},
"noUnusedParameters": {
"description": "Raise an error when a function parameter isn't read",
"type": "boolean",
"default": false,
"markdownDescription": "Raise an error when a function parameter isn't read\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedParameters"
},
"noLib": {
"description": "Disable including any library files, including the default lib.d.ts.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable including any library files, including the default lib.d.ts.\n\nSee more: https://www.typescriptlang.org/tsconfig#noLib"
},
"noResolve": {
"description": "Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.",
"type": "boolean",
"default": false,
"markdownDescription": "Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.\n\nSee more: https://www.typescriptlang.org/tsconfig#noResolve"
},
"noStrictGenericChecks": {
"description": "Disable strict checking of generic signatures in function types.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable strict checking of generic signatures in function types.\n\nSee more: https://www.typescriptlang.org/tsconfig#noStrictGenericChecks"
},
"skipDefaultLibCheck": {
"description": "Skip type checking .d.ts files that are included with TypeScript.",
"type": "boolean",
"default": false,
"markdownDescription": "Skip type checking .d.ts files that are included with TypeScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#skipDefaultLibCheck"
},
"skipLibCheck": {
"description": "Skip type checking all .d.ts files.",
"type": "boolean",
"default": false,
"markdownDescription": "Skip type checking all .d.ts files.\n\nSee more: https://www.typescriptlang.org/tsconfig#skipLibCheck"
},
"outFile": {
"description": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.",
"type": "string",
"markdownDescription": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.\n\nSee more: https://www.typescriptlang.org/tsconfig#outFile"
},
"outDir": {
"description": "Specify an output folder for all emitted files.",
"type": "string",
"markdownDescription": "Specify an output folder for all emitted files.\n\nSee more: https://www.typescriptlang.org/tsconfig#outDir"
},
"preserveConstEnums": {
"description": "Disable erasing `const enum` declarations in generated code.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable erasing `const enum` declarations in generated code.\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveConstEnums"
},
"preserveSymlinks": {
"description": "Disable resolving symlinks to their realpath. This correlates to the same flag in node.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable resolving symlinks to their realpath. This correlates to the same flag in node.\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveSymlinks"
},
"preserveWatchOutput": {
"description": "Disable wiping the console in watch mode",
"type": "boolean",
"markdownDescription": "Disable wiping the console in watch mode\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveWatchOutput"
},
"pretty": {
"description": "Enable color and formatting in output to make compiler errors easier to read",
"type": "boolean",
"default": true,
"markdownDescription": "Enable color and formatting in output to make compiler errors easier to read\n\nSee more: https://www.typescriptlang.org/tsconfig#pretty"
},
"removeComments": {
"description": "Disable emitting comments.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable emitting comments.\n\nSee more: https://www.typescriptlang.org/tsconfig#removeComments"
},
"rootDir": {
"description": "Specify the root folder within your source files.",
"type": "string",
"markdownDescription": "Specify the root folder within your source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDir"
},
"isolatedModules": {
"description": "Ensure that each file can be safely transpiled without relying on other imports.",
"type": "boolean",
"default": false,
"markdownDescription": "Ensure that each file can be safely transpiled without relying on other imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#isolatedModules"
},
"sourceMap": {
"description": "Create source map files for emitted JavaScript files.",
"type": "boolean",
"default": false,
"markdownDescription": "Create source map files for emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#sourceMap"
},
"sourceRoot": {
"description": "Specify the root path for debuggers to find the reference source code.",
"type": "string",
"markdownDescription": "Specify the root path for debuggers to find the reference source code.\n\nSee more: https://www.typescriptlang.org/tsconfig#sourceRoot"
},
"suppressExcessPropertyErrors": {
"description": "Disable reporting of excess property errors during the creation of object literals.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable reporting of excess property errors during the creation of object literals.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressExcessPropertyErrors"
},
"suppressImplicitAnyIndexErrors": {
"description": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.",
"type": "boolean",
"default": false,
"markdownDescription": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressImplicitAnyIndexErrors"
},
"stripInternal": {
"description": "Disable emitting declarations that have `@internal` in their JSDoc comments.",
"type": "boolean",
"markdownDescription": "Disable emitting declarations that have `@internal` in their JSDoc comments.\n\nSee more: https://www.typescriptlang.org/tsconfig#stripInternal"
},
"target": {
"description": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.",
"type": "string",
"default": "ES3",
"anyOf": [
{
"enum": [
"ES3",
"ES5",
"ES6",
"ES2015",
"ES2016",
"ES2017",
"ES2018",
"ES2019",
"ES2020",
"ES2021",
"ESNext"
]
},
{
"pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[01]))|[Nn][Ee][Xx][Tt]))$"
}
],
"markdownDescription": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\n\nSee more: https://www.typescriptlang.org/tsconfig#target"
},
"watch": {
"description": "Watch input files.",
"type": "boolean"
},
"fallbackPolling": {
"description": "Specify what approach the watcher should use if the system runs out of native file watchers.",
"enum": [
"fixedPollingInterval",
"priorityPollingInterval",
"dynamicPriorityPolling"
]
},
"watchDirectory": {
"description": "Specify how directories are watched on systems that lack recursive file-watching functionality.",
"enum": [
"useFsEvents",
"fixedPollingInterval",
"dynamicPriorityPolling"
],
"default": "useFsEvents"
},
"watchFile": {
"description": "Specify how the TypeScript watch mode works.",
"enum": [
"fixedPollingInterval",
"priorityPollingInterval",
"dynamicPriorityPolling",
"useFsEvents",
"useFsEventsOnParentDirectory"
],
"default": "useFsEvents"
},
"experimentalDecorators": {
"description": "Enable experimental support for TC39 stage 2 draft decorators.",
"type": "boolean",
"markdownDescription": "Enable experimental support for TC39 stage 2 draft decorators.\n\nSee more: https://www.typescriptlang.org/tsconfig#experimentalDecorators"
},
"emitDecoratorMetadata": {
"description": "Emit design-type metadata for decorated declarations in source files.",
"type": "boolean",
"markdownDescription": "Emit design-type metadata for decorated declarations in source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata"
},
"allowUnusedLabels": {
"description": "Disable error reporting for unused labels.",
"type": "boolean",
"markdownDescription": "Disable error reporting for unused labels.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnusedLabels"
},
"noImplicitReturns": {
"description": "Enable error reporting for codepaths that do not explicitly return in a function.",
"type": "boolean",
"default": false,
"markdownDescription": "Enable error reporting for codepaths that do not explicitly return in a function.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitReturns"
},
"noUncheckedIndexedAccess": {
"description": "Add `undefined` to a type when accessed using an index.",
"type": "boolean",
"markdownDescription": "Add `undefined` to a type when accessed using an index.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess"
},
"noFallthroughCasesInSwitch": {
"description": "Enable error reporting for fallthrough cases in switch statements.",
"type": "boolean",
"default": false,
"markdownDescription": "Enable error reporting for fallthrough cases in switch statements.\n\nSee more: https://www.typescriptlang.org/tsconfig#noFallthroughCasesInSwitch"
},
"allowUnreachableCode": {
"description": "Disable error reporting for unreachable code.",
"type": "boolean",
"markdownDescription": "Disable error reporting for unreachable code.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnreachableCode"
},
"forceConsistentCasingInFileNames": {
"description": "Ensure that casing is correct in imports.",
"type": "boolean",
"default": false,
"markdownDescription": "Ensure that casing is correct in imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames"
},
"generateCpuProfile": {
"description": "Emit a v8 CPU profile of the compiler run for debugging.",
"type": "string",
"default": "profile.cpuprofile",
"markdownDescription": "Emit a v8 CPU profile of the compiler run for debugging.\n\nSee more: https://www.typescriptlang.org/tsconfig#generateCpuProfile"
},
"baseUrl": {
"description": "Specify the base directory to resolve non-relative module names.",
"type": "string",
"markdownDescription": "Specify the base directory to resolve non-relative module names.\n\nSee more: https://www.typescriptlang.org/tsconfig#baseUrl"
},
"paths": {
"description": "Specify a set of entries that re-map imports to additional lookup locations.",
"type": "object",
"additionalProperties": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"description": "Path mapping to be computed relative to baseUrl option."
}
},
"markdownDescription": "Specify a set of entries that re-map imports to additional lookup locations.\n\nSee more: https://www.typescriptlang.org/tsconfig#paths"
},
"plugins": {
"description": "Specify a list of language service plugins to include.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Plugin name.",
"type": "string"
}
}
},
"markdownDescription": "Specify a list of language service plugins to include.\n\nSee more: https://www.typescriptlang.org/tsconfig#plugins"
},
"rootDirs": {
"description": "Allow multiple folders to be treated as one when resolving modules.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"markdownDescription": "Allow multiple folders to be treated as one when resolving modules.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDirs"
},
"typeRoots": {
"description": "Specify multiple folders that act like `./node_modules/@types`.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"markdownDescription": "Specify multiple folders that act like `./node_modules/@types`.\n\nSee more: https://www.typescriptlang.org/tsconfig#typeRoots"
},
"types": {
"description": "Specify type package names to be included without being referenced in a source file.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"markdownDescription": "Specify type package names to be included without being referenced in a source file.\n\nSee more: https://www.typescriptlang.org/tsconfig#types"
},
"traceResolution": {
"description": "Log paths used during the `moduleResolution` process.",
"type": "boolean",
"default": false,
"markdownDescription": "Log paths used during the `moduleResolution` process.\n\nSee more: https://www.typescriptlang.org/tsconfig#traceResolution"
},
"allowJs": {
"description": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",
"type": "boolean",
"default": false,
"markdownDescription": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowJs"
},
"noErrorTruncation": {
"description": "Disable truncating types in error messages.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable truncating types in error messages.\n\nSee more: https://www.typescriptlang.org/tsconfig#noErrorTruncation"
},
"allowSyntheticDefaultImports": {
"description": "Allow 'import x from y' when a module doesn't have a default export.",
"type": "boolean",
"markdownDescription": "Allow 'import x from y' when a module doesn't have a default export.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports"
},
"noImplicitUseStrict": {
"description": "Disable adding 'use strict' directives in emitted JavaScript files.",
"type": "boolean",
"default": false,
"markdownDescription": "Disable adding 'use strict' directives in emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitUseStrict"
},
"listEmittedFiles": {
"description": "Print the names of emitted files after a compilation.",
"type": "boolean",
"default": false,
"markdownDescription": "Print the names of emitted files after a compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#listEmittedFiles"
},
"disableSizeLimit": {
"description": "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.",
"type": "boolean",
"default": false,
"markdownDescription": "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSizeLimit"
},
"lib": {
"description": "Specify a set of bundled library declaration files that describe the target runtime environment.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"anyOf": [
{
"enum": [
"ES5",
"ES6",
"ES2015",
"ES2015.Collection",
"ES2015.Core",
"ES2015.Generator",
"ES2015.Iterable",
"ES2015.Promise",
"ES2015.Proxy",
"ES2015.Reflect",
"ES2015.Symbol.WellKnown",
"ES2015.Symbol",
"ES2016",
"ES2016.Array.Include",
"ES2017",
"ES2017.Intl",
"ES2017.Object",
"ES2017.SharedMemory",
"ES2017.String",
"ES2017.TypedArrays",
"ES2018",
"ES2018.AsyncGenerator",
"ES2018.AsyncIterable",
"ES2018.Intl",
"ES2018.Promise",
"ES2018.Regexp",
"ES2019",
"ES2019.Array",
"ES2019.Object",
"ES2019.String",
"ES2019.Symbol",
"ES2020",
"ES2020.BigInt",
"ES2020.Promise",
"ES2020.String",
"ES2020.Symbol.WellKnown",
"ESNext",
"ESNext.Array",
"ESNext.AsyncIterable",
"ESNext.BigInt",
"ESNext.Intl",
"ESNext.Promise",
"ESNext.String",
"ESNext.Symbol",
"DOM",
"DOM.Iterable",
"ScriptHost",
"WebWorker",
"WebWorker.ImportScripts"
]
},
{
"pattern": "^[Ee][Ss]5|[Ee][Ss]6|[Ee][Ss]7$"
},
{
"pattern": "^[Ee][Ss]2015(\\.([Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Cc][Oo][Rr][Ee]|[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Oo][Rr]|[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Pp][Rr][Oo][Xx][Yy]|[Rr][Ee][Ff][Ll][Ee][Cc][Tt]|[Ss][Yy][Mm][Bb][Oo][Ll].[Ww][Ee][Ll][Ll][Kk][Nn][Oo][Ww][Nn]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$"
},
{
"pattern": "^[Ee][Ss]2016(\\.[Aa][Rr][Rr][Aa][Yy].[Ii][Nn][Cc][Ll][Uu][Dd][Ee])?$"
},
{
"pattern": "^[Ee][Ss]2017(\\.([Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]))?$"
},
{
"pattern": "^[Ee][Ss]2018(\\.([Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Rr][Ee][Gg][Ee][Xx][Pp]))?$"
},
{
"pattern": "^[Ee][Ss]2019(\\.([Aa][Rr][Rr][Aa][Yy]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$"
},
{
"pattern": "^[Ee][Ss]2020(\\.([Bb][Ii][Gg][Ii][Nn][Tt]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll].[Ww][Ee][Ll][Ll][Kk][Nn][Oo][Ww][Nn]))?$"
},
{
"pattern": "^[Ee][Ss][Nn][Ee][Xx][Tt](\\.([Aa][Rr][Rr][Aa][Yy]|[Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Bb][Ii][Gg][Ii][Nn][Tt]|[Ii][Nn][Tt][Ll]|[Ss][Yy][Mm][Bb][Oo][Ll]))?$"
},
{
"pattern": "^[Dd][Oo][Mm](\\.[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee])?$"
},
{
"pattern": "^[Ss][Cc][Rr][Ii][Pp][Tt][Hh][Oo][Ss][Tt]$"
},
{
"pattern": "^[Ww][Ee][Bb][Ww][Oo][Rr][Kk][Ee][Rr](\\.[Ii][Mm][Pp][Oo][Rr][Tt][Ss][Cc][Rr][Ii][Pp][Tt][Ss])?$"
}
]
},
"markdownDescription": "Specify a set of bundled library declaration files that describe the target runtime environment.\n\nSee more: https://www.typescriptlang.org/tsconfig#lib"
},
"strictNullChecks": {
"description": "When type checking, take into account `null` and `undefined`.",
"type": "boolean",
"default": false,
"markdownDescription": "When type checking, take into account `null` and `undefined`.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictNullChecks"
},
"maxNodeModuleJsDepth": {
"description": "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.",
"type": "number",
"default": 0,
"markdownDescription": "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.\n\nSee more: https://www.typescriptlang.org/tsconfig#maxNodeModuleJsDepth"
},
"importHelpers": {
"description": "Allow importing helper functions from tslib once per project, instead of including them per-file.",
"type": "boolean",
"default": false,
"markdownDescription": "Allow importing helper functions from tslib once per project, instead of including them per-file.\n\nSee more: https://www.typescriptlang.org/tsconfig#importHelpers"
},
"importsNotUsedAsValues": {
"description": "Specify emit/checking behavior for imports that are only used for types.",
"default": "remove",
"enum": ["remove", "preserve", "error"]
},
"alwaysStrict": {
"description": "Ensure 'use strict' is always emitted.",
"type": "boolean",
"markdownDescription": "Ensure 'use strict' is always emitted.\n\nSee more: https://www.typescriptlang.org/tsconfig#alwaysStrict"
},
"strict": {
"description": "Enable all strict type checking options.",
"type": "boolean",
"default": false,
"markdownDescription": "Enable all strict type checking options.\n\nSee more: https://www.typescriptlang.org/tsconfig#strict"
},
"strictBindCallApply": {
"description": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.",
"type": "boolean",
"default": false,
"markdownDescription": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictBindCallApply"
},
"downlevelIteration": {
"description": "Emit more compliant, but verbose and less performant JavaScript for iteration.",
"type": "boolean",
"default": false,
"markdownDescription": "Emit more compliant, but verbose and less performant JavaScript for iteration.\n\nSee more: https://www.typescriptlang.org/tsconfig#downlevelIteration"
},
"checkJs": {
"description": "Enable error reporting in type-checked JavaScript files.",
"type": "boolean",
"default": false,
"markdownDescription": "Enable error reporting in type-checked JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#checkJs"
},
"strictFunctionTypes": {
"description": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.",
"type": "boolean",
"default": false,
"markdownDescription": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictFunctionTypes"
},
"strictPropertyInitialization": {
"description": "Check for class properties that are declared but not set in the constructor.",
"type": "boolean",
"default": false,
"markdownDescription": "Check for class properties that are declared but not set in the constructor.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictPropertyInitialization"
},
"esModuleInterop": {
"description": "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.",
"type": "boolean",
"default": false,
"markdownDescription": "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.\n\nSee more: https://www.typescriptlang.org/tsconfig#esModuleInterop"
},
"allowUmdGlobalAccess": {
"description": "Allow accessing UMD globals from modules.",
"type": "boolean",
"default": false,
"markdownDescription": "Allow accessing UMD globals from modules.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUmdGlobalAccess"
},
"keyofStringsOnly": {
"description": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.",
"type": "boolean",
"default": false,
"markdownDescription": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.\n\nSee more: https://www.typescriptlang.org/tsconfig#keyofStringsOnly"
},
"useDefineForClassFields": {
"description": "Emit ECMAScript-standard-compliant class fields.",
"type": "boolean",
"default": false,
"markdownDescription": "Emit ECMAScript-standard-compliant class fields.\n\nSee more: https://www.typescriptlang.org/tsconfig#useDefineForClassFields"
},
"declarationMap": {
"description": "Create sourcemaps for d.ts files.",
"type": "boolean",
"default": false,
"markdownDescription": "Create sourcemaps for d.ts files.\n\nSee more: https://www.typescriptlang.org/tsconfig#declarationMap"
},
"resolveJsonModule": {
"description": "Enable importing .json files",
"type": "boolean",
"default": false,
"markdownDescription": "Enable importing .json files\n\nSee more: https://www.typescriptlang.org/tsconfig#resolveJsonModule"
},
"assumeChangesOnlyAffectDirectDependencies": {
"description": "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.",
"type": "boolean",
"markdownDescription": "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.\n\nSee more: https://www.typescriptlang.org/tsconfig#assumeChangesOnlyAffectDirectDependencies"
},
"extendedDiagnostics": {
"description": "Output more detailed compiler performance information after building.",
"type": "boolean",
"default": false,
"markdownDescription": "Output more detailed compiler performance information after building.\n\nSee more: https://www.typescriptlang.org/tsconfig#extendedDiagnostics"
},
"listFilesOnly": {
"description": "Print names of files that are part of the compilation and then stop processing.",
"type": "boolean"
},
"disableSourceOfProjectReferenceRedirect": {
"description": "Disable preferring source files instead of declaration files when referencing composite projects",
"type": "boolean",
"markdownDescription": "Disable preferring source files instead of declaration files when referencing composite projects\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSourceOfProjectReferenceRedirect"
},
"disableSolutionSearching": {
"description": "Opt a project out of multi-project reference checking when editing.",
"type": "boolean",
"markdownDescription": "Opt a project out of multi-project reference checking when editing.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSolutionSearching"
}
}
}
}
},
"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",
"uniqueItems": true,
"items": {
"type": "string"
}
},
"exclude": {
"description": "Specifies a list of type declarations to be excluded from auto type acquisition. Ex. [\"jquery\", \"lodash\"]",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
}
}
},
"referencesDefinition": {
"properties": {
"references": {
"type": "array",
"uniqueItems": true,
"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."
}
}
}
}
}
},
"tsNodeDefinition": {
"properties": {
"ts-node": {
"description": "ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n\nts-node offers TypeScript execution and REPL for node.js, with source map support.",
"properties": {
"compiler": {
"default": "typescript",
"description": "Specify a custom TypeScript compiler.",
"type": "string"
},
"compilerHost": {
"default": false,
"description": "Use TypeScript's compiler host API instead of the language service API.",
"type": "boolean"
},
"compilerOptions": {
"additionalProperties": true,
"allOf": [
{
"$ref": "#/definitions/compilerOptionsDefinition/properties/compilerOptions"
}
],
"description": "JSON object to merge with TypeScript `compilerOptions`.",
"properties": {},
"type": "object"
},
"emit": {
"default": false,
"description": "Emit output files into `.ts-node` directory.",
"type": "boolean"
},
"files": {
"default": false,
"description": "Load \"files\" and \"include\" from `tsconfig.json` on startup.\n\nDefault is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.",
"type": "boolean"
},
"ignore": {
"default": [
"(?:^|/)node_modules/"
],
"description": "Paths which should not be compiled.\n\nEach string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n\nSource paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n\nDefault is to ignore all node_modules subdirectories.",
"items": {
"type": "string"
},
"type": "array"
},
"ignoreDiagnostics": {
"description": "Ignore TypeScript warnings by diagnostic code.",
"items": {
"type": [
"string",
"number"
]
},
"type": "array"
},
"logError": {
"default": false,
"description": "Logs TypeScript errors to stderr instead of throwing exceptions.",
"type": "boolean"
},
"preferTsExts": {
"default": false,
"description": "Re-order file extensions so that TypeScript imports are preferred.\n\nFor example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`",
"type": "boolean"
},
"pretty": {
"default": false,
"description": "Use pretty diagnostic formatter.",
"type": "boolean"
},
"require": {
"description": "Modules to require, like node's `--require` flag.\n\nIf specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.",
"items": {
"type": "string"
},
"type": "array"
},
"skipIgnore": {
"default": false,
"description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.",
"type": "boolean"
},
"transpileOnly": {
"default": false,
"description": "Use TypeScript's faster `transpileModule`.",
"type": "boolean"
},
"transpiler": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"properties": {},
"type": "object"
}
]
},
"items": [
{
"type": "string"
},
{
"additionalProperties": true,
"properties": {},
"type": "object"
}
],
"minItems": 2,
"type": "array"
},
{
"type": "string"
}
],
"description": "Specify a custom transpiler for use with transpileOnly"
},
"typeCheck": {
"default": true,
"description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).",
"type": "boolean"
}
},
"type": "object"
}
}
}
},
"type": "object",
"allOf": [
{
"$ref": "#/definitions/compilerOptionsDefinition"
},
{
"$ref": "#/definitions/compileOnSaveDefinition"
},
{
"$ref": "#/definitions/typeAcquisitionDefinition"
},
{
"$ref": "#/definitions/extendsDefinition"
},
{
"$ref": "#/definitions/tsNodeDefinition"
},
{
"anyOf": [
{
"$ref": "#/definitions/filesDefinition"
},
{
"$ref": "#/definitions/excludeDefinition"
},
{
"$ref": "#/definitions/includeDefinition"
},
{
"$ref": "#/definitions/referencesDefinition"
}
]
}
]
}