tsconfig.json文件翻译

2024-04-03 09:36
文章标签 json tsconfig 文件翻译

本文主要是介绍tsconfig.json文件翻译,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

原文件

{"compilerOptions": {/* Visit https://aka.ms/tsconfig to read more about this file *//* Projects */// "incremental": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */// "composite": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */// "tsBuildInfoFile": "./.tsbuildinfo",              /* Specify the path to .tsbuildinfo incremental compilation file. */// "disableSourceOfProjectReferenceRedirect": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */// "disableSolutionSearching": true,                 /* Opt a project out of multi-project reference checking when editing. */// "disableReferencedProjectLoad": true,             /* Reduce the number of projects loaded automatically by TypeScript. *//* Language and Environment */"target": "es2016",                                  /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */// "jsx": "preserve",                                /* Specify what JSX code is generated. */// "experimentalDecorators": true,                   /* Enable experimental support for legacy experimental decorators. */// "emitDecoratorMetadata": true,                    /* Emit design-type metadata for decorated declarations in source files. */// "jsxFactory": "",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */// "jsxFragmentFactory": "",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */// "jsxImportSource": "",                            /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */// "reactNamespace": "",                             /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */// "noLib": true,                                    /* Disable including any library files, including the default lib.d.ts. */// "useDefineForClassFields": true,                  /* Emit ECMAScript-standard-compliant class fields. */// "moduleDetection": "auto",                        /* Control what method is used to detect module-format JS files. *//* Modules */"module": "commonjs",                                /* Specify what module code is generated. */// "rootDir": "./",                                  /* Specify the root folder within your source files. */// "moduleResolution": "node10",                     /* Specify how TypeScript looks up a file from a given module specifier. */// "baseUrl": "./",                                  /* Specify the base directory to resolve non-relative module names. */// "paths": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */// "rootDirs": [],                                   /* Allow multiple folders to be treated as one when resolving modules. */// "typeRoots": [],                                  /* Specify multiple folders that act like './node_modules/@types'. */// "types": [],                                      /* Specify type package names to be included without being referenced in a source file. */// "allowUmdGlobalAccess": true,                     /* Allow accessing UMD globals from modules. */// "moduleSuffixes": [],                             /* List of file name suffixes to search when resolving a module. */// "allowImportingTsExtensions": true,               /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */// "resolvePackageJsonExports": true,                /* Use the package.json 'exports' field when resolving package imports. */// "resolvePackageJsonImports": true,                /* Use the package.json 'imports' field when resolving imports. */// "customConditions": [],                           /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */// "resolveJsonModule": true,                        /* Enable importing .json files. */// "allowArbitraryExtensions": true,                 /* Enable importing files with any extension, provided a declaration file is present. */// "noResolve": true,                                /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. *//* JavaScript Support */// "allowJs": true,                                  /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */// "checkJs": true,                                  /* Enable error reporting in type-checked JavaScript files. */// "maxNodeModuleJsDepth": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. *//* Emit */// "declaration": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */// "declarationMap": true,                           /* Create sourcemaps for d.ts files. */// "emitDeclarationOnly": true,                      /* Only output d.ts files and not JavaScript files. */// "sourceMap": true,                                /* Create source map files for emitted JavaScript files. */// "inlineSourceMap": true,                          /* Include sourcemap files inside the emitted JavaScript. */// "outFile": "./",                                  /* 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. */// "outDir": "./",                                   /* Specify an output folder for all emitted files. */// "removeComments": true,                           /* Disable emitting comments. */// "noEmit": true,                                   /* Disable emitting files from a compilation. */// "importHelpers": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */// "importsNotUsedAsValues": "remove",               /* Specify emit/checking behavior for imports that are only used for types. */// "downlevelIteration": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */// "sourceRoot": "",                                 /* Specify the root path for debuggers to find the reference source code. */// "mapRoot": "",                                    /* Specify the location where debugger should locate map files instead of generated locations. */// "inlineSources": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */// "emitBOM": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */// "newLine": "crlf",                                /* Set the newline character for emitting files. */// "stripInternal": true,                            /* Disable emitting declarations that have '@internal' in their JSDoc comments. */// "noEmitHelpers": true,                            /* Disable generating custom helper functions like '__extends' in compiled output. */// "noEmitOnError": true,                            /* Disable emitting files if any type checking errors are reported. */// "preserveConstEnums": true,                       /* Disable erasing 'const enum' declarations in generated code. */// "declarationDir": "./",                           /* Specify the output directory for generated declaration files. */// "preserveValueImports": true,                     /* Preserve unused imported values in the JavaScript output that would otherwise be removed. *//* Interop Constraints */// "isolatedModules": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */// "verbatimModuleSyntax": true,                     /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */// "allowSyntheticDefaultImports": true,             /* Allow 'import x from y' when a module doesn't have a default export. */"esModuleInterop": true,                             /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */"forceConsistentCasingInFileNames": true,            /* Ensure that casing is correct in imports. *//* Type Checking */"strict": true,                                      /* Enable all strict type-checking options. */// "noImplicitAny": true,                            /* Enable error reporting for expressions and declarations with an implied 'any' type. */// "strictNullChecks": true,                         /* When type checking, take into account 'null' and 'undefined'. */// "strictFunctionTypes": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */// "strictBindCallApply": true,                      /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */// "strictPropertyInitialization": true,             /* Check for class properties that are declared but not set in the constructor. */// "noImplicitThis": true,                           /* Enable error reporting when 'this' is given the type 'any'. */// "useUnknownInCatchVariables": true,               /* Default catch clause variables as 'unknown' instead of 'any'. */// "alwaysStrict": true,                             /* Ensure 'use strict' is always emitted. */// "noUnusedLocals": true,                           /* Enable error reporting when local variables aren't read. */// "noUnusedParameters": true,                       /* Raise an error when a function parameter isn't read. */// "exactOptionalPropertyTypes": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */// "noImplicitReturns": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */// "noFallthroughCasesInSwitch": true,               /* Enable error reporting for fallthrough cases in switch statements. */// "noUncheckedIndexedAccess": true,                 /* Add 'undefined' to a type when accessed using an index. */// "noImplicitOverride": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */// "noPropertyAccessFromIndexSignature": true,       /* Enforces using indexed accessors for keys declared using an indexed type. */// "allowUnusedLabels": true,                        /* Disable error reporting for unused labels. */// "allowUnreachableCode": true,                     /* Disable error reporting for unreachable code. *//* Completeness */// "skipDefaultLibCheck": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */"skipLibCheck": true                                 /* Skip type checking all .d.ts files. */}
}

翻译

{"compilerOptions": {/* 访问 https://aka.ms/tsconfig 以了解更多关于此文件的信息 *//* 项目 */// "incremental": true,                              /* 保存 .tsbuildinfo 文件以允许项目的增量编译。 */// "composite": true,                                /* 启用允许TypeScript项目与项目引用一起使用的约束。 */// "tsBuildInfoFile": "./.tsbuildinfo",              /* 指定 .tsbuildinfo 增量编译文件的路径。 */// "disableSourceOfProjectReferenceRedirect": true,  /* 禁用在引用复合项目时优先使用源文件而非声明文件。 */// "disableSolutionSearching": true,                 /* 在编辑时选择让项目退出多项目引用检查。 */// "disableReferencedProjectLoad": true,             /* 减少TypeScript自动加载的项目数量。 *//* 语言和环境 */"target": "es2016",                                  /* 设置生成的JavaScript的语言版本并包含兼容的库声明。 */// "lib": [],                                        /* 指定一组包含的库声明文件,描述目标运行时环境。 */// "jsx": "preserve",                                /* 指定生成的JSX代码。 */// "experimentalDecorators": true,                   /* 启用对旧版实验性装饰器的实验性支持。 */// "emitDecoratorMetadata": true,                    /* 在源文件中为装饰过的声明发出设计类型元数据。 */// "jsxFactory": "",                                 /* 指定用于针对React JSX发出目标时使用的JSX工厂函数,例如'React.createElement'或'h'。 */// "jsxFragmentFactory": "",                         /* 指定用于碎片的JSX片段引用,针对React JSX发出目标时使用,例如'React.Fragment'或'Fragment'。 */// "jsxImportSource": "",                            /* 指定在使用'jsx: react-jsx*'时用于导入JSX工厂函数的模块说明符。 */// "reactNamespace": "",                             /* 指定用于'createElement'的调用对象。这仅适用于目标为'react' JSX发出。 */// "noLib": true,                                    /* 禁用包括任何库文件,包括默认的lib.d.ts。 */// "useDefineForClassFields": true,                  /* 发出符合ECMAScript标准的类字段。 */// "moduleDetection": "auto",                        /* 控制检测模块格式JS文件使用的方法。 *//* 模块 */"module": "commonjs",                                /* 指定生成的模块代码。 */// "rootDir": "./",                                  /* 指定源文件的根文件夹。 */// "moduleResolution": "node10",                     /* 指定TypeScript如何从给定模块说明符查找文件。 */// "baseUrl": "./",                                  /* 指定用于解析非相对模块名称的基目录。 */// "paths": {},                                      /* 指定一组输入,将导入重新映射到额外的查找位置。 */// "rootDirs": [],                                   /* 允许在解析模块时将多个文件夹视为一个。 */// "typeRoots": [],                                  /* 指定行为类似'./node_modules/@types'的多个文件夹。 */// "types": [],                                      /* 指定要包含的类型包名称,无需在源文件中引用。 */// "allowUmdGlobalAccess": true,                     /* 允许从模块访问UMD全局变量。 */// "moduleSuffixes": [],                             /* 在解析模块时搜索的文件名后缀列表。 */// "allowImportingTsExtensions": true,               /* 允许导入包含TypeScript文件扩展名的导入。需要设置'--moduleResolution bundler'以及'--noEmit'或'--emitDeclarationOnly'。 */// "resolvePackageJsonExports": true,                /* 在解析包导入时使用package.json的'exports'字段。 */// "resolvePackageJsonImports": true,                /* 在解析导入时使用package.json的'imports'字段。 */// "customConditions": [],                           /* 在解析导入时设置解析器特定默认值以外的条件。 */// "resolveJsonModule": true,                        /* 启用导入.json文件。 */// "allowArbitraryExtensions": true,                 /* 允许导入任意扩展名的文件,前提是存在声明文件。 */// "noResolve": true,                                /* 禁止'import'、'require'或'<reference>'扩展TypeScript应添加到项目的文件数量。 *//* JavaScript 支持 */// "allowJs": true,                                  /* 允许JavaScript文件成为程序的一部分。使用'checkJS'选项从这些文件中获取错误。 */// "checkJs": true,                                  /* 在受类型检查的JavaScript文件中启用错误报告。 */// "maxNodeModuleJsDepth": 1,                        /* 指定用于检查来自'node_modules'的JavaScript文件的最大文件夹深度。仅与'allowJs'一起适用。 *//* 输出 */// "declaration": true,                              /* 从项目中的TypeScript和JavaScript文件生成.d.ts文件。 */// "declarationMap": true,                           /* 为d.ts文件创建源映射。 */// "emitDeclarationOnly": true,                      /* 仅输出d.ts文件而不输出JavaScript文件。 */// "sourceMap": true,                                /* 为生成的JavaScript文件创建源映射文件。 */// "inlineSourceMap": true,                          /* 在生成的JavaScript中包括源映射文件。 */// "outFile": "./",                                  /* 指定将所有输出捆绑到一个JavaScript文件中的文件。如果设置了'declaration',也指定一个捆绑所有.d.ts输出的文件。 */// "outDir": "./",                                   /* 指定所有生成文件的输出文件夹。 */// "removeComments": true,                           /* 禁用输出注释。 */// "noEmit": true,                                   /* 禁用从编译中输出文件。 */// "importHelpers": true,                            /* 允许从tslib中导入辅助函数一次性使用,而不是每个文件中都包含它们。 */// "importsNotUsedAsValues": "remove",               /* 指定仅用于类型的导入的发出/检查行为。 */// "downlevelIteration": true,                       /* 为迭代发出更符合标准,但更冗长和性能较差的JavaScript。 */// "sourceRoot": "",                                 /* 指定调试器查找引用源代码的根路径。 */// "mapRoot": "",                                    /* 指定调试器应该在哪里定位映射文件而不是生成的位置。 */// "inlineSources": true,                            /* 在生成的JavaScript中包含源码的源映射内。 */// "emitBOM": true,                                  /* 在输出文件开头发出UTF-8字节顺序标记(BOM)。 */// "newLine": "crlf",                                /* 设置发出文件的换行字符。 */// "stripInternal": true,                            /* 禁用发出带有'@internal'其JSDoc注释的声明。 */// "noEmitHelpers": true,                            /* 禁用在编译输出中生成自定义辅助函数如'__extends'。 */// "noEmitOnError": true,                            /* 如果报告了任何类型检查错误则禁用发出文件。 */// "preserveConstEnums": true,                       /* 在生成的代码中不删除'const enum'声明。 */// "declarationDir": "./",                           /* 指定生成声明文件的输出目录。 */// "preserveValueImports": true,                     /* 在JavaScript输出中保留可能会被移除的未使用的导入值。 *//* 互操作性限制 */// "isolatedModules": true,                          /* 确保每个文件可以安全地进行单独转译,而不依赖于其他导入。 */// "verbatimModuleSyntax": true,                     /* 不转换或省略任何未标记为仅类型的导入或导出,确保它们根据'module'设置写入输出文件的格式。 */// "allowSyntheticDefaultImports": true,             /* 当模块没有默认导出时,允许使用'import x from y'。 */"esModuleInterop": true,                             /* 生成附加的JavaScript以简化CommonJS模块的导入支持。这为类型兼容性启用了'allowSyntheticDefaultImports'。 */// "preserveSymlinks": true,                         /* 禁用将符号链接解析到它们的真实路径。这与node中的同名标志相关。 */"forceConsistentCasingInFileNames": true,            /* 确保导入中的大小写是正确的。 *//* 类型检查 */"strict": true,                                      /* 启用所有严格的类型检查选项。 */// "noImplicitAny": true,                            /* 对含有隐含'any'类型的表达式和声明启用错误报告。 */// "strictNullChecks": true,                         /* 在类型检查时考虑'null'和'undefined'。 */// "strictFunctionTypes": true,                      /* 在分配函数时检查确保参数和返回值是子类型兼容的。 */// "strictBindCallApply": true,                      /* 检查'bind'、'call'和'apply'方法的参数与原函数匹配。 */// "strictPropertyInitialization": true,             /* 检查在构造函数中未设置的声明但已声明的类属性。 */// "noImplicitThis": true,                           /* 当'this'表达式具有类型'any'时启用错误报告。 */// "useUnknownInCatchVariables": true,               /* 默认将catch子句的变量视为'unknown'而不是'any'。 */// "alwaysStrict": true,                             /* 确保始终发出'use strict'。 */// "noUnusedLocals": true,                           /* 启用未读取的本地变量的错误报告。 */// "noUnusedParameters": true,                       /* 当函数参数未被读取时,引发错误。 */// "exactOptionalPropertyTypes": true,               /* 按照书写的方式解释可选属性类型,而不是添加'undefined'。 */// "noImplicitReturns": true,                        /* 对函数中不显式返回的代码路径启用错误报告。 */// "noFallthroughCasesInSwitch": true,               /* 对switch语句中的贯穿情况启用错误报告。 */// "noUncheckedIndexedAccess": true,                 /* 添加'undefined'到使用索引访问时的类型。 */// "noImplicitOverride": true,                       /* 确保在派生类中覆盖的成员带有override修饰符。 */// "noPropertyAccessFromIndexSignature": true,       /* 强制使用索引访问键,这些键是使用索引类型声明的。 */// "allowUnusedLabels": true,                        /* 禁用未使用标签的错误报告。 */// "allowUnreachableCode": true,                     /* 禁用不可达代码的错误报告。 *//* 完整性 */// "skipDefaultLibCheck": true,                      /* 跳过检查TypeScript包含的.d.ts文件的类型检查。 */"skipLibCheck": true                                 /* 跳过所有.d.ts文件的类型检查。 */}
}

这篇关于tsconfig.json文件翻译的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/872548

相关文章

MySQL查询JSON数组字段包含特定字符串的方法

《MySQL查询JSON数组字段包含特定字符串的方法》在MySQL数据库中,当某个字段存储的是JSON数组,需要查询数组中包含特定字符串的记录时传统的LIKE语句无法直接使用,下面小编就为大家介绍两种... 目录问题背景解决方案对比1. 精确匹配方案(推荐)2. 模糊匹配方案参数化查询示例使用场景建议性能优

解决未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4‘问题

《解决未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4‘问题》:本文主要介绍解决未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4... 目录未解析的依赖项:‘net.sf.json-lib:json-lib:jar:2.4‘打开pom.XM

SpringBoot排查和解决JSON解析错误(400 Bad Request)的方法

《SpringBoot排查和解决JSON解析错误(400BadRequest)的方法》在开发SpringBootRESTfulAPI时,客户端与服务端的数据交互通常使用JSON格式,然而,JSON... 目录问题背景1. 问题描述2. 错误分析解决方案1. 手动重新输入jsON2. 使用工具清理JSON3.

Springboot3+将ID转为JSON字符串的详细配置方案

《Springboot3+将ID转为JSON字符串的详细配置方案》:本文主要介绍纯后端实现Long/BigIntegerID转为JSON字符串的详细配置方案,s基于SpringBoot3+和Spr... 目录1. 添加依赖2. 全局 Jackson 配置3. 精准控制(可选)4. OpenAPI (Spri

MySQL JSON 查询中的对象与数组技巧及查询示例

《MySQLJSON查询中的对象与数组技巧及查询示例》MySQL中JSON对象和JSON数组查询的详细介绍及带有WHERE条件的查询示例,本文给大家介绍的非常详细,mysqljson查询示例相关知... 目录jsON 对象查询1. JSON_CONTAINS2. JSON_EXTRACT3. JSON_TA

Java中JSON格式反序列化为Map且保证存取顺序一致的问题

《Java中JSON格式反序列化为Map且保证存取顺序一致的问题》:本文主要介绍Java中JSON格式反序列化为Map且保证存取顺序一致的问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未... 目录背景问题解决方法总结背景做项目涉及两个微服务之间传数据时,需要提供方将Map类型的数据序列化为co

使用Java将实体类转换为JSON并输出到控制台的完整过程

《使用Java将实体类转换为JSON并输出到控制台的完整过程》在软件开发的过程中,Java是一种广泛使用的编程语言,而在众多应用中,数据的传输和存储经常需要使用JSON格式,用Java将实体类转换为J... 在软件开发的过程中,Java是一种广泛使用的编程语言,而在众多应用中,数据的传输和存储经常需要使用j

MySQL 中的 JSON 查询案例详解

《MySQL中的JSON查询案例详解》:本文主要介绍MySQL的JSON查询的相关知识,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录mysql 的 jsON 路径格式基本结构路径组件详解特殊语法元素实际示例简单路径复杂路径简写操作符注意MySQL 的 J

Spring Boot中JSON数值溢出问题从报错到优雅解决办法

《SpringBoot中JSON数值溢出问题从报错到优雅解决办法》:本文主要介绍SpringBoot中JSON数值溢出问题从报错到优雅的解决办法,通过修改字段类型为Long、添加全局异常处理和... 目录一、问题背景:为什么我的接口突然报错了?二、为什么会发生这个错误?1. Java 数据类型的“容量”限制

Spring 请求之传递 JSON 数据的操作方法

《Spring请求之传递JSON数据的操作方法》JSON就是一种数据格式,有自己的格式和语法,使用文本表示一个对象或数组的信息,因此JSON本质是字符串,主要负责在不同的语言中数据传递和交换,这... 目录jsON 概念JSON 语法JSON 的语法JSON 的两种结构JSON 字符串和 Java 对象互转