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 中查询 VARCHAR 类型 JSON 数据的问题记录

《MySQL中查询VARCHAR类型JSON数据的问题记录》在数据库设计中,有时我们会将JSON数据存储在VARCHAR或TEXT类型字段中,本文将详细介绍如何在MySQL中有效查询存储为V... 目录一、问题背景二、mysql jsON 函数2.1 常用 JSON 函数三、查询示例3.1 基本查询3.2

使用Python将JSON,XML和YAML数据写入Excel文件

《使用Python将JSON,XML和YAML数据写入Excel文件》JSON、XML和YAML作为主流结构化数据格式,因其层次化表达能力和跨平台兼容性,已成为系统间数据交换的通用载体,本文将介绍如何... 目录如何使用python写入数据到Excel工作表用Python导入jsON数据到Excel工作表用

Python获取中国节假日数据记录入JSON文件

《Python获取中国节假日数据记录入JSON文件》项目系统内置的日历应用为了提升用户体验,特别设置了在调休日期显示“休”的UI图标功能,那么问题是这些调休数据从哪里来呢?我尝试一种更为智能的方法:P... 目录节假日数据获取存入jsON文件节假日数据读取封装完整代码项目系统内置的日历应用为了提升用户体验,

使用Jackson进行JSON生成与解析的新手指南

《使用Jackson进行JSON生成与解析的新手指南》这篇文章主要为大家详细介绍了如何使用Jackson进行JSON生成与解析处理,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录1. 核心依赖2. 基础用法2.1 对象转 jsON(序列化)2.2 JSON 转对象(反序列化)3.

JSON Web Token在登陆中的使用过程

《JSONWebToken在登陆中的使用过程》:本文主要介绍JSONWebToken在登陆中的使用过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录JWT 介绍微服务架构中的 JWT 使用结合微服务网关的 JWT 验证1. 用户登录,生成 JWT2. 自定义过滤

Java利用JSONPath操作JSON数据的技术指南

《Java利用JSONPath操作JSON数据的技术指南》JSONPath是一种强大的工具,用于查询和操作JSON数据,类似于SQL的语法,它为处理复杂的JSON数据结构提供了简单且高效... 目录1、简述2、什么是 jsONPath?3、Java 示例3.1 基本查询3.2 过滤查询3.3 递归搜索3.4

如何自定义Nginx JSON日志格式配置

《如何自定义NginxJSON日志格式配置》Nginx作为最流行的Web服务器之一,其灵活的日志配置能力允许我们根据需求定制日志格式,本文将详细介绍如何配置Nginx以JSON格式记录访问日志,这种... 目录前言为什么选择jsON格式日志?配置步骤详解1. 安装Nginx服务2. 自定义JSON日志格式各

python dict转换成json格式的实现

《pythondict转换成json格式的实现》本文主要介绍了pythondict转换成json格式的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下... 一开始你变成字典格式data = [ { 'a' : 1, 'b' : 2, 'c编程' : 3,

Java实现XML与JSON的互相转换详解

《Java实现XML与JSON的互相转换详解》这篇文章主要为大家详细介绍了如何使用Java实现XML与JSON的互相转换,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录1. XML转jsON1.1 代码目的1.2 代码实现2. JSON转XML3. JSON转XML并输出成指定的

Jackson库进行JSON 序列化时遇到了无限递归(Infinite Recursion)的问题及解决方案

《Jackson库进行JSON序列化时遇到了无限递归(InfiniteRecursion)的问题及解决方案》使用Jackson库进行JSON序列化时遇到了无限递归(InfiniteRecursi... 目录解决方案‌1. 使用 @jsonIgnore 忽略一个方向的引用2. 使用 @JsonManagedR