typescript 4.6.0-dev.20220125 → 4.6.0-dev.20220129

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.
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220125";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220129";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -7844,7 +7844,7 @@ var ts;
7844
7844
  }
7845
7845
  })(ts || (ts = {}));
7846
7846
  // <auto-generated />
7847
- // generated from './diagnosticInformationMap.generated.ts' by 'src/compiler'
7847
+ // generated from './diagnosticMessages.json' in 'src/compiler'
7848
7848
  /* @internal */
7849
7849
  var ts;
7850
7850
  (function (ts) {
@@ -9432,9 +9432,8 @@ var ts;
9432
9432
  Remove_variable_statement: diag(90010, ts.DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"),
9433
9433
  Remove_template_tag: diag(90011, ts.DiagnosticCategory.Message, "Remove_template_tag_90011", "Remove template tag"),
9434
9434
  Remove_type_parameters: diag(90012, ts.DiagnosticCategory.Message, "Remove_type_parameters_90012", "Remove type parameters"),
9435
- Import_0_from_module_1: diag(90013, ts.DiagnosticCategory.Message, "Import_0_from_module_1_90013", "Import '{0}' from module \"{1}\""),
9435
+ Import_0_from_1: diag(90013, ts.DiagnosticCategory.Message, "Import_0_from_1_90013", "Import '{0}' from \"{1}\""),
9436
9436
  Change_0_to_1: diag(90014, ts.DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"),
9437
- Add_0_to_existing_import_declaration_from_1: diag(90015, ts.DiagnosticCategory.Message, "Add_0_to_existing_import_declaration_from_1_90015", "Add '{0}' to existing import declaration from \"{1}\""),
9438
9437
  Declare_property_0: diag(90016, ts.DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"),
9439
9438
  Add_index_signature_for_property_0: diag(90017, ts.DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"),
9440
9439
  Disable_checking_for_this_file: diag(90018, ts.DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"),
@@ -9451,8 +9450,6 @@ var ts;
9451
9450
  Add_async_modifier_to_containing_function: diag(90029, ts.DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"),
9452
9451
  Replace_infer_0_with_unknown: diag(90030, ts.DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"),
9453
9452
  Replace_all_unused_infer_with_unknown: diag(90031, ts.DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"),
9454
- Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""),
9455
- Add_default_import_0_to_existing_import_declaration_from_1: diag(90033, ts.DiagnosticCategory.Message, "Add_default_import_0_to_existing_import_declaration_from_1_90033", "Add default import '{0}' to existing import declaration from \"{1}\""),
9456
9453
  Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"),
9457
9454
  Declare_private_property_0: diag(90035, ts.DiagnosticCategory.Message, "Declare_private_property_0_90035", "Declare private property '{0}'"),
9458
9455
  Replace_0_with_Promise_1: diag(90036, ts.DiagnosticCategory.Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"),
@@ -9462,6 +9459,10 @@ var ts;
9462
9459
  Remove_unused_declarations_for_Colon_0: diag(90041, ts.DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"),
9463
9460
  Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."),
9464
9461
  Includes_imports_of_types_referenced_by_0: diag(90054, ts.DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"),
9462
+ Remove_type_from_import_declaration_from_0: diag(90055, ts.DiagnosticCategory.Message, "Remove_type_from_import_declaration_from_0_90055", "Remove 'type' from import declaration from \"{0}\""),
9463
+ Remove_type_from_import_of_0_from_1: diag(90056, ts.DiagnosticCategory.Message, "Remove_type_from_import_of_0_from_1_90056", "Remove 'type' from import of '{0}' from \"{1}\""),
9464
+ Add_import_from_0: diag(90057, ts.DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""),
9465
+ Update_import_from_0: diag(90058, ts.DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""),
9465
9466
  Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"),
9466
9467
  Convert_0_to_1_in_0: diag(95003, ts.DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"),
9467
9468
  Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"),
@@ -14052,10 +14053,13 @@ var ts;
14052
14053
  function packageIdIsEqual(a, b) {
14053
14054
  return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
14054
14055
  }
14055
- function packageIdToString(_a) {
14056
- var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
14057
- var fullName = subModuleName ? name + "/" + subModuleName : name;
14058
- return fullName + "@" + version;
14056
+ function packageIdToPackageName(_a) {
14057
+ var name = _a.name, subModuleName = _a.subModuleName;
14058
+ return subModuleName ? name + "/" + subModuleName : name;
14059
+ }
14060
+ ts.packageIdToPackageName = packageIdToPackageName;
14061
+ function packageIdToString(packageId) {
14062
+ return packageIdToPackageName(packageId) + "@" + packageId.version;
14059
14063
  }
14060
14064
  ts.packageIdToString = packageIdToString;
14061
14065
  function typeDirectiveIsEqualTo(oldResolution, newResolution) {
@@ -14888,6 +14892,15 @@ var ts;
14888
14892
  };
14889
14893
  }
14890
14894
  ts.createDiagnosticForFileFromMessageChain = createDiagnosticForFileFromMessageChain;
14895
+ function createDiagnosticMessageChainFromDiagnostic(diagnostic) {
14896
+ return typeof diagnostic.messageText === "string" ? {
14897
+ code: diagnostic.code,
14898
+ category: diagnostic.category,
14899
+ messageText: diagnostic.messageText,
14900
+ next: diagnostic.next,
14901
+ } : diagnostic.messageText;
14902
+ }
14903
+ ts.createDiagnosticMessageChainFromDiagnostic = createDiagnosticMessageChainFromDiagnostic;
14891
14904
  function createDiagnosticForRange(sourceFile, range, message) {
14892
14905
  return {
14893
14906
  file: sourceFile,
@@ -15056,7 +15069,8 @@ var ts;
15056
15069
  node.kind === 212 /* FunctionExpression */ ||
15057
15070
  node.kind === 213 /* ArrowFunction */ ||
15058
15071
  node.kind === 211 /* ParenthesizedExpression */ ||
15059
- node.kind === 253 /* VariableDeclaration */) ?
15072
+ node.kind === 253 /* VariableDeclaration */ ||
15073
+ node.kind === 274 /* ExportSpecifier */) ?
15060
15074
  ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
15061
15075
  ts.getLeadingCommentRanges(text, node.pos);
15062
15076
  // True if the comment starts with '/**' but not if it is '/**/'
@@ -20847,6 +20861,59 @@ var ts;
20847
20861
  return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
20848
20862
  }
20849
20863
  ts.isThisTypeParameter = isThisTypeParameter;
20864
+ function getNodeModulePathParts(fullPath) {
20865
+ // If fullPath can't be valid module file within node_modules, returns undefined.
20866
+ // Example of expected pattern: /base/path/node_modules/[@scope/otherpackage/@otherscope/node_modules/]package/[subdirectory/]file.js
20867
+ // Returns indices: ^ ^ ^ ^
20868
+ var topLevelNodeModulesIndex = 0;
20869
+ var topLevelPackageNameIndex = 0;
20870
+ var packageRootIndex = 0;
20871
+ var fileNameIndex = 0;
20872
+ var States;
20873
+ (function (States) {
20874
+ States[States["BeforeNodeModules"] = 0] = "BeforeNodeModules";
20875
+ States[States["NodeModules"] = 1] = "NodeModules";
20876
+ States[States["Scope"] = 2] = "Scope";
20877
+ States[States["PackageContent"] = 3] = "PackageContent";
20878
+ })(States || (States = {}));
20879
+ var partStart = 0;
20880
+ var partEnd = 0;
20881
+ var state = 0 /* BeforeNodeModules */;
20882
+ while (partEnd >= 0) {
20883
+ partStart = partEnd;
20884
+ partEnd = fullPath.indexOf("/", partStart + 1);
20885
+ switch (state) {
20886
+ case 0 /* BeforeNodeModules */:
20887
+ if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
20888
+ topLevelNodeModulesIndex = partStart;
20889
+ topLevelPackageNameIndex = partEnd;
20890
+ state = 1 /* NodeModules */;
20891
+ }
20892
+ break;
20893
+ case 1 /* NodeModules */:
20894
+ case 2 /* Scope */:
20895
+ if (state === 1 /* NodeModules */ && fullPath.charAt(partStart + 1) === "@") {
20896
+ state = 2 /* Scope */;
20897
+ }
20898
+ else {
20899
+ packageRootIndex = partEnd;
20900
+ state = 3 /* PackageContent */;
20901
+ }
20902
+ break;
20903
+ case 3 /* PackageContent */:
20904
+ if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
20905
+ state = 1 /* NodeModules */;
20906
+ }
20907
+ else {
20908
+ state = 3 /* PackageContent */;
20909
+ }
20910
+ break;
20911
+ }
20912
+ }
20913
+ fileNameIndex = partStart;
20914
+ return state > 1 /* NodeModules */ ? { topLevelNodeModulesIndex: topLevelNodeModulesIndex, topLevelPackageNameIndex: topLevelPackageNameIndex, packageRootIndex: packageRootIndex, fileNameIndex: fileNameIndex } : undefined;
20915
+ }
20916
+ ts.getNodeModulePathParts = getNodeModulePathParts;
20850
20917
  })(ts || (ts = {}));
20851
20918
  /* @internal */
20852
20919
  var ts;
@@ -36207,7 +36274,8 @@ var ts;
36207
36274
  return finishNode(node, pos);
36208
36275
  }
36209
36276
  function parseExportSpecifier() {
36210
- return parseImportOrExportSpecifier(274 /* ExportSpecifier */);
36277
+ var hasJSDoc = hasPrecedingJSDocComment();
36278
+ return withJSDoc(parseImportOrExportSpecifier(274 /* ExportSpecifier */), hasJSDoc);
36211
36279
  }
36212
36280
  function parseImportSpecifier() {
36213
36281
  return parseImportOrExportSpecifier(269 /* ImportSpecifier */);
@@ -43412,14 +43480,12 @@ var ts;
43412
43480
  }
43413
43481
  var binder = createBinder();
43414
43482
  function bindSourceFile(file, options) {
43415
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("bind" /* Bind */, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
43416
43483
  ts.performance.mark("beforeBind");
43417
43484
  ts.perfLogger.logStartBindFile("" + file.fileName);
43418
43485
  binder(file, options);
43419
43486
  ts.perfLogger.logStopBindFile();
43420
43487
  ts.performance.mark("afterBind");
43421
43488
  ts.performance.measure("Bind", "beforeBind", "afterBind");
43422
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
43423
43489
  }
43424
43490
  ts.bindSourceFile = bindSourceFile;
43425
43491
  function createBinder() {
@@ -43479,7 +43545,9 @@ var ts;
43479
43545
  ts.Debug.attachFlowNodeDebugInfo(unreachableFlow);
43480
43546
  ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow);
43481
43547
  if (!file.locals) {
43548
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("bind" /* Bind */, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
43482
43549
  bind(file);
43550
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
43483
43551
  file.symbolCount = symbolCount;
43484
43552
  file.classifiableNames = classifiableNames;
43485
43553
  delayedBindJSDocTypedefTag();
@@ -47746,6 +47814,9 @@ var ts;
47746
47814
  suggestionDiagnostics.add(diagnostic);
47747
47815
  return diagnostic;
47748
47816
  }
47817
+ function isDeprecatedSymbol(symbol) {
47818
+ return !!(getDeclarationNodeFlagsFromSymbol(symbol) & 134217728 /* Deprecated */);
47819
+ }
47749
47820
  function addDeprecatedSuggestion(location, declarations, deprecatedEntity) {
47750
47821
  var diagnostic = ts.createDiagnosticForNode(location, ts.Diagnostics._0_is_deprecated, deprecatedEntity);
47751
47822
  return addDeprecatedSuggestionWorker(declarations, diagnostic);
@@ -48737,24 +48808,19 @@ var ts;
48737
48808
  error(errorLocation, ts.Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), ts.declarationNameToString(errorLocation));
48738
48809
  }
48739
48810
  }
48740
- if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */) {
48741
- checkSymbolUsageInExpressionContext(result, name, errorLocation);
48811
+ if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !ts.isValidTypeOnlyAliasUseSite(errorLocation)) {
48812
+ var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result);
48813
+ if (typeOnlyDeclaration) {
48814
+ var message = typeOnlyDeclaration.kind === 274 /* ExportSpecifier */
48815
+ ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
48816
+ : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
48817
+ var unescapedName = ts.unescapeLeadingUnderscores(name);
48818
+ addTypeOnlyDeclarationRelatedInfo(error(errorLocation, message, unescapedName), typeOnlyDeclaration, unescapedName);
48819
+ }
48742
48820
  }
48743
48821
  }
48744
48822
  return result;
48745
48823
  }
48746
- function checkSymbolUsageInExpressionContext(symbol, name, useSite) {
48747
- if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
48748
- var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
48749
- if (typeOnlyDeclaration) {
48750
- var message = typeOnlyDeclaration.kind === 274 /* ExportSpecifier */
48751
- ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
48752
- : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
48753
- var unescapedName = ts.unescapeLeadingUnderscores(name);
48754
- addTypeOnlyDeclarationRelatedInfo(error(useSite, message, unescapedName), typeOnlyDeclaration, unescapedName);
48755
- }
48756
- }
48757
- }
48758
48824
  function addTypeOnlyDeclarationRelatedInfo(diagnostic, typeOnlyDeclaration, unescapedName) {
48759
48825
  if (!typeOnlyDeclaration)
48760
48826
  return diagnostic;
@@ -52516,7 +52582,8 @@ var ts;
52516
52582
  includePrivateSymbol === null || includePrivateSymbol === void 0 ? void 0 : includePrivateSymbol(sym);
52517
52583
  }
52518
52584
  if (ts.isIdentifier(node)) {
52519
- var name = sym.flags & 262144 /* TypeParameter */ ? typeParameterToName(getDeclaredTypeOfSymbol(sym), context) : ts.factory.cloneNode(node);
52585
+ var type = getDeclaredTypeOfSymbol(sym);
52586
+ var name = sym.flags & 262144 /* TypeParameter */ && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : ts.factory.cloneNode(node);
52520
52587
  name.symbol = sym; // for quickinfo, which uses identifier symbol information
52521
52588
  return { introducesError: introducesError, node: ts.setEmitFlags(ts.setOriginalNode(name, node), 16777216 /* NoAsciiEscaping */) };
52522
52589
  }
@@ -60532,7 +60599,7 @@ var ts;
60532
60599
  }
60533
60600
  var prop = getPropertyOfType(objectType, propName);
60534
60601
  if (prop) {
60535
- if (accessFlags & 64 /* ReportDeprecated */ && accessNode && prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 /* Deprecated */ && isUncalledFunctionReference(accessNode, prop)) {
60602
+ if (accessFlags & 64 /* ReportDeprecated */ && accessNode && prop.declarations && isDeprecatedSymbol(prop) && isUncalledFunctionReference(accessNode, prop)) {
60536
60603
  var deprecatedNode = (_a = accessExpression === null || accessExpression === void 0 ? void 0 : accessExpression.argumentExpression) !== null && _a !== void 0 ? _a : (ts.isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode);
60537
60604
  addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName);
60538
60605
  }
@@ -69935,9 +70002,9 @@ var ts;
69935
70002
  markAliasReferenced(symbol, node);
69936
70003
  }
69937
70004
  var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
69938
- var sourceSymbol = localOrExportSymbol.flags & 2097152 /* Alias */ ? resolveAlias(localOrExportSymbol) : localOrExportSymbol;
69939
- if (sourceSymbol.declarations && getDeclarationNodeFlagsFromSymbol(sourceSymbol) & 134217728 /* Deprecated */ && isUncalledFunctionReference(node, sourceSymbol)) {
69940
- addDeprecatedSuggestion(node, sourceSymbol.declarations, node.escapedText);
70005
+ var targetSymbol = checkDeprecatedAliasedSymbol(localOrExportSymbol, node);
70006
+ if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
70007
+ addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
69941
70008
  }
69942
70009
  var declaration = localOrExportSymbol.valueDeclaration;
69943
70010
  if (declaration && localOrExportSymbol.flags & 32 /* Class */) {
@@ -72949,7 +73016,7 @@ var ts;
72949
73016
  }
72950
73017
  }
72951
73018
  else {
72952
- if (prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 /* Deprecated */ && isUncalledFunctionReference(node, prop)) {
73019
+ if (isDeprecatedSymbol(prop) && isUncalledFunctionReference(node, prop) && prop.declarations) {
72953
73020
  addDeprecatedSuggestion(right, prop.declarations, right.escapedText);
72954
73021
  }
72955
73022
  checkPropertyNotUsedBeforeDeclaration(prop, node, right);
@@ -74408,7 +74475,7 @@ var ts;
74408
74475
  }
74409
74476
  var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
74410
74477
  ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
74411
- var chain = ts.chainDiagnosticMessages(ts.map(diags_3, function (d) { return typeof d.messageText === "string" ? d : d.messageText; }), ts.Diagnostics.No_overload_matches_this_call);
74478
+ var chain = ts.chainDiagnosticMessages(ts.map(diags_3, ts.createDiagnosticMessageChainFromDiagnostic), ts.Diagnostics.No_overload_matches_this_call);
74412
74479
  // The below is a spread to guarantee we get a new (mutable) array - our `flatMap` helper tries to do "smart" optimizations where it reuses input
74413
74480
  // arrays and the emptyArray singleton where possible, which is decidedly not what we want while we're still constructing this diagnostic
74414
74481
  var related = __spreadArray([], ts.flatMap(diags_3, function (d) { return d.relatedInformation; }), true);
@@ -82787,16 +82854,15 @@ var ts;
82787
82854
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
82788
82855
  case 206 /* ElementAccessExpression */:
82789
82856
  case 205 /* PropertyAccessExpression */:
82790
- var ex = expr;
82791
- if (isConstantMemberAccess(ex)) {
82792
- var type = getTypeOfExpression(ex.expression);
82857
+ if (isConstantMemberAccess(expr)) {
82858
+ var type = getTypeOfExpression(expr.expression);
82793
82859
  if (type.symbol && type.symbol.flags & 384 /* Enum */) {
82794
82860
  var name = void 0;
82795
- if (ex.kind === 205 /* PropertyAccessExpression */) {
82796
- name = ex.name.escapedText;
82861
+ if (expr.kind === 205 /* PropertyAccessExpression */) {
82862
+ name = expr.name.escapedText;
82797
82863
  }
82798
82864
  else {
82799
- name = ts.escapeLeadingUnderscores(ts.cast(ex.argumentExpression, ts.isLiteralExpression).text);
82865
+ name = ts.escapeLeadingUnderscores(ts.cast(expr.argumentExpression, ts.isLiteralExpression).text);
82800
82866
  }
82801
82867
  return evaluateEnumMember(expr, type.symbol, name);
82802
82868
  }
@@ -82824,6 +82890,10 @@ var ts;
82824
82890
  }
82825
82891
  }
82826
82892
  function isConstantMemberAccess(node) {
82893
+ var type = getTypeOfExpression(node);
82894
+ if (type === errorType) {
82895
+ return false;
82896
+ }
82827
82897
  return node.kind === 79 /* Identifier */ ||
82828
82898
  node.kind === 205 /* PropertyAccessExpression */ && isConstantMemberAccess(node.expression) ||
82829
82899
  node.kind === 206 /* ElementAccessExpression */ && isConstantMemberAccess(node.expression) &&
@@ -83118,7 +83188,6 @@ var ts;
83118
83188
  return true;
83119
83189
  }
83120
83190
  function checkAliasSymbol(node) {
83121
- var _a;
83122
83191
  var symbol = getSymbolOfNode(node);
83123
83192
  var target = resolveAlias(symbol);
83124
83193
  if (target !== unknownSymbol) {
@@ -83174,10 +83243,45 @@ var ts;
83174
83243
  }
83175
83244
  }
83176
83245
  }
83177
- if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); }))) {
83178
- addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
83246
+ if (ts.isImportSpecifier(node)) {
83247
+ var targetSymbol = checkDeprecatedAliasedSymbol(symbol, node);
83248
+ if (isDeprecatedAliasedSymbol(targetSymbol) && targetSymbol.declarations) {
83249
+ addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName);
83250
+ }
83251
+ }
83252
+ }
83253
+ }
83254
+ function isDeprecatedAliasedSymbol(symbol) {
83255
+ return !!symbol.declarations && ts.every(symbol.declarations, function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728 /* Deprecated */); });
83256
+ }
83257
+ function checkDeprecatedAliasedSymbol(symbol, location) {
83258
+ if (!(symbol.flags & 2097152 /* Alias */))
83259
+ return symbol;
83260
+ var targetSymbol = resolveAlias(symbol);
83261
+ if (targetSymbol === unknownSymbol)
83262
+ return targetSymbol;
83263
+ while (symbol.flags & 2097152 /* Alias */) {
83264
+ var target = getImmediateAliasedSymbol(symbol);
83265
+ if (target) {
83266
+ if (target === targetSymbol)
83267
+ break;
83268
+ if (target.declarations && ts.length(target.declarations)) {
83269
+ if (isDeprecatedAliasedSymbol(target)) {
83270
+ addDeprecatedSuggestion(location, target.declarations, target.escapedName);
83271
+ break;
83272
+ }
83273
+ else {
83274
+ if (symbol === targetSymbol)
83275
+ break;
83276
+ symbol = target;
83277
+ }
83278
+ }
83279
+ }
83280
+ else {
83281
+ break;
83179
83282
  }
83180
83283
  }
83284
+ return targetSymbol;
83181
83285
  }
83182
83286
  function checkImportBinding(node) {
83183
83287
  checkCollisionsForDeclarationName(node, node.name);
@@ -85613,7 +85717,7 @@ var ts;
85613
85717
  if (quickResult !== undefined) {
85614
85718
  return quickResult;
85615
85719
  }
85616
- var lastStatic, lastDeclare, lastAsync, lastReadonly, lastOverride;
85720
+ var lastStatic, lastDeclare, lastAsync, lastOverride;
85617
85721
  var flags = 0 /* None */;
85618
85722
  for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
85619
85723
  var modifier = _a[_i];
@@ -85717,7 +85821,6 @@ var ts;
85717
85821
  return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
85718
85822
  }
85719
85823
  flags |= 64 /* Readonly */;
85720
- lastReadonly = modifier;
85721
85824
  break;
85722
85825
  case 93 /* ExportKeyword */:
85723
85826
  if (flags & 1 /* Export */) {
@@ -85830,18 +85933,12 @@ var ts;
85830
85933
  if (flags & 32 /* Static */) {
85831
85934
  return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
85832
85935
  }
85833
- if (flags & 128 /* Abstract */) {
85834
- return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "abstract"); // TODO: GH#18217
85835
- }
85836
85936
  if (flags & 16384 /* Override */) {
85837
85937
  return grammarErrorOnNode(lastOverride, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override"); // TODO: GH#18217
85838
85938
  }
85839
- else if (flags & 256 /* Async */) {
85939
+ if (flags & 256 /* Async */) {
85840
85940
  return grammarErrorOnNode(lastAsync, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async");
85841
85941
  }
85842
- else if (flags & 64 /* Readonly */) {
85843
- return grammarErrorOnNode(lastReadonly, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "readonly");
85844
- }
85845
85942
  return false;
85846
85943
  }
85847
85944
  else if ((node.kind === 265 /* ImportDeclaration */ || node.kind === 264 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) {
@@ -115836,14 +115933,14 @@ var ts;
115836
115933
  redirectTargetsMap.add(fileFromPackageId.path, fileName);
115837
115934
  addFileToFilesByName(dupFile, path, redirectedPath);
115838
115935
  addFileIncludeReason(dupFile, reason);
115839
- sourceFileToPackageName.set(path, packageId.name);
115936
+ sourceFileToPackageName.set(path, ts.packageIdToPackageName(packageId));
115840
115937
  processingOtherFiles.push(dupFile);
115841
115938
  return dupFile;
115842
115939
  }
115843
115940
  else if (file) {
115844
115941
  // This is the first source file to have this packageId.
115845
115942
  packageIdToSourceFile.set(packageIdKey, file);
115846
- sourceFileToPackageName.set(path, packageId.name);
115943
+ sourceFileToPackageName.set(path, ts.packageIdToPackageName(packageId));
115847
115944
  }
115848
115945
  }
115849
115946
  addFileToFilesByName(file, path, redirectedPath);
@@ -119982,7 +120079,7 @@ var ts;
119982
120079
  if (!host.fileExists || !host.readFile) {
119983
120080
  return undefined;
119984
120081
  }
119985
- var parts = getNodeModulePathParts(path);
120082
+ var parts = ts.getNodeModulePathParts(path);
119986
120083
  if (!parts) {
119987
120084
  return undefined;
119988
120085
  }
@@ -120105,58 +120202,6 @@ var ts;
120105
120202
  }
120106
120203
  }
120107
120204
  }
120108
- function getNodeModulePathParts(fullPath) {
120109
- // If fullPath can't be valid module file within node_modules, returns undefined.
120110
- // Example of expected pattern: /base/path/node_modules/[@scope/otherpackage/@otherscope/node_modules/]package/[subdirectory/]file.js
120111
- // Returns indices: ^ ^ ^ ^
120112
- var topLevelNodeModulesIndex = 0;
120113
- var topLevelPackageNameIndex = 0;
120114
- var packageRootIndex = 0;
120115
- var fileNameIndex = 0;
120116
- var States;
120117
- (function (States) {
120118
- States[States["BeforeNodeModules"] = 0] = "BeforeNodeModules";
120119
- States[States["NodeModules"] = 1] = "NodeModules";
120120
- States[States["Scope"] = 2] = "Scope";
120121
- States[States["PackageContent"] = 3] = "PackageContent";
120122
- })(States || (States = {}));
120123
- var partStart = 0;
120124
- var partEnd = 0;
120125
- var state = 0 /* BeforeNodeModules */;
120126
- while (partEnd >= 0) {
120127
- partStart = partEnd;
120128
- partEnd = fullPath.indexOf("/", partStart + 1);
120129
- switch (state) {
120130
- case 0 /* BeforeNodeModules */:
120131
- if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
120132
- topLevelNodeModulesIndex = partStart;
120133
- topLevelPackageNameIndex = partEnd;
120134
- state = 1 /* NodeModules */;
120135
- }
120136
- break;
120137
- case 1 /* NodeModules */:
120138
- case 2 /* Scope */:
120139
- if (state === 1 /* NodeModules */ && fullPath.charAt(partStart + 1) === "@") {
120140
- state = 2 /* Scope */;
120141
- }
120142
- else {
120143
- packageRootIndex = partEnd;
120144
- state = 3 /* PackageContent */;
120145
- }
120146
- break;
120147
- case 3 /* PackageContent */:
120148
- if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
120149
- state = 1 /* NodeModules */;
120150
- }
120151
- else {
120152
- state = 3 /* PackageContent */;
120153
- }
120154
- break;
120155
- }
120156
- }
120157
- fileNameIndex = partStart;
120158
- return state > 1 /* NodeModules */ ? { topLevelNodeModulesIndex: topLevelNodeModulesIndex, topLevelPackageNameIndex: topLevelPackageNameIndex, packageRootIndex: packageRootIndex, fileNameIndex: fileNameIndex } : undefined;
120159
- }
120160
120205
  function getPathRelativeToRootDirs(path, rootDirs, getCanonicalFileName) {
120161
120206
  return ts.firstDefined(rootDirs, function (rootDir) {
120162
120207
  var relativePath = getRelativePathIfInDirectory(path, rootDir, getCanonicalFileName);
@@ -89,7 +89,8 @@
89
89
  "A_set_accessor_must_have_exactly_one_parameter_1049": "\"set\" 访问器必须正好具有一个参数。",
90
90
  "A_set_accessor_parameter_cannot_have_an_initializer_1052": "\"set\" 访问器参数不能包含初始化表达式。",
91
91
  "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556": "扩张参数必须具有元组类型或传递给 rest 参数。",
92
- "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376": "当类包含初始化的属性、参数属性或专用标识符时,\"super\" 调用必须是构造函数中的第一个语句。",
92
+ "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401": "“super” 调用必须是包含初始化属性、参数属性或专用标识符的派生类的构造函数中的根级语句。",
93
+ "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376": "当派生类包含初始化属性、参数属性或专用标识符时,“super” 调用必须是构造函数中用来引用 “super” 或 “this” 的第一个语句。",
93
94
  "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518": "基于 \"this\" 的类型防护与基于参数的类型防护不兼容。",
94
95
  "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526": "\"this\" 类型仅在类或接口的非静态成员中可用。",
95
96
  "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054": "已在“{0}”中定义了 \"tsconfig.json\" 文件。",
@@ -227,7 +228,7 @@
227
228
  "An_iterator_must_have_a_next_method_2489": "迭代器必须具有 \"next()\" 方法。",
228
229
  "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017": "将 @jsx 杂注与 JSX 片段一起使用时,需要使用 @jsxFrag 杂注。",
229
230
  "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118": "对象文字不能具有多个具有相同名称的 get/set 访问器。",
230
- "An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117": "严格模式下,对象文字不能包含多个具有相同名称的属性。",
231
+ "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117": "对象文本不能具有多个名称相同的属性。",
231
232
  "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119": "对象文字不能包含具有相同名称的属性和访问器。",
232
233
  "An_object_member_cannot_be_declared_optional_1162": "对象成员无法声明为可选。",
233
234
  "An_optional_chain_cannot_contain_private_identifiers_18030": "可选链不能包含专用标识符。",
@@ -314,6 +315,7 @@
314
315
  "Cannot_find_name_0_Did_you_mean_1_2552": "找不到名称“{0}”。你是否指的是“{1}”?",
315
316
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "找不到名称“{0}”。你的意思是实例成员“this.{0}”?",
316
317
  "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662": "找不到名称“{0}”。你的意思是静态成员“{1}.{0}”?",
318
+ "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311": "找不到名称“{0}”。你是否要在异步函数中写入此内容?",
317
319
  "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583": "找不到名称“{0}”。是否需要更改目标库? 请尝试将 “lib” 编译器选项更改为“{1}”或更高版本。",
318
320
  "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584": "找不到名称“{0}”。是否需要更改目标库? 请尝试更改 “lib” 编译器选项以包括 “dom”。",
319
321
  "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582": "找不到名称 \"{0}\"。是否需要安装测试运行器的类型定义? 请尝试使用 `npm i --save-dev @types/jest` 或 `npm i --save-dev @types/mocha`。",
@@ -387,6 +389,7 @@
387
389
  "Compiler_option_0_expects_an_argument_6044": "编译器选项“{0}”需要参数。",
388
390
  "Compiler_option_0_may_not_be_used_with_build_5094": "编译器选项“--{0}”不能与 “--build” 一起使用。",
389
391
  "Compiler_option_0_may_only_be_used_with_build_5093": "编译器选项“--{0}”只能与 “--build” 一起使用。",
392
+ "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124": "值“{1}”的编译器选项“{0}”不稳定。使用夜间 TypeScript 消除此错误。请尝试使用 “npm install -D typescript@next” 进行更新。",
390
393
  "Compiler_option_0_requires_a_value_of_type_1_5024": "编译器选项“{0}”需要类型 {1} 的值。",
391
394
  "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027": "当发出专用标识符下层时,编译器会预留名称“{0}”。",
392
395
  "Compiles_the_TypeScript_project_located_at_the_specified_path_6927": "编译位于指定路径的 TypeScript 项目。",
@@ -565,7 +568,7 @@
565
568
  "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "动态导入的说明符类型必须是 \"string\",但此处类型是 \"{0}\"。",
566
569
  "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'、'node12' 或 'nodenext' 时,才支持动态导入。",
567
570
  "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450": "动态导入只能接受模块说明符和可选断言作为参数",
568
- "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324": "只有在 \"--module\" 选项设置为 \"esnext\" 时,动态导入才支持第二个参数。",
571
+ "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324": "只有当 “--module” 选项设置为 “esnext” 或 “nodenext” 时,动态导入才支持第二个参数。",
569
572
  "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762": "联合类型 \"{0}\" 的每个成员都有构造签名,但这些签名都不能互相兼容。",
570
573
  "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758": "联合类型 \"{0}\" 的每个成员都有签名,但这些签名都不能互相兼容。",
571
574
  "Editor_Support_6249": "编辑器支持",
@@ -623,6 +626,7 @@
623
626
  "Enum_member_must_have_initializer_1061": "枚举成员必须具有初始化表达式。",
624
627
  "Enum_name_cannot_be_0_2431": "枚举名不能为“{0}”。",
625
628
  "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535": "枚举类型“{0}”包含具有不是文本的初始值设定项的成员。",
629
+ "Errors_Files_6041": "错误文件",
626
630
  "Examples_Colon_0_6026": "示例: {0}",
627
631
  "Excessive_stack_depth_comparing_types_0_and_1_2321": "与类型“{0}”和“{1}”相比,堆栈深度过高。",
628
632
  "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027": "应为 {0}-{1} 类型参数;请为这些参数添加 \"@extends\" 标记。",
@@ -708,8 +712,11 @@
708
712
  "For_await_loops_cannot_be_used_inside_a_class_static_block_18038": "无法在类静态块内使用 “For await 循环。",
709
713
  "Found_0_errors_6217": "找到 {0} 个错误。",
710
714
  "Found_0_errors_Watching_for_file_changes_6194": "找到 {0} 个错误。注意文件更改。",
715
+ "Found_0_errors_in_1_files_6261": "在 {1} 个文件中找到 {0} 个错误。",
716
+ "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260": "在同一文件中找到 {0} 个错误,起始位置为: {1}",
711
717
  "Found_1_error_6216": "找到 1 个错误。",
712
718
  "Found_1_error_Watching_for_file_changes_6193": "找到 1 个错误。注意文件更改。",
719
+ "Found_1_error_in_1_6259": "在 {1} 中找到 1 个错误",
713
720
  "Found_package_json_at_0_6099": "在“{0}”处找到了 \"package.json\"。",
714
721
  "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250": "面向 \"ES3\" 或 \"ES5\" 时,在严格模式下,块内不允许函数声明。",
715
722
  "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251": "面向 \"ES3\" 或 \"ES5\" 时,在严格模式下,块内不允许函数声明。类定义自动处于严格模式。",
@@ -764,7 +771,9 @@
764
771
  "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019": "导出的类“{0}”的 Implements 子句具有或正在使用专用名称“{1}”。",
765
772
  "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731": "\"symbol\" 到 \"string\" 的隐式转换将在运行时失败。请考虑在 \"String(...)\" 中包装此表达式。",
766
773
  "Import_0_from_module_1_90013": "从模块“{1}”导入“{0}”",
767
- "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821": "只有在 \"--module\" 选项设置为 \"esnext\" 时,才支持导入断言。",
774
+ "Import_assertion_values_must_be_string_literal_expressions_2837": "导入断言值必须为字符串字面量表达式。",
775
+ "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836": "不允许在转译到 commonjs “require” 调用的语句导入断言。",
776
+ "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821": "仅在将 “--module” 选项设置为 “esnext” 或 “nodenext” 时,才支持导入断言。",
768
777
  "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822": "导入断言不能用于仅类型导入或导出。",
769
778
  "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202": "面向 ECMAScript 模块时,不能使用导入分配。请考虑改用 \"import * as ns from \"mod\"\"、\"import {a} from \"mod\"\"、\"import d from \"mod\"\" 或另一种模块格式。",
770
779
  "Import_declaration_0_is_using_private_name_1_4000": "导入声明“{0}”使用的是专用名称“{1}”。",
@@ -790,6 +799,7 @@
790
799
  "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644": "在发出的 JavaScript 内的源映射中包含源代码。",
791
800
  "Include_sourcemap_files_inside_the_emitted_JavaScript_6643": "在发出的 JavaScript 中包括源映射文件。",
792
801
  "Include_undefined_in_index_signature_results_6716": "在索引签名结果中包含“未定义”",
802
+ "Includes_imports_of_types_referenced_by_0_90054": "包含由“{0}”引用的类型的导入",
793
803
  "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914": "包括 --watch,-w 将开始监视当前项目的文件更改。设置后,可以使用以下内容配置监视模式:",
794
804
  "Index_signature_for_type_0_is_missing_in_type_1_2329": "类型“{1}”中缺少类型“{0}”的索引签名。",
795
805
  "Index_signature_in_type_0_only_permits_reading_2542": "类型“{0}”中的索引签名仅允许读取。",
@@ -1144,6 +1154,8 @@
1144
1154
  "Referenced_project_0_may_not_disable_emit_6310": "引用的项目“{0}”可能不会禁用发出。",
1145
1155
  "Referenced_project_0_must_have_setting_composite_Colon_true_6306": "引用的项目“{0}”必须拥有设置 \"composite\": true。",
1146
1156
  "Referenced_via_0_from_file_1_1400": "通过 \"{0}\" 从文件 \"{1}\" 引用",
1157
+ "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834": "当 “--moduleResolution” 为 “node12” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。请考虑将扩展名添加到导入路径中。",
1158
+ "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835": "当 “--moduleResolution” 为 “node12” 或 “nodenext” 时,相对导入路径需要 EcmaScript 导入中的显式文件扩展名。你是否指的是“{0}”?",
1147
1159
  "Remove_a_list_of_directories_from_the_watch_process_6628": "从监视进程中删除目录列表。",
1148
1160
  "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629": "从监视模式的处理中删除文件列表。",
1149
1161
  "Remove_all_unnecessary_override_modifiers_95163": "删除所有不必要的 \"override\" 修饰符",
@@ -1158,6 +1170,8 @@
1158
1170
  "Remove_parentheses_95126": "删除括号",
1159
1171
  "Remove_template_tag_90011": "删除模板标记",
1160
1172
  "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618": "删除 TypeScript 语言服务器中 JavaScript 文件总源代码大小 20mb 的上限。",
1173
+ "Remove_type_from_import_declaration_from_0_90055": "从“{0}”中删除导入声明中的“type”",
1174
+ "Remove_type_from_import_of_0_from_1_90056": "从“{1}”中删除“{0}”导入中的“type”",
1161
1175
  "Remove_type_parameters_90012": "删除类型参数",
1162
1176
  "Remove_unnecessary_await_95086": "删除不必要的 \"await\"",
1163
1177
  "Remove_unreachable_code_95050": "删除无法访问的代码",
@@ -1706,6 +1720,7 @@
1706
1720
  "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106": "\"baseUrl\" 选项设置为“{0}”,可使用此值解析非相关模块名称“{1}”。",
1707
1721
  "can_only_be_used_at_the_start_of_a_file_18026": "\"#!\" 只能用在文件的开头。",
1708
1722
  "case_or_default_expected_1130": "应为 \"case\" 或 \"default\"。",
1723
+ "catch_or_finally_expected_1472": "应为 “catch” 或 “finally”。",
1709
1724
  "const_declarations_can_only_be_declared_inside_a_block_1156": "\"const\" 声明只能在块的内部声明。",
1710
1725
  "const_declarations_must_be_initialized_1155": "必须初始化 \"const\" 声明。",
1711
1726
  "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477": "\"const\" 枚举成员初始化表达式的求值结果为非有限值。",