typescript 4.7.2 → 4.8.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 (35) hide show
  1. package/lib/cs/diagnosticMessages.generated.json +19 -3
  2. package/lib/de/diagnosticMessages.generated.json +17 -3
  3. package/lib/dynamicImportCompat.js +25 -0
  4. package/lib/es/diagnosticMessages.generated.json +19 -3
  5. package/lib/fr/diagnosticMessages.generated.json +19 -3
  6. package/lib/it/diagnosticMessages.generated.json +17 -3
  7. package/lib/ja/diagnosticMessages.generated.json +17 -3
  8. package/lib/ko/diagnosticMessages.generated.json +19 -3
  9. package/lib/lib.dom.d.ts +128 -183
  10. package/lib/lib.dom.iterable.d.ts +1 -11
  11. package/lib/lib.es2020.intl.d.ts +30 -5
  12. package/lib/lib.es2021.intl.d.ts +7 -3
  13. package/lib/lib.es2022.d.ts +1 -0
  14. package/lib/lib.es2022.sharedmemory.d.ts +27 -0
  15. package/lib/lib.es5.d.ts +1 -1
  16. package/lib/lib.esnext.intl.d.ts +5 -1
  17. package/lib/lib.webworker.d.ts +54 -27
  18. package/lib/lib.webworker.iterable.d.ts +1 -1
  19. package/lib/pl/diagnosticMessages.generated.json +19 -3
  20. package/lib/protocol.d.ts +2 -0
  21. package/lib/pt-br/diagnosticMessages.generated.json +19 -3
  22. package/lib/ru/diagnosticMessages.generated.json +19 -3
  23. package/lib/tr/diagnosticMessages.generated.json +17 -3
  24. package/lib/tsc.js +4088 -2539
  25. package/lib/tsserver.js +7568 -3883
  26. package/lib/tsserverlibrary.d.ts +560 -110
  27. package/lib/tsserverlibrary.js +7479 -3881
  28. package/lib/typescript.d.ts +548 -108
  29. package/lib/typescript.js +6993 -3712
  30. package/lib/typescriptServices.d.ts +548 -108
  31. package/lib/typescriptServices.js +6993 -3712
  32. package/lib/typingsInstaller.js +5037 -3481
  33. package/lib/zh-cn/diagnosticMessages.generated.json +19 -3
  34. package/lib/zh-tw/diagnosticMessages.generated.json +19 -3
  35. package/package.json +21 -20
@@ -132,6 +132,8 @@
132
132
  "Add_definite_assignment_assertion_to_property_0_95020": "向属性“{0}”添加明确的赋值断言",
133
133
  "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "将明确赋值断言添加到未初始化的所有属性",
134
134
  "Add_export_to_make_this_file_into_a_module_95097": "添加 \"export {}\",将此文件变为模块",
135
+ "Add_extends_constraint_2211": "添加 `extends` 约束。",
136
+ "Add_extends_constraint_to_all_type_parameters_2212": "将 `extends` 约束添加到所有类型参数",
135
137
  "Add_import_from_0_90057": "从“{0}”添加导入",
136
138
  "Add_index_signature_for_property_0_90017": "为属性“{0}”添加索引签名",
137
139
  "Add_initializer_to_property_0_95019": "向属性“{0}”添加初始值设定项",
@@ -226,6 +228,7 @@
226
228
  "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268": "索引签名参数类型必须是 “string”、“number”、“symbol”或模板文本类型。",
227
229
  "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "接口只能扩展具有可选类型参数的标识符/限定名称。",
228
230
  "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "接口只能扩展使用静态已知成员的对象类型或对象类型的交集。",
231
+ "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840": "接口无法扩展基元类型,如“{0}”;接口只能扩展命名类型和类",
229
232
  "An_interface_property_cannot_have_an_initializer_1246": "接口函数不能具有初始化表达式。",
230
233
  "An_iterator_must_have_a_next_method_2489": "迭代器必须具有 \"next()\" 方法。",
231
234
  "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017": "将 @jsx 杂注与 JSX 片段一起使用时,需要使用 @jsxFrag 杂注。",
@@ -377,6 +380,8 @@
377
380
  "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "类“{0}”错误实现类“{1}”。你是想扩展“{1}”并将其成员作为子类继承吗?",
378
381
  "Class_0_incorrectly_implements_interface_1_2420": "类“{0}”错误实现接口“{1}”。",
379
382
  "Class_0_used_before_its_declaration_2449": "类“{0}”用于其声明前。",
383
+ "Class_constructor_may_not_be_a_generator_1360": "类构造函数可能不是生成器。",
384
+ "Class_constructor_may_not_be_an_accessor_1341": "类构造函数可能不是访问器。",
380
385
  "Class_declaration_cannot_implement_overload_list_for_0_2813": "类声明无法实现“{0}”的重载列表。",
381
386
  "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025": "类声明不能有多个 “@augments” 或 “@extends” 标记。",
382
387
  "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036": "类修饰器不能与静态专用标识符一起使用。请考虑删除实验性修饰器。",
@@ -837,6 +842,7 @@
837
842
  "Invalid_import_specifier_0_has_no_possible_resolutions_6272": "无效的导入说明符 '{0}' 没有可行的解决方法。",
838
843
  "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665": "扩大中的模块名称无效。模块“{0}”解析到位于“{1}”处的非类型化模块,其无法扩大。",
839
844
  "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664": "扩大中的模块名无效,找不到模块“{0}”。",
845
+ "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209": "新表达式中的可选链无效。是否要调用“{0}()”?",
840
846
  "Invalid_reference_directive_syntax_1084": "\"reference\" 指令语法无效。",
841
847
  "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039": "“{0}”的使用无效。它不能在类静态块内使用。",
842
848
  "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215": "“{0}”的使用无效。模块自动处于严格模式。",
@@ -893,6 +899,7 @@
893
899
  "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650": "使 keyof 仅返回字符串,而不是字符串、数字或符号。旧版选项。",
894
900
  "Make_super_call_the_first_statement_in_the_constructor_90002": "在构造函数中,使 \"super()\" 调用第一个语句",
895
901
  "Mapped_object_type_implicitly_has_an_any_template_type_7039": "映射的对象类型隐式地含有 \"any\" 模板类型。",
902
+ "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457": "默认情况下匹配包括模式 “**/*”",
896
903
  "Matched_by_include_pattern_0_in_1_1407": "通过在 \"{1}\" 中的包含模式 \"{0}\" 匹配",
897
904
  "Member_0_implicitly_has_an_1_type_7008": "成员“{0}”隐式包含类型“{1}”。",
898
905
  "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "成员 \"{0}\" 隐式具有 \"{1}\" 类型,但可以从用法中推断出更好的类型。",
@@ -1083,13 +1090,15 @@
1083
1090
  "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "无法生成项目“{0}”,因为其依赖项“{1}”有错误",
1084
1091
  "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "无法生成项目 \"{0}\" ,因为未生成其依赖项 \"{1}\"",
1085
1092
  "Project_0_is_being_forcibly_rebuilt_6388": "正在强制重新生成项目“{0}”",
1093
+ "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399": "项目“{0}”已过期,因为 buildinfo 文件“{1}”指示某些更改未发出",
1086
1094
  "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "项目“{0}”已过期,因为其依赖项“{1}”已过期",
1087
- "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "项目“{0}”已过期,因为最早的输出“{1}”早于最新的输入“{2}”",
1095
+ "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350": "项目“{0}”已过期,因为输出“{1}”早于输入“{2}”",
1088
1096
  "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "项目“{0}”已过期,因为输出文件“{1}”不存在",
1089
1097
  "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "项目 \"{0}\" 已过期,因为其输出是使用与当前版本 \"{2}\" 不同的版本 \"{1}\" 生成的",
1090
1098
  "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "项目 \"{0}\" 已过期,因为其依赖项 \"{1}\" 的输出已更改",
1091
1099
  "Project_0_is_up_to_date_6361": "“{0}”项目已是最新",
1092
- "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "项目“{0}”已是最新,因为最新的输入“{1}”早于最早的输出“{2}”",
1100
+ "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351": "项目“{0}”是最新的,因为最新的输入“{1}”早于输出“{2}”",
1101
+ "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400": "项目“{0}”是最新的,但需要更新早于输入文件的输出文件的时间戳",
1093
1102
  "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "项目“{0}”已是最新,拥有来自其依赖项的 .d.ts 文件",
1094
1103
  "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202": "项目引用不能形成环形图。检测到循环: {0}",
1095
1104
  "Projects_6255": "项目",
@@ -1199,7 +1208,6 @@
1199
1208
  "Required_type_parameters_may_not_follow_optional_type_parameters_2706": "所需的类型参数可能不遵循可选类型参数。",
1200
1209
  "Resolution_for_module_0_was_found_in_cache_from_location_1_6147": "在位置“{1}”的缓存中找到模块“{0}”的解析。",
1201
1210
  "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241": "在位置“{1}”的缓存中找到类型引用指令“{0}”的解析。",
1202
- "Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452": "仅当 `moduleResolution` 为 `node16` 或 `nodenext` 时才支持解析模式。",
1203
1211
  "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195": "只将 \"keyof\" 解析为字符串值的属性名称(不含数字或符号)。",
1204
1212
  "Resolving_module_0_from_1_6086": "======== 正在从“{1}”解析模块“{0}”。========",
1205
1213
  "Resolving_module_name_0_relative_to_base_url_1_2_6094": "正在相对于基 URL“{1}”-“{2}”解析模块名“{0}”。",
@@ -1443,6 +1451,7 @@
1443
1451
  "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207": "在将 “export type” 用在其导出语句上时,不能在已命名导出上使用 “type” 修饰符。",
1444
1452
  "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206": "在将 “import type” 用在其导入语句上时,不能在已命名导入上使用 “type” 修饰符。。",
1445
1453
  "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "函数声明的类型必须与函数的签名匹配。",
1454
+ "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841": "如果没有“resolution-mode”断言(这是不稳定的功能),则无法命名此表达式的类型。请使用夜间 TypeScript 来消除此错误。请尝试使用“npm install -D typescript@next”进行更新。",
1446
1455
  "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118": "无法序列化此节点的类型,因为无法序列化其属性“{0}”。",
1447
1456
  "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "异步迭代器的 \"{0}()\" 方法返回的类型必须是具有 \"value\" 属性的类型的承诺。",
1448
1457
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "迭代器的 \"{0}()\" 方法返回的类型必须具有 \"value\" 属性。",
@@ -1453,6 +1462,7 @@
1453
1462
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "不支持 \"with\" 语句。\"with\" 程序块中的所有符号都将具有类型 \"any\"。",
1454
1463
  "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "此 JSX 标记的 \"{0}\" 属性需要 \"{1}\" 类型的子级,但提供了多个子级。",
1455
1464
  "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "此 JSX 标记的 \"{0}\" 属性需要类型 \"{1}\",该类型需要多个子级,但仅提供了一个子级。",
1465
+ "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839": "此条件将始终返回“{0}”,因为 JavaScript 按引用而不是值比较对象。",
1456
1466
  "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "此条件将始终返回 \"{0}\",因为类型 \"{1}\" 和 \"{2}\" 没有重叠。",
1457
1467
  "This_condition_will_always_return_true_since_this_0_is_always_defined_2801": "此条件将始终返回 true,因为此“{0}”已始终定义。",
1458
1468
  "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774": "此条件将始终返回 true,因为始终定义了函数。你是想改为调用它吗?",
@@ -1485,6 +1495,7 @@
1485
1495
  "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "此语法需要一个导入的帮助程序,但找不到模块“{0}”。",
1486
1496
  "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "此语法需要名为 \"{1}\" 的导入帮助器,\"{0}\" 中不存在该帮助器。请考虑升级 \"{0}\" 的版本。",
1487
1497
  "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "此语法需要一个名为 \"{1}\" 且包含 {2} 参数的导入帮助程序,该帮助程序与 \"{0}\" 中的相应帮助程序不兼容。请考虑升级 \"{0}\" 的版本。",
1498
+ "This_type_parameter_might_need_an_extends_0_constraint_2208": "此类型参数可能需要 `extends {0}` 约束。",
1488
1499
  "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326": "“import” 的这种用法无效。可以写入 “import()” 调用,但它们必须具有括号,并且不能带有类型参数。",
1489
1500
  "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378": "仅当 “module” 选项设置为 “es2022”、“esnext”、“system”、“node16” 或 “nodenext”,且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “await” 表达式。",
1490
1501
  "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts 文件中的顶级声明必须以 \"declare\" 或 \"export\" 修饰符开头。",
@@ -1642,6 +1653,7 @@
1642
1653
  "Watch_and_Build_Modes_6250": "观看和生成模式",
1643
1654
  "Watch_input_files_6005": "监视输入文件。",
1644
1655
  "Watch_option_0_requires_a_value_of_type_1_5080": "观察选项 \"{0}\" 需要 {1} 类型的值。",
1656
+ "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843": "我们只能通过在此处为整个参数添加类型来写入“{0}”的类型。",
1645
1657
  "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698": "分配函数时,请检查以确保参数和返回值与子类型兼容。",
1646
1658
  "When_type_checking_take_into_account_null_and_undefined_6699": "进行类型检查时,请考虑 “null” 和 “undefined”。",
1647
1659
  "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "是否在监视模式下保留过时的控制台输出,而不是清除屏幕。",
@@ -1681,6 +1693,7 @@
1681
1693
  "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413": "“{0}”索引类型“{1}”不能分配给“{2}”索引类型“{3}”。",
1682
1694
  "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "“{0}”是基元,但“{1}”是包装器对象。如可能首选使用“{0}”。",
1683
1695
  "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444": "\"{0}\" 是一种类型,在同时启用了 \"preserveValueImports\" 和 \"isolatedModules\" 时,必须使用仅类型导入进行导入。",
1696
+ "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842": "“{0}”是“{1}”的未使用重命名。是否打算将其用作类型批注?",
1684
1697
  "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "\"{0}\" 可赋给 \"{1}\" 类型的约束,但可以使用约束 \"{2}\" 的其他子类型实例化 \"{1}\"。",
1685
1698
  "_0_is_declared_but_its_value_is_never_read_6133": "已声明“{0}”,但从未读取其值。",
1686
1699
  "_0_is_declared_but_never_used_6196": "“{0}”已声明,但从未使用过。",
@@ -1775,6 +1788,7 @@
1775
1788
  "one_of_Colon_6900": "以下其中一个:",
1776
1789
  "one_or_more_Colon_6901": "一个或更多:",
1777
1790
  "options_6024": "选项",
1791
+ "or_JSX_element_expected_1145": "应为 “{” 或 JSX 元素。",
1778
1792
  "or_expected_1144": "应为 \"{\" 或 \";\"。",
1779
1793
  "package_json_does_not_have_a_0_field_6100": "\"package.json\" 没有“{0}”字段。",
1780
1794
  "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "\"package. json\" 没有与版本 \"{0}\" 匹配的 \"typesVersions\" 项。",
@@ -1790,6 +1804,8 @@
1790
1804
  "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "\"readonly\" 修饰符仅可出现在属性声明或索引签名中。",
1791
1805
  "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "仅允许对数组和元组文本类型使用 \"readonly\" 类型修饰符。",
1792
1806
  "require_call_may_be_converted_to_an_import_80005": "可将“要求”调用转换为导入。",
1807
+ "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452": "仅当“moduleResolution”为“node16”或“nodenext”时才支持“resolution-mode”断言。",
1808
+ "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125": "“resolution-mode”断言不稳定。请使用夜间 TypeScript 消除此错误。请尝试使用“npm install -D typescript@next”进行更新。",
1793
1809
  "resolution_mode_can_only_be_set_for_type_only_imports_1454": "只能为仅类型导入设置 \"resolution-mode\"。",
1794
1810
  "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455": "\"resolution-mode\" 是类型导入断言的唯一有效密钥。",
1795
1811
  "resolution_mode_should_be_either_require_or_import_1453": "“resolution-mode”应为“require”或“import”。",
@@ -132,6 +132,8 @@
132
132
  "Add_definite_assignment_assertion_to_property_0_95020": "將明確指派判斷提示新增至屬性 '{0}'",
133
133
  "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028": "為所有未初始化的屬性新增明確的指派判斷提示",
134
134
  "Add_export_to_make_this_file_into_a_module_95097": "新增 'export {}' 以將此檔案轉為模組",
135
+ "Add_extends_constraint_2211": "新增 'extends' 限制式。",
136
+ "Add_extends_constraint_to_all_type_parameters_2212": "將 'extends' 限制式新增至所有類型參數",
135
137
  "Add_import_from_0_90057": "從 \"{0}\" 新增匯入",
136
138
  "Add_index_signature_for_property_0_90017": "為屬性 '{0}' 新增索引簽章",
137
139
  "Add_initializer_to_property_0_95019": "將初始設定式新增至屬性 '{0}'",
@@ -226,6 +228,7 @@
226
228
  "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268": "索引簽章參數類型必須是 'string'、'number'、'symbol' 或範本文字類型。",
227
229
  "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499": "介面只能擴充具有選擇性型別引數的識別碼/限定名稱。",
228
230
  "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312": "介面只能延伸物件類型或具有靜態已知成員的物件類型交集。",
231
+ "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840": "介面無法延伸基本類型,例如 '{0}';介面只能延伸命名類型和類別",
229
232
  "An_interface_property_cannot_have_an_initializer_1246": "介面屬性不得有初始設定式。",
230
233
  "An_iterator_must_have_a_next_method_2489": "迭代器必須要有 'next()' 方法。",
231
234
  "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017": "在 JSX 片段使用 @jsx pragma 時,必須有 @jsxFrag pragma。",
@@ -377,6 +380,8 @@
377
380
  "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720": "類別 '{0}' 不當實作類別 '{1}'。您是否要擴充 '{1}',並繼承其成員以成為子類別?",
378
381
  "Class_0_incorrectly_implements_interface_1_2420": "類別 '{0}' 不正確地實作介面 '{1}'。",
379
382
  "Class_0_used_before_its_declaration_2449": "類別 '{0}' 的位置在其宣告之前。",
383
+ "Class_constructor_may_not_be_a_generator_1360": "類別建構函式可能不是產生器。",
384
+ "Class_constructor_may_not_be_an_accessor_1341": "類別建構函式可能不是存取子。",
380
385
  "Class_declaration_cannot_implement_overload_list_for_0_2813": "類別宣告無法為 '{0}' 實作多載清單。",
381
386
  "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025": "類別宣告不能有一個以上的 `@augments` 或 `@extends` 標籤。",
382
387
  "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036": "類別裝飾項目無法與靜態私人識別碼一起使用。請考慮移除實驗性裝飾項目。",
@@ -837,6 +842,7 @@
837
842
  "Invalid_import_specifier_0_has_no_possible_resolutions_6272": "無效的匯入指定名稱 '{0}' 沒有可能的解決方法。",
838
843
  "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665": "增強中的模組名稱無效。模組 '{0}' 於 '{1}' 解析至不具類型的模組,其無法擴增。",
839
844
  "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664": "增強指定中的模組名稱無效,找不到模組 '{0}'。",
845
+ "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209": "新運算式的選擇性鏈結無效。您想要呼叫 '{0}()' 嗎?",
840
846
  "Invalid_reference_directive_syntax_1084": "無效的 'reference' 指示詞語法。",
841
847
  "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039": "'{0}' 的使用無效。不能在類別靜態區塊內使用。",
842
848
  "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215": "'{0}' 的用法無效。模組會自動採用 strict 模式。",
@@ -893,6 +899,7 @@
893
899
  "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650": "僅讓 keyof 傳回字串,而不是單一字串、數字或符號。舊版選項。",
894
900
  "Make_super_call_the_first_statement_in_the_constructor_90002": "使 'super()' 呼叫成為建構函式中的第一個陳述式",
895
901
  "Mapped_object_type_implicitly_has_an_any_template_type_7039": "對應的物件類型隱含具有 'any' 範本類型。",
902
+ "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457": "依預設比對包含模式 '**/*'",
896
903
  "Matched_by_include_pattern_0_in_1_1407": "依 '{1}' 中的包含模式 '{0}' 比對",
897
904
  "Member_0_implicitly_has_an_1_type_7008": "成員 '{0}' 隱含了 '{1}' 類型。",
898
905
  "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "成員 '{0}' 隱含 '{1}' 類型,但可從使用方式推斷更適合的類型。",
@@ -1083,13 +1090,15 @@
1083
1090
  "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "因為專案 '{0}' 的相依性 '{1}' 發生錯誤,所以無法建置該專案",
1084
1091
  "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383": "因為未建置專案 '{0}' 的相依性 '{1}',所以無法建置該專案",
1085
1092
  "Project_0_is_being_forcibly_rebuilt_6388": "正在強制重建專案 '{0}'",
1093
+ "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399": "因為 buildinfo 檔案 '{1}' 指出某些變更並未發出,所以專案 '{0}' 已過期",
1086
1094
  "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "因為專案 '{0}' 的相依性 '{1}' 已過期,所以該專案已過期",
1087
- "Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "因為最舊的輸出 '{1}' 早於最新的輸入 '{2}',所以專案 '{0}' 已過期",
1095
+ "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350": "因為輸出 '{1}' 早於輸入 '{2}',所以專案 '{0}' 已過期",
1088
1096
  "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "因為輸出檔案 '{1}' 不存在,所以專案 '{0}' 已過期",
1089
1097
  "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381": "因為專案 '{0}' 的輸出使用版本 '{1}' 產生而成,與目前的版本 '{2}' 不同,所以該專案已過期",
1090
1098
  "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372": "因為專案 '{0}' 的相依性 '{1}' 輸出已變更,所以該專案已過期",
1091
1099
  "Project_0_is_up_to_date_6361": "專案 '{0}' 為最新狀態",
1092
- "Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "因為最新的輸入 '{1}' 早於最舊的輸出 '{2}',所以專案 '{0}' 為最新狀態",
1100
+ "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351": "因為最新的輸入 '{1}' 早於最舊的輸出 '{2}',所以專案 '{0}' 為最新狀態",
1101
+ "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400": "專案 '{0}' 為最新狀態,但需要更新比輸入檔案還舊的輸出檔案時間戳記",
1093
1102
  "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "專案 '{0}' 為最新狀態,且有來自其相依性的 .d.ts 檔案",
1094
1103
  "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202": "專案參考不會形成循環圖。但偵測到循環: {0}",
1095
1104
  "Projects_6255": "專案",
@@ -1199,7 +1208,6 @@
1199
1208
  "Required_type_parameters_may_not_follow_optional_type_parameters_2706": "必要型別參數可能未遵循選擇性型別參數。",
1200
1209
  "Resolution_for_module_0_was_found_in_cache_from_location_1_6147": "從位置 '{1}' 的快取中找到模組 '{0}' 的解析。",
1201
1210
  "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241": "從位置 '{0}' 的快取記憶體找到類型參照指示詞 '{1}'。",
1202
- "Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452": "只有當 'moduleResolution' 為 'node16' 或 'nodenext' 時,才支援解析模式。",
1203
1211
  "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195": "只將 'keyof' 解析為字串值的屬性名稱 (無任何數字或符號)。",
1204
1212
  "Resolving_module_0_from_1_6086": "======== 正在從 '{1}' 解析模組 '{0}'。========",
1205
1213
  "Resolving_module_name_0_relative_to_base_url_1_2_6094": "正在解析與基底 URL '{1}' 相對的模組名稱 '{0}' - '{2}'。",
@@ -1443,6 +1451,7 @@
1443
1451
  "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207": "[類型修飾元] 無法在 [匯出類型]5D; 於其匯出陳述式上使用時,在命名的匯出上使用。",
1444
1452
  "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206": "[類型修飾元] 無法在 [匯入類型]5D; 於其匯入陳述式上使用時,在命名的匯入上使用。",
1445
1453
  "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030": "函式宣告的類型必須與函式的簽章相符。",
1454
+ "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841": "沒有 'resolution-mode' 判斷提示,就無法命名此運算式的類型,這是不穩定的功能。請使用夜間 TypeScript 將此錯誤設為靜音。請嘗試使用 'npm install -D typescript@next' 更新。",
1446
1455
  "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118": "無法將此節點的類型序列化,因為無法將其屬性 '{0}' 序列化。",
1447
1456
  "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547": "非同步迭代器 '{0}()' 方法所傳回的類型,對具有 'value' 屬性的類型必須為 Promise。",
1448
1457
  "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490": "迭代器 '{0}()' 方法所傳回的類型必須具有 'value' 屬性。",
@@ -1453,6 +1462,7 @@
1453
1462
  "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410": "不支援 'with' 陳述式。'with' 區塊中的所有符號都會有類型 'any'。",
1454
1463
  "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746": "此 JSX 標籤的 '{0}' 屬性只能有一個 '{1}' 類型的子系,但提供的子系卻有多個。",
1455
1464
  "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745": "此 JSX 標籤的 '{0}' 屬性需要必須有多個子系的類型 '{1}',但僅提供的子系只有一個。",
1465
+ "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839": "此條件一律會傳回 '{0}',因為 JavaScript 會依參照而非值比較物件。",
1456
1466
  "This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367": "因為類型 '{1}' 與 '{2}' 未重疊,所以此條件永遠會傳回 '{0}'。",
1457
1467
  "This_condition_will_always_return_true_since_this_0_is_always_defined_2801": "因為此 '{0}' 一律會被定義,所以此條件一律傳回 True。",
1458
1468
  "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774": "因為永遠會定義此函式,所以此條件永遠會傳回 true。您是要改為呼叫該條件嗎?",
@@ -1485,6 +1495,7 @@
1485
1495
  "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "此語法需要已匯入的協助程式,但找不到模組 '{0}'。",
1486
1496
  "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343": "此語法需要名為 '{1}' 的已匯入協助程式,但其不存在於 '{0}' 中。請考慮升級您的 '{0}' 版本。",
1487
1497
  "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807": "此語法需要名為 '{1}' 且具有 {2} 參數的匯入協助程式,其與 '{0}' 中的參數不相容。請考慮升級 '{0}' 的版本。",
1498
+ "This_type_parameter_might_need_an_extends_0_constraint_2208": "此類型參數可能需要 'extends {0}' 限制式。",
1488
1499
  "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326": "此 'import' 的使用方式無效。'import()' 呼叫可以寫入,但必須有括弧,而且不能有類型引數。",
1489
1500
  "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378": "只有在 'module' 選項設定為 'es2022'、'esnext'、'system'、'node16' 或 'nodenext',而且 'target' 選項設定為 'es2017' 或更高版本時,才允許最上層的 'await' 運算式。",
1490
1501
  "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046": ".d.ts 檔案中的最上層宣告必須以 'declare' 或 'export' 修飾元開頭。",
@@ -1642,6 +1653,7 @@
1642
1653
  "Watch_and_Build_Modes_6250": "觀看及建置模式",
1643
1654
  "Watch_input_files_6005": "監看輸入檔。",
1644
1655
  "Watch_option_0_requires_a_value_of_type_1_5080": "監看選項 '{0}' 需要 {1} 類型的值。",
1656
+ "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843": "我們只能在此新增整個參數的類型,來寫入 '{0}' 的類型。",
1645
1657
  "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698": "指派函式時,請檢查以確認參數,而且傳回值是子類型相容的。",
1646
1658
  "When_type_checking_take_into_account_null_and_undefined_6699": "當型別檢查時,請將 'null' 和 'undefined' 納入考慮。",
1647
1659
  "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191": "是否要將已過期的主控台輸出,維持在監看模式下,而非清除螢幕。",
@@ -1681,6 +1693,7 @@
1681
1693
  "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413": "'{0}' 索引類型 '{1}' 無法指派給 '{2}' 索引類型 '{3}'。",
1682
1694
  "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692": "'{0}' 為基元,但 '{1}' 為包裝函式物件。建議盡可能使用 '{0}'。",
1683
1695
  "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444": "'{0}' 是類型,而且當 'preserveValueImports' 和 'isolatedModules' 都啟用時,必須使用僅類型匯入來匯入。",
1696
+ "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842": "'{0}' 是未使用的 '{1}' 重新命名。您是否想要使用它作為類型註釋?",
1684
1697
  "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075": "'{0}' 可指派給 '{1}' 類型的條件約束,但可能會將 '{1}' 以不同的條件約束 '{2}' 子類型來具現化。",
1685
1698
  "_0_is_declared_but_its_value_is_never_read_6133": "'{0}' 已宣告但從未讀取其值。",
1686
1699
  "_0_is_declared_but_never_used_6196": "宣告了 '{0}',但從未使用過。",
@@ -1775,6 +1788,7 @@
1775
1788
  "one_of_Colon_6900": "以下其中一個:",
1776
1789
  "one_or_more_Colon_6901": "以下一或多個:",
1777
1790
  "options_6024": "選項",
1791
+ "or_JSX_element_expected_1145": "必須是 '{' 或 JSX 元素。",
1778
1792
  "or_expected_1144": "必須是 '{' 或 ';'。",
1779
1793
  "package_json_does_not_have_a_0_field_6100": "'package.json' 沒有 '{0}' 欄位。",
1780
1794
  "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207": "'package.json' 沒有任何符合 '{0}' 版本的 'typesVersions' 項目。",
@@ -1790,6 +1804,8 @@
1790
1804
  "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024": "'readonly' 修飾元只能出現在屬性宣告或索引簽章。",
1791
1805
  "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354": "'readonly' 類型修飾元只可用於陣列與元組常值類型。",
1792
1806
  "require_call_may_be_converted_to_an_import_80005": "'require' 呼叫可能會轉換為匯入。",
1807
+ "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452": "只有當 'moduleResolution' 為 'node16' 或 'nodenext' 時,才支援 'resolution-mode' 判斷提示。",
1808
+ "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125": "'resolution-mode' 判斷提示不穩定。使用夜間 TypeScript 將此錯誤設為靜音。請嘗試使用 'npm install -D typescript@next' 更新。",
1793
1809
  "resolution_mode_can_only_be_set_for_type_only_imports_1454": "只能針對僅限輸入的匯入設定 'resolution-mode'。",
1794
1810
  "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455": "'resolution-mode' 是輸入匯入判斷提示唯一有效的索引鍵。",
1795
1811
  "resolution_mode_should_be_either_require_or_import_1453": "`resolution-mode` 應該是 `require` 或 `import`。",
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": "4.7.2",
5
+ "version": "4.8.0-beta",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -33,12 +33,13 @@
33
33
  "@octokit/rest": "latest",
34
34
  "@types/chai": "latest",
35
35
  "@types/convert-source-map": "latest",
36
+ "@types/fs-extra": "^9.0.13",
36
37
  "@types/glob": "latest",
37
38
  "@types/gulp": "^4.0.9",
38
39
  "@types/gulp-concat": "latest",
39
40
  "@types/gulp-newer": "latest",
40
- "@types/gulp-rename": "0.0.33",
41
- "@types/gulp-sourcemaps": "0.0.32",
41
+ "@types/gulp-rename": "latest",
42
+ "@types/gulp-sourcemaps": "latest",
42
43
  "@types/merge2": "latest",
43
44
  "@types/microsoft__typescript-etw": "latest",
44
45
  "@types/minimatch": "latest",
@@ -47,29 +48,29 @@
47
48
  "@types/mocha": "latest",
48
49
  "@types/ms": "latest",
49
50
  "@types/node": "latest",
50
- "@types/node-fetch": "^2.3.4",
51
+ "@types/node-fetch": "^2.6.2",
51
52
  "@types/q": "latest",
52
53
  "@types/source-map-support": "latest",
53
- "@types/xml2js": "^0.4.0",
54
- "@typescript-eslint/eslint-plugin": "^4.28.0",
55
- "@typescript-eslint/experimental-utils": "^4.28.0",
56
- "@typescript-eslint/parser": "^4.28.0",
54
+ "@types/xml2js": "^0.4.11",
55
+ "@typescript-eslint/eslint-plugin": "^5.28.0",
56
+ "@typescript-eslint/parser": "^5.28.0",
57
+ "@typescript-eslint/utils": "^5.28.0",
57
58
  "async": "latest",
58
- "azure-devops-node-api": "^11.0.1",
59
+ "azure-devops-node-api": "^11.1.1",
59
60
  "chai": "latest",
60
61
  "chalk": "^4.1.2",
61
62
  "convert-source-map": "latest",
62
- "del": "5.1.0",
63
- "diff": "^4.0.2",
64
- "eslint": "7.12.1",
65
- "eslint-formatter-autolinkable-stylish": "1.1.4",
66
- "eslint-plugin-import": "2.22.1",
67
- "eslint-plugin-jsdoc": "30.7.6",
63
+ "del": "6.1.1",
64
+ "diff": "^5.1.0",
65
+ "eslint": "8.17.0",
66
+ "eslint-formatter-autolinkable-stylish": "1.2.0",
67
+ "eslint-plugin-import": "2.26.0",
68
+ "eslint-plugin-jsdoc": "39.3.2",
68
69
  "eslint-plugin-no-null": "1.0.2",
69
70
  "fancy-log": "latest",
70
- "fs-extra": "^9.0.0",
71
+ "fs-extra": "^9.1.0",
71
72
  "glob": "latest",
72
- "gulp": "^4.0.0",
73
+ "gulp": "^4.0.2",
73
74
  "gulp-concat": "latest",
74
75
  "gulp-insert": "latest",
75
76
  "gulp-newer": "latest",
@@ -81,14 +82,14 @@
81
82
  "mocha": "latest",
82
83
  "mocha-fivemat-progress-reporter": "latest",
83
84
  "ms": "^2.1.3",
84
- "node-fetch": "^2.6.1",
85
- "prex": "^0.4.3",
85
+ "node-fetch": "^2.6.7",
86
+ "prex": "^0.4.7",
86
87
  "q": "latest",
87
88
  "source-map-support": "latest",
88
89
  "typescript": "^4.5.5",
89
90
  "vinyl": "latest",
90
91
  "vinyl-sourcemaps-apply": "latest",
91
- "xml2js": "^0.4.19"
92
+ "xml2js": "^0.4.23"
92
93
  },
93
94
  "scripts": {
94
95
  "prepare": "gulp build-eslint-rules",