typescript 5.9.2 → 6.0.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/SECURITY.md +2 -4
  2. package/lib/_tsc.js +2340 -1692
  3. package/lib/_tsserver.js +1 -1
  4. package/lib/_typingsInstaller.js +1 -1
  5. package/lib/cs/diagnosticMessages.generated.json +14 -7
  6. package/lib/de/diagnosticMessages.generated.json +10 -7
  7. package/lib/es/diagnosticMessages.generated.json +14 -7
  8. package/lib/fr/diagnosticMessages.generated.json +14 -7
  9. package/lib/it/diagnosticMessages.generated.json +10 -7
  10. package/lib/ja/diagnosticMessages.generated.json +14 -7
  11. package/lib/ko/diagnosticMessages.generated.json +14 -7
  12. package/lib/lib.d.ts +1 -3
  13. package/lib/lib.decorators.d.ts +1 -3
  14. package/lib/lib.decorators.legacy.d.ts +1 -3
  15. package/lib/lib.dom.asynciterable.d.ts +3 -26
  16. package/lib/lib.dom.d.ts +8382 -3508
  17. package/lib/lib.dom.iterable.d.ts +3 -556
  18. package/lib/lib.es2015.collection.d.ts +7 -4
  19. package/lib/lib.es2015.core.d.ts +2 -4
  20. package/lib/lib.es2015.d.ts +1 -3
  21. package/lib/lib.es2015.generator.d.ts +1 -3
  22. package/lib/lib.es2015.iterable.d.ts +2 -4
  23. package/lib/lib.es2015.promise.d.ts +1 -3
  24. package/lib/lib.es2015.proxy.d.ts +1 -3
  25. package/lib/lib.es2015.reflect.d.ts +1 -3
  26. package/lib/lib.es2015.symbol.d.ts +1 -3
  27. package/lib/lib.es2015.symbol.wellknown.d.ts +1 -3
  28. package/lib/lib.es2016.array.include.d.ts +1 -3
  29. package/lib/lib.es2016.d.ts +1 -3
  30. package/lib/lib.es2016.full.d.ts +1 -3
  31. package/lib/lib.es2016.intl.d.ts +1 -3
  32. package/lib/lib.es2017.arraybuffer.d.ts +1 -3
  33. package/lib/lib.es2017.d.ts +1 -3
  34. package/lib/lib.es2017.date.d.ts +1 -3
  35. package/lib/lib.es2017.full.d.ts +1 -3
  36. package/lib/lib.es2017.intl.d.ts +1 -3
  37. package/lib/lib.es2017.object.d.ts +1 -3
  38. package/lib/lib.es2017.sharedmemory.d.ts +1 -3
  39. package/lib/lib.es2017.string.d.ts +1 -3
  40. package/lib/lib.es2017.typedarrays.d.ts +1 -3
  41. package/lib/lib.es2018.asyncgenerator.d.ts +1 -3
  42. package/lib/lib.es2018.asynciterable.d.ts +1 -3
  43. package/lib/lib.es2018.d.ts +1 -3
  44. package/lib/lib.es2018.full.d.ts +1 -3
  45. package/lib/lib.es2018.intl.d.ts +1 -3
  46. package/lib/lib.es2018.promise.d.ts +1 -3
  47. package/lib/lib.es2018.regexp.d.ts +1 -3
  48. package/lib/lib.es2019.array.d.ts +1 -3
  49. package/lib/lib.es2019.d.ts +1 -3
  50. package/lib/lib.es2019.full.d.ts +1 -3
  51. package/lib/lib.es2019.intl.d.ts +1 -3
  52. package/lib/lib.es2019.object.d.ts +1 -3
  53. package/lib/lib.es2019.string.d.ts +1 -3
  54. package/lib/lib.es2019.symbol.d.ts +1 -3
  55. package/lib/lib.es2020.bigint.d.ts +5 -7
  56. package/lib/lib.es2020.d.ts +1 -3
  57. package/lib/lib.es2020.date.d.ts +1 -3
  58. package/lib/lib.es2020.full.d.ts +1 -3
  59. package/lib/lib.es2020.intl.d.ts +1 -3
  60. package/lib/lib.es2020.number.d.ts +1 -3
  61. package/lib/lib.es2020.promise.d.ts +1 -3
  62. package/lib/lib.es2020.sharedmemory.d.ts +1 -3
  63. package/lib/lib.es2020.string.d.ts +2 -4
  64. package/lib/lib.es2020.symbol.wellknown.d.ts +2 -4
  65. package/lib/lib.es2021.d.ts +1 -3
  66. package/lib/lib.es2021.full.d.ts +1 -3
  67. package/lib/lib.es2021.intl.d.ts +1 -3
  68. package/lib/lib.es2021.promise.d.ts +1 -3
  69. package/lib/lib.es2021.string.d.ts +1 -3
  70. package/lib/lib.es2021.weakref.d.ts +1 -3
  71. package/lib/lib.es2022.array.d.ts +1 -3
  72. package/lib/lib.es2022.d.ts +1 -3
  73. package/lib/lib.es2022.error.d.ts +1 -3
  74. package/lib/lib.es2022.full.d.ts +1 -3
  75. package/lib/lib.es2022.intl.d.ts +1 -3
  76. package/lib/lib.es2022.object.d.ts +1 -3
  77. package/lib/lib.es2022.regexp.d.ts +2 -4
  78. package/lib/lib.es2022.string.d.ts +1 -3
  79. package/lib/lib.es2023.array.d.ts +1 -3
  80. package/lib/lib.es2023.collection.d.ts +1 -3
  81. package/lib/lib.es2023.d.ts +1 -3
  82. package/lib/lib.es2023.full.d.ts +1 -3
  83. package/lib/lib.es2023.intl.d.ts +10 -4
  84. package/lib/lib.es2024.arraybuffer.d.ts +1 -3
  85. package/lib/lib.es2024.collection.d.ts +1 -3
  86. package/lib/lib.es2024.d.ts +1 -3
  87. package/lib/lib.es2024.full.d.ts +1 -3
  88. package/lib/lib.es2024.object.d.ts +1 -3
  89. package/lib/lib.es2024.promise.d.ts +1 -3
  90. package/lib/lib.es2024.regexp.d.ts +1 -3
  91. package/lib/lib.es2024.sharedmemory.d.ts +1 -3
  92. package/lib/lib.es2024.string.d.ts +1 -3
  93. package/lib/lib.es2025.collection.d.ts +94 -0
  94. package/lib/lib.es2025.d.ts +23 -0
  95. package/lib/{lib.esnext.float16.d.ts → lib.es2025.float16.d.ts} +3 -3
  96. package/lib/lib.es2025.full.d.ts +22 -0
  97. package/lib/lib.es2025.intl.d.ts +200 -0
  98. package/lib/{lib.esnext.iterator.d.ts → lib.es2025.iterator.d.ts} +1 -3
  99. package/lib/{lib.esnext.promise.d.ts → lib.es2025.promise.d.ts} +1 -3
  100. package/lib/lib.es2025.regexp.d.ts +30 -0
  101. package/lib/lib.es5.d.ts +22 -24
  102. package/lib/lib.es6.d.ts +1 -3
  103. package/lib/lib.esnext.array.d.ts +1 -3
  104. package/lib/lib.esnext.collection.d.ts +20 -69
  105. package/lib/lib.esnext.d.ts +6 -8
  106. package/lib/lib.esnext.date.d.ts +21 -0
  107. package/lib/lib.esnext.decorators.d.ts +1 -3
  108. package/lib/lib.esnext.disposable.d.ts +1 -3
  109. package/lib/lib.esnext.error.d.ts +1 -3
  110. package/lib/lib.esnext.full.d.ts +1 -3
  111. package/lib/lib.esnext.intl.d.ts +89 -3
  112. package/lib/lib.esnext.sharedmemory.d.ts +1 -3
  113. package/lib/lib.esnext.temporal.d.ts +473 -0
  114. package/lib/lib.esnext.typedarrays.d.ts +90 -0
  115. package/lib/lib.scripthost.d.ts +1 -3
  116. package/lib/lib.webworker.asynciterable.d.ts +3 -26
  117. package/lib/lib.webworker.d.ts +2682 -1018
  118. package/lib/lib.webworker.importscripts.d.ts +1 -3
  119. package/lib/lib.webworker.iterable.d.ts +3 -325
  120. package/lib/pl/diagnosticMessages.generated.json +14 -7
  121. package/lib/pt-br/diagnosticMessages.generated.json +14 -7
  122. package/lib/ru/diagnosticMessages.generated.json +10 -7
  123. package/lib/tr/diagnosticMessages.generated.json +14 -7
  124. package/lib/tsserverlibrary.d.ts +1 -1
  125. package/lib/tsserverlibrary.js +1 -1
  126. package/lib/typescript.d.ts +69 -59
  127. package/lib/typescript.js +2556 -1812
  128. package/lib/watchGuard.js +1 -1
  129. package/lib/zh-cn/diagnosticMessages.generated.json +14 -7
  130. package/lib/zh-tw/diagnosticMessages.generated.json +10 -7
  131. package/package.json +23 -24
package/lib/watchGuard.js CHANGED
@@ -7,7 +7,7 @@ License at http://www.apache.org/licenses/LICENSE-2.0
7
7
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
8
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
9
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
10
+ MERCHANTABILITY OR NON-INFRINGEMENT.
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
@@ -26,7 +26,7 @@
26
26
  "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165": "环境上下文中的计算属性名称必须引用类型为文本类型或 \"unique symbol\" 类型的表达式。",
27
27
  "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "接口中的计算属性名称必须引用必须引用类型为文本类型或 \"unique symbol\" 的表达式。",
28
28
  "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "计算属性名的类型必须为 \"string\"、\"number\"、\"symbol\" 或 \"any\"。",
29
- "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' 断言只能作用于枚举成员、字符串、数字、布尔值、数组或对象字面量。",
29
+ "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355": "\"const\" 断言只能作用于枚举成员、字符串、数字、布尔值、数组或对象字面量。",
30
30
  "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "只有使用字符串文本才能访问常数枚举成员。",
31
31
  "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "环境上下文中的 \"const\" 初始化表达式必须为字符串、数字文本或文本枚举引用。",
32
32
  "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "当构造函数的类扩展 \"null\" 时,它不能包含 \"super\" 调用。",
@@ -365,6 +365,7 @@
365
365
  "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "找不到模块“{0}”。请考虑使用 \"--resolveJsonModule\" 导入带 \".json\" 扩展的模块。",
366
366
  "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792": "找不到模块“{0}”。你的意思是要将 \"moduleResolution\" 选项设置为 \"nodenext\",还是要将别名添加到 \"paths\" 选项中?",
367
367
  "Cannot_find_module_0_or_its_corresponding_type_declarations_2307": "找不到模块“{0}”或其相应的类型声明。",
368
+ "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882": "找不到“{0}”的副作用导入的模块或类型声明。",
368
369
  "Cannot_find_name_0_2304": "找不到名称“{0}”。",
369
370
  "Cannot_find_name_0_Did_you_mean_1_2552": "找不到名称“{0}”。你是否指的是“{1}”?",
370
371
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "找不到名称“{0}”。你的意思是实例成员“this.{0}”?",
@@ -653,8 +654,9 @@
653
654
  "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323": "仅当将 ‘--module’ 标记设置为 ‘es2020’、‘es2022’、‘esnext’、‘commonjs’、‘amd’、‘system’、‘umd’、‘node16’、‘node18’、'node20' 或 ‘nodenext’ 时,才支持动态导入。",
654
655
  "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450": "动态导入只能接受模块说明符和可选的特性集作为参数",
655
656
  "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324": "仅当 ‘--module’ 选项设置为 ‘esnext’、‘node16’、‘node18’、‘node20’、‘nodenext’ 或 ‘preserve’ 时,动态导入才支持第二个参数。",
656
- "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293": "当“module”设置为“preserve”时,CommonJS 模块中不允许使用 ESM 语法。",
657
- "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286": "启用“verbatimModuleSyntax”时,CommonJS 模块中不允许使用 ESM 语法。",
657
+ "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286": "ECMAScript 导入和导出不能写入 \"verbatimModuleSyntax\" 下的 CommonJS 文件中。",
658
+ "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295": "ECMAScript 导入和导出不能写入 \"verbatimModuleSyntax\" 下的 CommonJS 文件中。调整最近的 \"package.json\" 中的 \"type\" 字段,将此文件设置为 ECMAScript 模块,或调整 TypeScript 中的 \"verbatimModuleSyntax\"、\"module\" 和 \"moduleResolution\" 设置。",
659
+ "ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293": "当 \"module\" 设置为 \"preserve\" 时,CommonJS 模块中不允许使用 ECMAScript 模块语法。",
658
660
  "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125": "“{0}.{1}”的每个声明的值不同,其中应为“{2}”,但给出的是“{3}”。",
659
661
  "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "联合类型 \"{0}\" 的每个成员都有构造签名,但这些签名都不能互相兼容。",
660
662
  "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "联合类型 \"{0}\" 的每个成员都有签名,但这些签名都不能互相兼容。",
@@ -883,6 +885,7 @@
883
885
  "Identifier_string_literal_or_number_literal_expected_1496": "应为标识符、字符串文本或数字文本。",
884
886
  "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040": "如果“{0}”包实际上公开此模块,请考虑发送拉取请求以修正“https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}”",
885
887
  "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058": "如果“{0}”包实际公开了此模块,请尝试添加包含 `declare module‘{1}';` 的新声明(.d.ts)文件",
888
+ "Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files_1549": "忽略找到的 tsconfig,使用命令行选项和文件进行构建。",
886
889
  "Ignore_this_error_message_90019": "忽略此错误信息",
887
890
  "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924": "忽略 tsconfig.json,使用默认编译器选项编译指定文件。",
888
891
  "Implement_all_inherited_abstract_classes_95040": "实现继承的所有抽象类",
@@ -1139,7 +1142,7 @@
1139
1142
  "Option_0_can_only_be_specified_on_command_line_6266": "选项“{0}”只能在命令行上指定。",
1140
1143
  "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "仅当提供了选项 \"--inlineSourceMap\" 或选项 \"--sourceMap\" 时,才能使用选项“{0}”。",
1141
1144
  "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098": "只有在“moduleResolution”设置为“node16”、“nodenext”或“bundler”时,才能使用选项“{0}”。",
1142
- "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095": "只有在“module”设置为“preserve”或“es2015”或更高版本时,才能使用选项“{0}”。",
1145
+ "Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later_5095": "只有在 \"module\" 设置为 \"preserve\"、\"commonjs\"、\"es2015\" 或更高版本时,才能使用选项“{0}”。",
1143
1146
  "Option_0_cannot_be_specified_when_option_jsx_is_1_5089": "选项 \"jsx\" 为“{1}”时,不能指定选项“{0}”。",
1144
1147
  "Option_0_cannot_be_specified_with_option_1_5053": "选项“{0}”不能与选项“{1}”同时指定。",
1145
1148
  "Option_0_cannot_be_specified_without_specifying_option_1_5052": "无法在不指定选项“{1}”的情况下指定选项“{0}”。",
@@ -1147,7 +1150,7 @@
1147
1150
  "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102": "选项“{0}”已删除。请从配置中删除它。",
1148
1151
  "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101": "选项“{0}”已弃用,并将停止在 TypeScript {1} 中运行。指定 compilerOption“ignoreDeprecations”:“{2}”以使此错误静音。",
1149
1152
  "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104": "选项“{0}”是冗余选项,不能与选项“{1}”同时指定。",
1150
- "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096": "只有在设置“noEmit”或“emitDeclarationOnly”时,才能使用选项“allowImportingTsExtensions”。",
1153
+ "Option_allowImportingTsExtensions_can_only_be_used_when_one_of_noEmit_emitDeclarationOnly_or_rewrite_5096": "仅当设置了 'noEmit'、'emitDeclarationOnly' 或 'rewriteRelativeImportExtensions' 其中之一时,才能使用选项 'allowImportingTsExtensions'。",
1151
1154
  "Option_build_must_be_the_first_command_line_argument_6369": "选项 '--build' 必须是第一个命令行参数。",
1152
1155
  "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "选项 “--incremental” 只能使用 tsconfig 指定,在发出到单个文件时指定,或在指定了选项 “--tsBuildInfoFile” 时指定。",
1153
1156
  "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "选项 \"isolatedModules\" 只可在提供了选项 \"--module\" 或者选项 \"target\" 是 \"ES2015\" 或更高版本时使用。",
@@ -1894,6 +1897,7 @@
1894
1897
  "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625": "源中位置 {0} 的可变元素与目标中位置 {1} 的元素不匹配。",
1895
1898
  "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637": "仅对象、函数、构造函数、映射类型的类型别名支持方差注释。",
1896
1899
  "Version_0_6029": "版本 {0}",
1900
+ "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111": "请访问 https://aka.ms/ts6 以获取迁移信息。",
1897
1901
  "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110": "请访问 https://aka.ms/tsconfig,了解有关此文件的详细信息",
1898
1902
  "WATCH_OPTIONS_6918": "监视选项",
1899
1903
  "Watch_and_Build_Modes_6250": "观看和生成模式",
@@ -2020,6 +2024,7 @@
2020
2024
  "await_expressions_cannot_be_used_in_a_parameter_initializer_2524": "不能在参数初始化表达式中使用 \"await\" 表达式。",
2021
2025
  "await_has_no_effect_on_the_type_of_this_expression_80007": "\"await\" 对此表达式的类型没有影响。",
2022
2026
  "await_using_declarations_are_not_allowed_in_ambient_contexts_1546": "环境上下文中不允许使用 ‘await using’ 声明。",
2027
+ "await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548": "除非包含在块中,否则不允许在 \"case\" 或 \"default\" 子句中使用 \"await using\" 声明。",
2023
2028
  "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853": "只有当文件是模块时,才允许在该文件的顶层使用 \"await using\" 语句,但此文件没有导入或导出。可考虑添加空的 \"export {}\" 将此文件变为模块。",
2024
2029
  "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852": "\"await using\" 语句仅允许在异步函数和顶级模块中使用。",
2025
2030
  "await_using_statements_cannot_be_used_inside_a_class_static_block_18054": "\"await using\" 语句不能在类静态块内使用。",
@@ -2044,6 +2049,7 @@
2044
2049
  "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020": "导出的类“{0}”的 \"extends\" 子句具有或正在使用专用名称“{1}”。",
2045
2050
  "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021": "导出的类的 \"extends\" 子句具有或正在使用专用名称“{0}”。",
2046
2051
  "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022": "导出接口“{0}”的 \"extends\" 子句具有或正在使用专用名称“{1}”。",
2052
+ "false_unless_checkJs_is_set_6932": "为 `false`,除非设置了 `checkJs`",
2047
2053
  "false_unless_composite_is_set_6906": "\"false\",除非设置了 \"composite\"",
2048
2054
  "false_unless_strict_is_set_6905": "\"false\",除非设置了 \"strict\"",
2049
2055
  "file_6025": "文件",
@@ -2058,10 +2064,9 @@
2058
2064
  "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "仅条件类型的 \"extends\" 子句中才允许 \"infer\" 声明。",
2059
2065
  "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510": "\"\\k\" 后面必须有一个括在尖括号中的捕获组名称。",
2060
2066
  "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "\"let\" 不能用作 \"let\" 或 \"const\" 声明中的名称。",
2061
- "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010": "module === 'AMD' 或 'UMD' 或 'System' 或 'ES6',然后 'Classic', 否则为 'Node'",
2062
- "module_system_or_esModuleInterop_6904": "module === \"system\" 或 esModuleInterop",
2063
2067
  "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "其目标缺少构造签名的 \"new\" 表达式隐式具有 \"any\" 类型。",
2064
2068
  "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907": "`[\"node_modules\"、\"bower_components\"、\"jspm_packages\"]`,以及 \"outDir\" 的值(如果指定)。",
2069
+ "nodenext_if_module_is_nodenext_node16_if_module_is_node16_or_node18_otherwise_bundler_69010": "如果 `module` 是 `nodenext`,则为 `nodenext`;如果 `module` 是 `node16` 或 `node18`,则为 `node16`;否则为 `bundler`。",
2065
2070
  "one_of_Colon_6900": "以下其中一个:",
2066
2071
  "one_or_more_Colon_6901": "一个或更多:",
2067
2072
  "options_6024": "选项",
@@ -2108,6 +2113,7 @@
2108
2113
  "true_if_composite_false_otherwise_6909": "如果为 \"composite\",则为 \"true\",否则为 \"false\"",
2109
2114
  "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411": "当 \"moduleResolution\" 为 \"node16\"、\"nodenext \"或 \"bundler\" 时为 `true`;否则为 `false`。",
2110
2115
  "tsc_Colon_The_TypeScript_Compiler_6922": "tsc: TypeScript 编译器",
2116
+ "tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConf_5112": "存在 tsconfig.json,但如果命令行指定了文件,则不会加载该文件。使用 \"--ignoreConfig\" 跳过此错误。",
2111
2117
  "type_Colon_6902": "类型:",
2112
2118
  "unique_symbol_types_are_not_allowed_here_1335": "此处不允许使用 \"unique symbol\" 类型。",
2113
2119
  "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334": "\"unique symbol\" 类型仅可用于变量语句中的变量。",
@@ -2115,6 +2121,7 @@
2115
2121
  "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347": "\"use strict\" 指令不能与非简单参数列表一起使用。",
2116
2122
  "use_strict_directive_used_here_1349": "此处使用了 \"use strict\" 指令。",
2117
2123
  "using_declarations_are_not_allowed_in_ambient_contexts_1545": "环境上下文中不允许使用 ‘using’ 声明。",
2124
+ "using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1547": "除非包含在块中,否则不允许在 \"case\" 或 \"default\" 子句中使用 \"using\" 声明。",
2118
2125
  "with_statements_are_not_allowed_in_an_async_function_block_1300": "不允许在异步函数块中使用 \"with\" 语句。",
2119
2126
  "with_statements_are_not_allowed_in_strict_mode_1101": "严格模式下不允许使用 \"with\" 语句。",
2120
2127
  "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057": "\"yield\" 表达式隐式导致 \"any\" 类型,因为它的包含生成器缺少返回类型批注。",
@@ -26,7 +26,7 @@
26
26
  "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165": "環境內容中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。",
27
27
  "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "介面中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。",
28
28
  "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "計算的屬性名稱必須是 'string'、'number'、'symbol' 或 'any' 類型。",
29
- "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' 判斷提示只可套用至列舉成員、字串、數字、布林值、陣列或物件常值的參考。",
29
+ "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355": "'const' 判斷提示只可套用至列舉成員、字串、數字、布林值、陣列或物件常值的參考。",
30
30
  "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "若要存取常數列舉成員,必須透過字串常值。",
31
31
  "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "環境內容中的 'const' 初始設定式必須為字串、數字常值或常值列舉參考。",
32
32
  "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "當建構函式的類別擴充為 'null' 時,不得包含 'super' 呼叫。",
@@ -365,6 +365,7 @@
365
365
  "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "找不到模組 '{0}'。建議使用 '--resolveJsonModule',匯入副檔名為 '.json' 的模組。",
366
366
  "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792": "找不到模組 '{0}'。您是要將 'moduleResolution' 選項設為 'nodenext',或是要將別名新增至 'paths' 選項?",
367
367
  "Cannot_find_module_0_or_its_corresponding_type_declarations_2307": "找不到模組 '{0}' 或其對應的型別宣告。",
368
+ "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882": "找不到 '{0}' 副作用匯入的模組或類型宣告。",
368
369
  "Cannot_find_name_0_2304": "找不到名稱 '{0}'。",
369
370
  "Cannot_find_name_0_Did_you_mean_1_2552": "找不到名稱 '{0}'。您指的是 '{1}' 嗎?",
370
371
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "找不到名稱 '{0}'。您要找的是此執行個體成員 'this.{0}' 嗎?",
@@ -653,8 +654,9 @@
653
654
  "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323": "只有在 '--module' 旗標設定為 'es2020'、'es2022'、'esnext'、'commonjs'、'amd'、'system'、'umd'、'node16'、'node18'、'node20' 或 'nodenext',才支援動態匯入。",
654
655
  "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450": "動態匯入只接受模組指定名稱和一系列選擇性屬性來做為引數",
655
656
  "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324": "當 '--module' 選項設定為 'esnext'、'node16'、'node18'、'node20'、'nodenext' 或 'preserve' 時,動態匯入只支援第二個引數。",
656
- "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293": " 'module' 設定為 'preserve' 時,CommonJS 模組中不允許 ESM 語法。",
657
- "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286": "啟用 'verbatimModuleSyntax' 時,CommonJS 模組中不允許 ESM 語法。",
657
+ "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286": "無法在 'verbatimModuleSyntax' 底下的 CommonJS 檔案中撰寫 ECMAScript 匯入和匯出。",
658
+ "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295": "無法在 'verbatimModuleSyntax' 底下的 CommonJS 檔案中撰寫 ECMAScript 匯入和匯出。請調整最近的 'package.json' 中的 'type' 欄位,將此檔案設為 ECMAScript 模組,或調整 TypeScript 中的 'verbatimModuleSyntax'、'module' 和 'moduleResolution' 設定。",
659
+ "ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293": "當 'module' 設定為 'preserve' 時,CommonJS 模組中不允許 ECMAScript 模組語法。",
658
660
  "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125": "'{0}.{1}' 的每個宣告值不同,其中應該要有 '{2}',但只包含 '{3}'。",
659
661
  "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "等位型別 '{0}' 的每個成員都有建構簽章,但這些簽章都互不相容。",
660
662
  "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "等位型別 '{0}' 的每個成員都有簽章,但這些簽章都互不相容。",
@@ -1139,7 +1141,7 @@
1139
1141
  "Option_0_can_only_be_specified_on_command_line_6266": "選項 '{0}' 只能在命令列中指定。",
1140
1142
  "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051": "只有在已提供選項 '--inlineSourceMap' 或選項 '--sourceMap' 時,才可使用選項 '{0}'。",
1141
1143
  "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098": "只有當 'moduleResolution' 設定為 'node16'、'nodenext' 或 'bundler' 時,才可以使用選項 '{0}'。",
1142
- "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095": "只有當 'module' 設定為 'preserve'、'es2015' 或更新版本時,才能使用 '{0}' 選項。",
1144
+ "Option_0_can_only_be_used_when_module_is_set_to_preserve_commonjs_or_es2015_or_later_5095": "只有當 'module' 設定為 'preserve'、'commonjs' 或 'es2015' 或更新版本時,才能使用選項 '{0}'",
1143
1145
  "Option_0_cannot_be_specified_when_option_jsx_is_1_5089": "當選項 'jsx' 為 '{1}' 時,無法指定選項 '{0}'。",
1144
1146
  "Option_0_cannot_be_specified_with_option_1_5053": "不得同時指定選項 '{0}' 與選項 '{1}'。",
1145
1147
  "Option_0_cannot_be_specified_without_specifying_option_1_5052": "必須指定選項 '{1}' 才可指定選項 '{0}'。",
@@ -1147,7 +1149,7 @@
1147
1149
  "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102": "已移除選項 '{0}'。請將該選項從您的設定中移除。",
1148
1150
  "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101": "選項 '{0}' 已被取代,將在 TypeScript {1} 中停止運作。指定 compilerOption '\"ignoreDeprecations\": \"{2}\"' 以沉默此錯誤。",
1149
1151
  "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104": "選項 '{0}' 為多餘且不得與選項 '{1}'一起指定。",
1150
- "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096": "僅在已設定 'noEmit' 或 'emitDeclarationOnly' 時,才能使用選項 'allowImportingTsExtensions'",
1152
+ "Option_allowImportingTsExtensions_can_only_be_used_when_one_of_noEmit_emitDeclarationOnly_or_rewrite_5096": "只有在設定 'noEmit'、'emitDeclarationOnly' 或 'rewriteRelativeImportExtensions' 其中一項時,才能使用 'allowImportingTsExtensions' 選項。",
1151
1153
  "Option_build_must_be_the_first_command_line_argument_6369": "選項 '--build' 必須是第一個命令列引數。",
1152
1154
  "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074": "只有在使用 tsconfig、發出至單一檔案,或指定 '--tsBuildInfoFile' 選項時,才可指定 '--incremental'選項。",
1153
1155
  "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "只有在提供選項 '--module' 或是 'target' 為 'ES2015' 或更高項目時,才可使用選項 'isolatedModules'。",
@@ -1894,6 +1896,7 @@
1894
1896
  "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625": "來源中位於 {0} 的可變元素與目標中位於 {1} 的元素不相符。",
1895
1897
  "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637": "只有物件、函式、建構函式和對應類型的類型別名才支援差異註釋。",
1896
1898
  "Version_0_6029": "版本 {0}",
1899
+ "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111": "請造訪 https://aka.ms/ts6 以取得移轉資訊。",
1897
1900
  "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110": "瀏覽 https://aka.ms/tsconfig 以閱讀此檔案的詳細資訊",
1898
1901
  "WATCH_OPTIONS_6918": "監看式選項",
1899
1902
  "Watch_and_Build_Modes_6250": "觀看及建置模式",
@@ -2044,6 +2047,7 @@
2044
2047
  "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020": "匯出類別 '{0}' 的 'extends' 子句具有或使用私用名稱 '{1}'。",
2045
2048
  "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021": "匯出類別的 'extends' 子句包含或使用了私人名稱 '{0}'。",
2046
2049
  "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022": "匯出介面 '{0}' 的 'extends' 子句具有或使用私用名稱 '{1}'。",
2050
+ "false_unless_checkJs_is_set_6932": "'false',除非已設定 'checkJs'",
2047
2051
  "false_unless_composite_is_set_6906": "`false`,除非已設定 `composite`",
2048
2052
  "false_unless_strict_is_set_6905": "`false`,除非已設定 `strict`",
2049
2053
  "file_6025": "檔案",
@@ -2058,10 +2062,9 @@
2058
2062
  "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338": "只允許在條件式類型的 'extends' 子句中使用 'infer' 宣告。",
2059
2063
  "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510": "'\\k' 後必須是以角括弧括住的擷取群組名稱。",
2060
2064
  "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480": "'let' 或 'const' 宣告中不得使用 'let' 作為名稱。",
2061
- "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010": "模組 === `AMD` 或 `UMD` 或 `System` 或 `ES6`,則為 `Classic`,否則為 `Node`",
2062
- "module_system_or_esModuleInterop_6904": "模組 === \"system\" 或 esModuleInterop",
2063
2065
  "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009": "目標缺少建構簽章的 'new' 運算式隱含了 'any' 類型。",
2064
2066
  "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907": "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`,加上 `outDir` 的值 (如果有指定)。",
2067
+ "nodenext_if_module_is_nodenext_node16_if_module_is_node16_or_node18_otherwise_bundler_69010": "如果 `module` 是 `nodenext`,則為 `nodenext`; 如果 `module` 是 `node16` 或 `node18`,則為 `node16`; 否則為 `bundler`。",
2065
2068
  "one_of_Colon_6900": "以下其中一個:",
2066
2069
  "one_or_more_Colon_6901": "以下一或多個:",
2067
2070
  "options_6024": "選項",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.9.2",
5
+ "version": "6.0.0-beta",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -42,46 +42,45 @@
42
42
  "@dprint/formatter": "^0.4.1",
43
43
  "@dprint/typescript": "0.93.4",
44
44
  "@esfx/canceltoken": "^1.0.0",
45
- "@eslint/js": "^9.20.0",
46
- "@octokit/rest": "^21.1.1",
45
+ "@eslint/js": "^9.39.1",
46
+ "@octokit/rest": "^22.0.1",
47
47
  "@types/chai": "^4.3.20",
48
- "@types/diff": "^7.0.1",
49
48
  "@types/minimist": "^1.2.5",
50
49
  "@types/mocha": "^10.0.10",
51
- "@types/ms": "^0.7.34",
50
+ "@types/ms": "^2.1.0",
52
51
  "@types/node": "latest",
53
52
  "@types/source-map-support": "^0.5.10",
54
53
  "@types/which": "^3.0.4",
55
- "@typescript-eslint/rule-tester": "^8.24.1",
56
- "@typescript-eslint/type-utils": "^8.24.1",
57
- "@typescript-eslint/utils": "^8.24.1",
58
- "azure-devops-node-api": "^14.1.0",
54
+ "@typescript-eslint/rule-tester": "^8.47.0",
55
+ "@typescript-eslint/type-utils": "^8.47.0",
56
+ "@typescript-eslint/utils": "^8.47.0",
57
+ "azure-devops-node-api": "^15.1.1",
59
58
  "c8": "^10.1.3",
60
59
  "chai": "^4.5.0",
61
60
  "chokidar": "^4.0.3",
62
- "diff": "^7.0.0",
63
- "dprint": "^0.49.0",
64
- "esbuild": "^0.25.0",
65
- "eslint": "^9.20.1",
61
+ "diff": "^8.0.2",
62
+ "dprint": "^0.49.1",
63
+ "esbuild": "^0.27.0",
64
+ "eslint": "^9.39.1",
66
65
  "eslint-formatter-autolinkable-stylish": "^1.4.0",
67
- "eslint-plugin-regexp": "^2.7.0",
68
- "fast-xml-parser": "^4.5.2",
69
- "glob": "^10.4.5",
70
- "globals": "^15.15.0",
71
- "hereby": "^1.10.0",
66
+ "eslint-plugin-regexp": "^2.10.0",
67
+ "fast-xml-parser": "^5.3.2",
68
+ "glob": "^10.5.0",
69
+ "globals": "^16.5.0",
70
+ "hereby": "^1.11.1",
72
71
  "jsonc-parser": "^3.3.1",
73
- "knip": "^5.44.4",
72
+ "knip": "^5.70.0",
74
73
  "minimist": "^1.2.8",
75
74
  "mocha": "^10.8.2",
76
75
  "mocha-fivemat-progress-reporter": "^0.1.0",
77
- "monocart-coverage-reports": "^2.12.1",
76
+ "monocart-coverage-reports": "^2.12.9",
78
77
  "ms": "^2.1.3",
79
78
  "picocolors": "^1.1.1",
80
- "playwright": "^1.50.1",
79
+ "playwright": "^1.56.1",
81
80
  "source-map-support": "^0.5.21",
82
81
  "tslib": "^2.8.1",
83
- "typescript": "^5.7.3",
84
- "typescript-eslint": "^8.24.1",
82
+ "typescript": "^5.9.3",
83
+ "typescript-eslint": "^8.47.0",
85
84
  "which": "^3.0.1"
86
85
  },
87
86
  "overrides": {
@@ -116,5 +115,5 @@
116
115
  "node": "20.1.0",
117
116
  "npm": "8.19.4"
118
117
  },
119
- "gitHead": "5be33469d551655d878876faa9e30aa3b49f8ee9"
118
+ "gitHead": "5ccf24e9c4f7a66cbce23bdd0476fabb39945b9b"
120
119
  }