typescript 5.7.0-dev.20240829 → 5.7.0-dev.20240830

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.
@@ -179,6 +179,8 @@
179
179
  "Add_override_modifier_95160": "Přidat modifikátor override",
180
180
  "Add_parameter_name_90034": "Přidat název parametru",
181
181
  "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Přidat kvalifikátor do všech nerozpoznaných proměnných odpovídajících názvu členu",
182
+ "Add_resolution_mode_import_attribute_95196": "Přidat atribut importu resolution-mode",
183
+ "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197": "Přidat atribut importu resolution-mode do všech importů, při kterých se importuje pouze typ, které ho potřebují",
182
184
  "Add_return_type_0_90063": "Přidejte návratový typ „{0}“",
183
185
  "Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035": "Chcete-li typ nastavit jako explicitní, přidejte do tohoto výrazu operátor „satisfies“ a kontrolní výraz typu („satisfies T as T“).",
184
186
  "Add_satisfies_and_an_inline_type_assertion_with_0_90068": "Přidejte operátor „satisfies“ a kontrolní výraz vloženého typu s „{0}“.",
@@ -1748,6 +1750,7 @@
1748
1750
  "Type_expected_1110": "Očekával se typ.",
1749
1751
  "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456": "Kontrolní výrazy importu typů by měly mít přesně jeden klíč – resolution-mode – s hodnotou import nebo require.",
1750
1752
  "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464": "Atributy importu typů by měly mít přesně jeden klíč – „resolution-mode“ – s hodnotou „import“ nebo „require“.",
1753
+ "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542": "Import typu modulu ECMAScript z modulu CommonJS musí mít atribut resolution-mode.",
1751
1754
  "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "Vytvoření instance typu je příliš hluboké a může být nekonečné.",
1752
1755
  "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "Typ se přímo nebo nepřímo odkazuje ve zpětném volání jeho vlastní metody then při splnění.",
1753
1756
  "Type_library_referenced_via_0_from_file_1_1402": "Knihovna typů, na kterou se odkazuje přes {0} ze souboru {1}",
@@ -1758,6 +1761,7 @@
1758
1761
  "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "Typ iterovaných elementů yield* musí být buď platný příslib, nebo nesmí obsahovat člen then, který se dá volat.",
1759
1762
  "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615": "Typ vlastnosti {0} cyklicky odkazuje sám na sebe v mapovaném typu {1}.",
1760
1763
  "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "Typ operandu yield v asynchronním generátoru musí být buď platný příslib, nebo nesmí obsahovat člen then, který se dá volat.",
1764
+ "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541": "Import, při kterém se importuje pouze typ modulu ECMAScript z modulu CommonJS, musí mít atribut resolution-mode.",
1761
1765
  "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "Typ pochází z tohoto importu. Import stylu oboru názvů není možné zavolat ani vytvořit a při běhu způsobí chybu. Zvažte možnost použít tady místo toho výchozí import nebo importovat require.",
1762
1766
  "Type_parameter_0_has_a_circular_constraint_2313": "Parametr typu {0} má cyklické omezení.",
1763
1767
  "Type_parameter_0_has_a_circular_default_2716": "Parametr typu {0} má cyklickou výchozí hodnotu.",
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.7";
21
- var version = `${versionMajorMinor}.0-dev.20240829`;
21
+ var version = `${versionMajorMinor}.0-dev.20240830`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -1079,7 +1079,7 @@ function findBestPatternMatch(values, getPattern, candidate) {
1079
1079
  for (let i = 0; i < values.length; i++) {
1080
1080
  const v = values[i];
1081
1081
  const pattern = getPattern(v);
1082
- if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) {
1082
+ if (pattern.prefix.length > longestMatchPrefixLength && isPatternMatch(pattern, candidate)) {
1083
1083
  longestMatchPrefixLength = pattern.prefix.length;
1084
1084
  matchedValue = v;
1085
1085
  }
@@ -18398,8 +18398,33 @@ function tryParsePattern(pattern) {
18398
18398
  suffix: pattern.substr(indexOfStar + 1)
18399
18399
  };
18400
18400
  }
18401
+ var parsedPatternsCache = /* @__PURE__ */ new WeakMap();
18401
18402
  function tryParsePatterns(paths) {
18402
- return mapDefined(getOwnKeys(paths), (path) => tryParsePattern(path));
18403
+ let result = parsedPatternsCache.get(paths);
18404
+ if (result !== void 0) {
18405
+ return result;
18406
+ }
18407
+ let matchableStringSet;
18408
+ let patterns;
18409
+ const pathList = getOwnKeys(paths);
18410
+ for (const path of pathList) {
18411
+ const patternOrStr = tryParsePattern(path);
18412
+ if (patternOrStr === void 0) {
18413
+ continue;
18414
+ } else if (typeof patternOrStr === "string") {
18415
+ (matchableStringSet ?? (matchableStringSet = /* @__PURE__ */ new Set())).add(patternOrStr);
18416
+ } else {
18417
+ (patterns ?? (patterns = [])).push(patternOrStr);
18418
+ }
18419
+ }
18420
+ parsedPatternsCache.set(
18421
+ paths,
18422
+ result = {
18423
+ matchableStringSet,
18424
+ patterns
18425
+ }
18426
+ );
18427
+ return result;
18403
18428
  }
18404
18429
  function positionIsSynthesized(pos) {
18405
18430
  return !(pos >= 0);
@@ -18424,15 +18449,13 @@ var emptyFileSystemEntries = {
18424
18449
  files: emptyArray,
18425
18450
  directories: emptyArray
18426
18451
  };
18427
- function matchPatternOrExact(patternOrStrings, candidate) {
18428
- const patterns = [];
18429
- for (const patternOrString of patternOrStrings) {
18430
- if (patternOrString === candidate) {
18431
- return candidate;
18432
- }
18433
- if (!isString(patternOrString)) {
18434
- patterns.push(patternOrString);
18435
- }
18452
+ function matchPatternOrExact(parsedPatterns, candidate) {
18453
+ const { matchableStringSet, patterns } = parsedPatterns;
18454
+ if (matchableStringSet == null ? void 0 : matchableStringSet.has(candidate)) {
18455
+ return candidate;
18456
+ }
18457
+ if (patterns === void 0 || patterns.length === 0) {
18458
+ return void 0;
18436
18459
  }
18437
18460
  return findBestPatternMatch(patterns, (_) => _, candidate);
18438
18461
  }
@@ -38180,8 +38203,6 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis
38180
38203
  validatedFilesSpecBeforeSubstitution,
38181
38204
  validatedIncludeSpecsBeforeSubstitution,
38182
38205
  validatedExcludeSpecsBeforeSubstitution,
38183
- pathPatterns: void 0,
38184
- // Initialized on first use
38185
38206
  isDefaultIncludeSpec
38186
38207
  };
38187
38208
  }
@@ -39806,8 +39827,7 @@ function tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, co
39806
39827
  }
39807
39828
  }
39808
39829
  function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state) {
39809
- var _a;
39810
- const { baseUrl, paths, configFile } = state.compilerOptions;
39830
+ const { baseUrl, paths } = state.compilerOptions;
39811
39831
  if (paths && !pathIsRelative(moduleName)) {
39812
39832
  if (state.traceEnabled) {
39813
39833
  if (baseUrl) {
@@ -39816,7 +39836,7 @@ function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state
39816
39836
  trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName);
39817
39837
  }
39818
39838
  const baseDirectory = getPathsBasePath(state.compilerOptions, state.host);
39819
- const pathPatterns = (configFile == null ? void 0 : configFile.configFileSpecs) ? (_a = configFile.configFileSpecs).pathPatterns || (_a.pathPatterns = tryParsePatterns(paths)) : void 0;
39839
+ const pathPatterns = tryParsePatterns(paths);
39820
39840
  return tryLoadModuleUsingPaths(
39821
39841
  extensions,
39822
39842
  moduleName,
@@ -40488,17 +40508,8 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
40488
40508
  if (state.traceEnabled) {
40489
40509
  trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, moduleName);
40490
40510
  }
40491
- const result = tryLoadModuleUsingPaths(
40492
- extensions,
40493
- moduleName,
40494
- candidate,
40495
- versionPaths.paths,
40496
- /*pathPatterns*/
40497
- void 0,
40498
- loader,
40499
- onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex,
40500
- state
40501
- );
40511
+ const pathPatterns = tryParsePatterns(versionPaths.paths);
40512
+ const result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, pathPatterns, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);
40502
40513
  if (result) {
40503
40514
  return removeIgnoredPackageId(result.value);
40504
40515
  }
@@ -41090,17 +41101,8 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
41090
41101
  trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, rest);
41091
41102
  }
41092
41103
  const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host);
41093
- const fromPaths = tryLoadModuleUsingPaths(
41094
- extensions,
41095
- rest,
41096
- packageDirectory,
41097
- versionPaths.paths,
41098
- /*pathPatterns*/
41099
- void 0,
41100
- loader,
41101
- !packageDirectoryExists,
41102
- state
41103
- );
41104
+ const pathPatterns = tryParsePatterns(versionPaths.paths);
41105
+ const fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, versionPaths.paths, pathPatterns, loader, !packageDirectoryExists, state);
41104
41106
  if (fromPaths) {
41105
41107
  return fromPaths.value;
41106
41108
  }
@@ -41108,7 +41110,6 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
41108
41110
  return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
41109
41111
  }
41110
41112
  function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, onlyRecordFailures, state) {
41111
- pathPatterns || (pathPatterns = tryParsePatterns(paths));
41112
41113
  const matchedPattern = matchPatternOrExact(pathPatterns, moduleName);
41113
41114
  if (matchedPattern) {
41114
41115
  const matchedStar = isString(matchedPattern) ? void 0 : matchedText(matchedPattern, moduleName);
@@ -63534,7 +63535,7 @@ function createTypeChecker(host) {
63534
63535
  const [sourceType, targetType] = getTypeNamesForErrorDisplay(source2, target2);
63535
63536
  let generalizedSource = source2;
63536
63537
  let generalizedSourceType = sourceType;
63537
- if (isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) {
63538
+ if (!(target2.flags & 131072 /* Never */) && isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) {
63538
63539
  generalizedSource = getBaseTypeOfLiteralType(source2);
63539
63540
  Debug.assert(!isTypeAssignableTo(generalizedSource, target2), "generalized source shouldn't be assignable");
63540
63541
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
package/lib/typescript.js CHANGED
@@ -2265,7 +2265,7 @@ module.exports = __toCommonJS(typescript_exports);
2265
2265
 
2266
2266
  // src/compiler/corePublic.ts
2267
2267
  var versionMajorMinor = "5.7";
2268
- var version = `${versionMajorMinor}.0-dev.20240829`;
2268
+ var version = `${versionMajorMinor}.0-dev.20240830`;
2269
2269
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2270
2270
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2271
2271
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3618,7 +3618,7 @@ function findBestPatternMatch(values, getPattern, candidate) {
3618
3618
  for (let i = 0; i < values.length; i++) {
3619
3619
  const v = values[i];
3620
3620
  const pattern = getPattern(v);
3621
- if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) {
3621
+ if (pattern.prefix.length > longestMatchPrefixLength && isPatternMatch(pattern, candidate)) {
3622
3622
  longestMatchPrefixLength = pattern.prefix.length;
3623
3623
  matchedValue = v;
3624
3624
  }
@@ -22385,8 +22385,33 @@ function tryParsePattern(pattern) {
22385
22385
  suffix: pattern.substr(indexOfStar + 1)
22386
22386
  };
22387
22387
  }
22388
+ var parsedPatternsCache = /* @__PURE__ */ new WeakMap();
22388
22389
  function tryParsePatterns(paths) {
22389
- return mapDefined(getOwnKeys(paths), (path) => tryParsePattern(path));
22390
+ let result = parsedPatternsCache.get(paths);
22391
+ if (result !== void 0) {
22392
+ return result;
22393
+ }
22394
+ let matchableStringSet;
22395
+ let patterns;
22396
+ const pathList = getOwnKeys(paths);
22397
+ for (const path of pathList) {
22398
+ const patternOrStr = tryParsePattern(path);
22399
+ if (patternOrStr === void 0) {
22400
+ continue;
22401
+ } else if (typeof patternOrStr === "string") {
22402
+ (matchableStringSet ?? (matchableStringSet = /* @__PURE__ */ new Set())).add(patternOrStr);
22403
+ } else {
22404
+ (patterns ?? (patterns = [])).push(patternOrStr);
22405
+ }
22406
+ }
22407
+ parsedPatternsCache.set(
22408
+ paths,
22409
+ result = {
22410
+ matchableStringSet,
22411
+ patterns
22412
+ }
22413
+ );
22414
+ return result;
22390
22415
  }
22391
22416
  function positionIsSynthesized(pos) {
22392
22417
  return !(pos >= 0);
@@ -22414,15 +22439,13 @@ var emptyFileSystemEntries = {
22414
22439
  files: emptyArray,
22415
22440
  directories: emptyArray
22416
22441
  };
22417
- function matchPatternOrExact(patternOrStrings, candidate) {
22418
- const patterns = [];
22419
- for (const patternOrString of patternOrStrings) {
22420
- if (patternOrString === candidate) {
22421
- return candidate;
22422
- }
22423
- if (!isString(patternOrString)) {
22424
- patterns.push(patternOrString);
22425
- }
22442
+ function matchPatternOrExact(parsedPatterns, candidate) {
22443
+ const { matchableStringSet, patterns } = parsedPatterns;
22444
+ if (matchableStringSet == null ? void 0 : matchableStringSet.has(candidate)) {
22445
+ return candidate;
22446
+ }
22447
+ if (patterns === void 0 || patterns.length === 0) {
22448
+ return void 0;
22426
22449
  }
22427
22450
  return findBestPatternMatch(patterns, (_) => _, candidate);
22428
22451
  }
@@ -42478,8 +42501,6 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis
42478
42501
  validatedFilesSpecBeforeSubstitution,
42479
42502
  validatedIncludeSpecsBeforeSubstitution,
42480
42503
  validatedExcludeSpecsBeforeSubstitution,
42481
- pathPatterns: void 0,
42482
- // Initialized on first use
42483
42504
  isDefaultIncludeSpec
42484
42505
  };
42485
42506
  }
@@ -44183,8 +44204,7 @@ function tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, co
44183
44204
  }
44184
44205
  }
44185
44206
  function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state) {
44186
- var _a;
44187
- const { baseUrl, paths, configFile } = state.compilerOptions;
44207
+ const { baseUrl, paths } = state.compilerOptions;
44188
44208
  if (paths && !pathIsRelative(moduleName)) {
44189
44209
  if (state.traceEnabled) {
44190
44210
  if (baseUrl) {
@@ -44193,7 +44213,7 @@ function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state
44193
44213
  trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName);
44194
44214
  }
44195
44215
  const baseDirectory = getPathsBasePath(state.compilerOptions, state.host);
44196
- const pathPatterns = (configFile == null ? void 0 : configFile.configFileSpecs) ? (_a = configFile.configFileSpecs).pathPatterns || (_a.pathPatterns = tryParsePatterns(paths)) : void 0;
44216
+ const pathPatterns = tryParsePatterns(paths);
44197
44217
  return tryLoadModuleUsingPaths(
44198
44218
  extensions,
44199
44219
  moduleName,
@@ -44992,17 +45012,8 @@ function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFail
44992
45012
  if (state.traceEnabled) {
44993
45013
  trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, moduleName);
44994
45014
  }
44995
- const result = tryLoadModuleUsingPaths(
44996
- extensions,
44997
- moduleName,
44998
- candidate,
44999
- versionPaths.paths,
45000
- /*pathPatterns*/
45001
- void 0,
45002
- loader,
45003
- onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex,
45004
- state
45005
- );
45015
+ const pathPatterns = tryParsePatterns(versionPaths.paths);
45016
+ const result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, pathPatterns, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);
45006
45017
  if (result) {
45007
45018
  return removeIgnoredPackageId(result.value);
45008
45019
  }
@@ -45594,17 +45605,8 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
45594
45605
  trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, rest);
45595
45606
  }
45596
45607
  const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host);
45597
- const fromPaths = tryLoadModuleUsingPaths(
45598
- extensions,
45599
- rest,
45600
- packageDirectory,
45601
- versionPaths.paths,
45602
- /*pathPatterns*/
45603
- void 0,
45604
- loader,
45605
- !packageDirectoryExists,
45606
- state
45607
- );
45608
+ const pathPatterns = tryParsePatterns(versionPaths.paths);
45609
+ const fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, versionPaths.paths, pathPatterns, loader, !packageDirectoryExists, state);
45608
45610
  if (fromPaths) {
45609
45611
  return fromPaths.value;
45610
45612
  }
@@ -45612,7 +45614,6 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, node
45612
45614
  return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
45613
45615
  }
45614
45616
  function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, onlyRecordFailures, state) {
45615
- pathPatterns || (pathPatterns = tryParsePatterns(paths));
45616
45617
  const matchedPattern = matchPatternOrExact(pathPatterns, moduleName);
45617
45618
  if (matchedPattern) {
45618
45619
  const matchedStar = isString(matchedPattern) ? void 0 : matchedText(matchedPattern, moduleName);
@@ -68156,7 +68157,7 @@ function createTypeChecker(host) {
68156
68157
  const [sourceType, targetType] = getTypeNamesForErrorDisplay(source2, target2);
68157
68158
  let generalizedSource = source2;
68158
68159
  let generalizedSourceType = sourceType;
68159
- if (isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) {
68160
+ if (!(target2.flags & 131072 /* Never */) && isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) {
68160
68161
  generalizedSource = getBaseTypeOfLiteralType(source2);
68161
68162
  Debug.assert(!isTypeAssignableTo(generalizedSource, target2), "generalized source shouldn't be assignable");
68162
68163
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
@@ -179,6 +179,8 @@
179
179
  "Add_override_modifier_95160": "添加 \"override\" 修饰符",
180
180
  "Add_parameter_name_90034": "添加参数名称",
181
181
  "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "将限定符添加到匹配成员名称的所有未解析变量",
182
+ "Add_resolution_mode_import_attribute_95196": "添加 \"resolution-mode\" 导入属性",
183
+ "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197": "向所有需要 \"resolution-mode\" 导入属性的仅类型导入添加该属性",
182
184
  "Add_return_type_0_90063": "添加返回类型“{0}”",
183
185
  "Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035": "将 satisfies 和类型断言添加到此表达式 (satisfies T as T) 以使类型显式。",
184
186
  "Add_satisfies_and_an_inline_type_assertion_with_0_90068": "使用“{0}”添加 satisfies 和内联类型断言",
@@ -1748,6 +1750,7 @@
1748
1750
  "Type_expected_1110": "应为类型。",
1749
1751
  "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456": "类型导入断言应恰好有一个键 - \"resolution-mode\" - 值为 \"import\" 或 \"require\"。",
1750
1752
  "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464": "类型导入属性应只有一个键 \"resolution-mode\",值为 \"import\" 或 \"require\"。",
1753
+ "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542": "从 CommonJS 模块导入 ECMAScript 模块的类型导入必须具有 \"resolution-mode\" 属性。",
1751
1754
  "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589": "类型实例化过深,且可能无限。",
1752
1755
  "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062": "类型在其自身的 \"then\" 方法的 fulfillment 回调中被直接或间接引用。",
1753
1756
  "Type_library_referenced_via_0_from_file_1_1402": "通过 \"{0}\" 从文件 \"{1}\" 引用了库类型",
@@ -1758,6 +1761,7 @@
1758
1761
  "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322": "\"yield*\" 操作数的迭代元素的类型必须是有效承诺,或不得包含可调用的 \"then\" 成员。",
1759
1762
  "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615": "属性“{0}”的类型在已映射的类型“{1}”中循环引用其自身。",
1760
1763
  "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321": "异步生成器中 \"yield\" 操作数的类型必须是有效承诺,或不得包含可调用的 \"then\" 成员。",
1764
+ "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541": "从 CommonJS 模块导入 ECMAScript 模块的仅类型导入必须具有 \"resolution-mode\" 属性。",
1761
1765
  "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038": "此导入产生的类型。无法调用或构造命名空间样式的导入,这类导入将在运行时导致失败。请考虑改为使用默认导入或此处需要的导入。",
1762
1766
  "Type_parameter_0_has_a_circular_constraint_2313": "类型参数“{0}”具有循环约束。",
1763
1767
  "Type_parameter_0_has_a_circular_default_2716": "类型参数“{0}”具有循环默认值。",
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.7.0-dev.20240829",
5
+ "version": "5.7.0-dev.20240830",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -117,5 +117,5 @@
117
117
  "node": "20.1.0",
118
118
  "npm": "8.19.4"
119
119
  },
120
- "gitHead": "497316f7e847bc22a009244ba80a45c3bc6fe6b6"
120
+ "gitHead": "0e292c441a0e5f27e18803128b7dfb1155ac0f5a"
121
121
  }