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.
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.6";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220125";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220129";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -6657,9 +6657,8 @@ var ts;
6657
6657
  Remove_variable_statement: diag(90010, ts.DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"),
6658
6658
  Remove_template_tag: diag(90011, ts.DiagnosticCategory.Message, "Remove_template_tag_90011", "Remove template tag"),
6659
6659
  Remove_type_parameters: diag(90012, ts.DiagnosticCategory.Message, "Remove_type_parameters_90012", "Remove type parameters"),
6660
- Import_0_from_module_1: diag(90013, ts.DiagnosticCategory.Message, "Import_0_from_module_1_90013", "Import '{0}' from module \"{1}\""),
6660
+ Import_0_from_1: diag(90013, ts.DiagnosticCategory.Message, "Import_0_from_1_90013", "Import '{0}' from \"{1}\""),
6661
6661
  Change_0_to_1: diag(90014, ts.DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"),
6662
- 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}\""),
6663
6662
  Declare_property_0: diag(90016, ts.DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"),
6664
6663
  Add_index_signature_for_property_0: diag(90017, ts.DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"),
6665
6664
  Disable_checking_for_this_file: diag(90018, ts.DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"),
@@ -6676,8 +6675,6 @@ var ts;
6676
6675
  Add_async_modifier_to_containing_function: diag(90029, ts.DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"),
6677
6676
  Replace_infer_0_with_unknown: diag(90030, ts.DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"),
6678
6677
  Replace_all_unused_infer_with_unknown: diag(90031, ts.DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"),
6679
- Import_default_0_from_module_1: diag(90032, ts.DiagnosticCategory.Message, "Import_default_0_from_module_1_90032", "Import default '{0}' from module \"{1}\""),
6680
- 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}\""),
6681
6678
  Add_parameter_name: diag(90034, ts.DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"),
6682
6679
  Declare_private_property_0: diag(90035, ts.DiagnosticCategory.Message, "Declare_private_property_0_90035", "Declare private property '{0}'"),
6683
6680
  Replace_0_with_Promise_1: diag(90036, ts.DiagnosticCategory.Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"),
@@ -6687,6 +6684,10 @@ var ts;
6687
6684
  Remove_unused_declarations_for_Colon_0: diag(90041, ts.DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"),
6688
6685
  Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."),
6689
6686
  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}'"),
6687
+ 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}\""),
6688
+ 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}\""),
6689
+ Add_import_from_0: diag(90057, ts.DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""),
6690
+ Update_import_from_0: diag(90058, ts.DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""),
6690
6691
  Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"),
6691
6692
  Convert_0_to_1_in_0: diag(95003, ts.DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"),
6692
6693
  Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"),
@@ -10673,10 +10674,13 @@ var ts;
10673
10674
  function packageIdIsEqual(a, b) {
10674
10675
  return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
10675
10676
  }
10676
- function packageIdToString(_a) {
10677
- var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
10678
- var fullName = subModuleName ? name + "/" + subModuleName : name;
10679
- return fullName + "@" + version;
10677
+ function packageIdToPackageName(_a) {
10678
+ var name = _a.name, subModuleName = _a.subModuleName;
10679
+ return subModuleName ? name + "/" + subModuleName : name;
10680
+ }
10681
+ ts.packageIdToPackageName = packageIdToPackageName;
10682
+ function packageIdToString(packageId) {
10683
+ return packageIdToPackageName(packageId) + "@" + packageId.version;
10680
10684
  }
10681
10685
  ts.packageIdToString = packageIdToString;
10682
10686
  function typeDirectiveIsEqualTo(oldResolution, newResolution) {
@@ -11402,6 +11406,15 @@ var ts;
11402
11406
  };
11403
11407
  }
11404
11408
  ts.createDiagnosticForFileFromMessageChain = createDiagnosticForFileFromMessageChain;
11409
+ function createDiagnosticMessageChainFromDiagnostic(diagnostic) {
11410
+ return typeof diagnostic.messageText === "string" ? {
11411
+ code: diagnostic.code,
11412
+ category: diagnostic.category,
11413
+ messageText: diagnostic.messageText,
11414
+ next: diagnostic.next,
11415
+ } : diagnostic.messageText;
11416
+ }
11417
+ ts.createDiagnosticMessageChainFromDiagnostic = createDiagnosticMessageChainFromDiagnostic;
11405
11418
  function createDiagnosticForRange(sourceFile, range, message) {
11406
11419
  return {
11407
11420
  file: sourceFile,
@@ -11562,7 +11575,8 @@ var ts;
11562
11575
  node.kind === 212 ||
11563
11576
  node.kind === 213 ||
11564
11577
  node.kind === 211 ||
11565
- node.kind === 253) ?
11578
+ node.kind === 253 ||
11579
+ node.kind === 274) ?
11566
11580
  ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
11567
11581
  ts.getLeadingCommentRanges(text, node.pos);
11568
11582
  return ts.filter(commentRanges, function (comment) {
@@ -16584,6 +16598,49 @@ var ts;
16584
16598
  return !!(type.flags & 262144 && type.isThisType);
16585
16599
  }
16586
16600
  ts.isThisTypeParameter = isThisTypeParameter;
16601
+ function getNodeModulePathParts(fullPath) {
16602
+ var topLevelNodeModulesIndex = 0;
16603
+ var topLevelPackageNameIndex = 0;
16604
+ var packageRootIndex = 0;
16605
+ var fileNameIndex = 0;
16606
+ var partStart = 0;
16607
+ var partEnd = 0;
16608
+ var state = 0;
16609
+ while (partEnd >= 0) {
16610
+ partStart = partEnd;
16611
+ partEnd = fullPath.indexOf("/", partStart + 1);
16612
+ switch (state) {
16613
+ case 0:
16614
+ if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
16615
+ topLevelNodeModulesIndex = partStart;
16616
+ topLevelPackageNameIndex = partEnd;
16617
+ state = 1;
16618
+ }
16619
+ break;
16620
+ case 1:
16621
+ case 2:
16622
+ if (state === 1 && fullPath.charAt(partStart + 1) === "@") {
16623
+ state = 2;
16624
+ }
16625
+ else {
16626
+ packageRootIndex = partEnd;
16627
+ state = 3;
16628
+ }
16629
+ break;
16630
+ case 3:
16631
+ if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
16632
+ state = 1;
16633
+ }
16634
+ else {
16635
+ state = 3;
16636
+ }
16637
+ break;
16638
+ }
16639
+ }
16640
+ fileNameIndex = partStart;
16641
+ return state > 1 ? { topLevelNodeModulesIndex: topLevelNodeModulesIndex, topLevelPackageNameIndex: topLevelPackageNameIndex, packageRootIndex: packageRootIndex, fileNameIndex: fileNameIndex } : undefined;
16642
+ }
16643
+ ts.getNodeModulePathParts = getNodeModulePathParts;
16587
16644
  })(ts || (ts = {}));
16588
16645
  var ts;
16589
16646
  (function (ts) {
@@ -29199,7 +29256,8 @@ var ts;
29199
29256
  return finishNode(node, pos);
29200
29257
  }
29201
29258
  function parseExportSpecifier() {
29202
- return parseImportOrExportSpecifier(274);
29259
+ var hasJSDoc = hasPrecedingJSDocComment();
29260
+ return withJSDoc(parseImportOrExportSpecifier(274), hasJSDoc);
29203
29261
  }
29204
29262
  function parseImportSpecifier() {
29205
29263
  return parseImportOrExportSpecifier(269);
@@ -35498,14 +35556,12 @@ var ts;
35498
35556
  }
35499
35557
  var binder = createBinder();
35500
35558
  function bindSourceFile(file, options) {
35501
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("bind", "bindSourceFile", { path: file.path }, true);
35502
35559
  ts.performance.mark("beforeBind");
35503
35560
  ts.perfLogger.logStartBindFile("" + file.fileName);
35504
35561
  binder(file, options);
35505
35562
  ts.perfLogger.logStopBindFile();
35506
35563
  ts.performance.mark("afterBind");
35507
35564
  ts.performance.measure("Bind", "beforeBind", "afterBind");
35508
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
35509
35565
  }
35510
35566
  ts.bindSourceFile = bindSourceFile;
35511
35567
  function createBinder() {
@@ -35552,7 +35608,9 @@ var ts;
35552
35608
  ts.Debug.attachFlowNodeDebugInfo(unreachableFlow);
35553
35609
  ts.Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow);
35554
35610
  if (!file.locals) {
35611
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("bind", "bindSourceFile", { path: file.path }, true);
35555
35612
  bind(file);
35613
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
35556
35614
  file.symbolCount = symbolCount;
35557
35615
  file.classifiableNames = classifiableNames;
35558
35616
  delayedBindJSDocTypedefTag();
@@ -39141,6 +39199,9 @@ var ts;
39141
39199
  suggestionDiagnostics.add(diagnostic);
39142
39200
  return diagnostic;
39143
39201
  }
39202
+ function isDeprecatedSymbol(symbol) {
39203
+ return !!(getDeclarationNodeFlagsFromSymbol(symbol) & 134217728);
39204
+ }
39144
39205
  function addDeprecatedSuggestion(location, declarations, deprecatedEntity) {
39145
39206
  var diagnostic = ts.createDiagnosticForNode(location, ts.Diagnostics._0_is_deprecated, deprecatedEntity);
39146
39207
  return addDeprecatedSuggestionWorker(declarations, diagnostic);
@@ -39951,24 +40012,19 @@ var ts;
39951
40012
  error(errorLocation, ts.Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), ts.declarationNameToString(errorLocation));
39952
40013
  }
39953
40014
  }
39954
- if (result && errorLocation && meaning & 111551 && result.flags & 2097152) {
39955
- checkSymbolUsageInExpressionContext(result, name, errorLocation);
40015
+ if (result && errorLocation && meaning & 111551 && result.flags & 2097152 && !(result.flags & 111551) && !ts.isValidTypeOnlyAliasUseSite(errorLocation)) {
40016
+ var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result);
40017
+ if (typeOnlyDeclaration) {
40018
+ var message = typeOnlyDeclaration.kind === 274
40019
+ ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
40020
+ : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
40021
+ var unescapedName = ts.unescapeLeadingUnderscores(name);
40022
+ addTypeOnlyDeclarationRelatedInfo(error(errorLocation, message, unescapedName), typeOnlyDeclaration, unescapedName);
40023
+ }
39956
40024
  }
39957
40025
  }
39958
40026
  return result;
39959
40027
  }
39960
- function checkSymbolUsageInExpressionContext(symbol, name, useSite) {
39961
- if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
39962
- var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
39963
- if (typeOnlyDeclaration) {
39964
- var message = typeOnlyDeclaration.kind === 274
39965
- ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
39966
- : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
39967
- var unescapedName = ts.unescapeLeadingUnderscores(name);
39968
- addTypeOnlyDeclarationRelatedInfo(error(useSite, message, unescapedName), typeOnlyDeclaration, unescapedName);
39969
- }
39970
- }
39971
- }
39972
40028
  function addTypeOnlyDeclarationRelatedInfo(diagnostic, typeOnlyDeclaration, unescapedName) {
39973
40029
  if (!typeOnlyDeclaration)
39974
40030
  return diagnostic;
@@ -43361,7 +43417,8 @@ var ts;
43361
43417
  includePrivateSymbol === null || includePrivateSymbol === void 0 ? void 0 : includePrivateSymbol(sym);
43362
43418
  }
43363
43419
  if (ts.isIdentifier(node)) {
43364
- var name = sym.flags & 262144 ? typeParameterToName(getDeclaredTypeOfSymbol(sym), context) : ts.factory.cloneNode(node);
43420
+ var type = getDeclaredTypeOfSymbol(sym);
43421
+ var name = sym.flags & 262144 && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : ts.factory.cloneNode(node);
43365
43422
  name.symbol = sym;
43366
43423
  return { introducesError: introducesError, node: ts.setEmitFlags(ts.setOriginalNode(name, node), 16777216) };
43367
43424
  }
@@ -50266,7 +50323,7 @@ var ts;
50266
50323
  }
50267
50324
  var prop = getPropertyOfType(objectType, propName);
50268
50325
  if (prop) {
50269
- if (accessFlags & 64 && accessNode && prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 && isUncalledFunctionReference(accessNode, prop)) {
50326
+ if (accessFlags & 64 && accessNode && prop.declarations && isDeprecatedSymbol(prop) && isUncalledFunctionReference(accessNode, prop)) {
50270
50327
  var deprecatedNode = (_a = accessExpression === null || accessExpression === void 0 ? void 0 : accessExpression.argumentExpression) !== null && _a !== void 0 ? _a : (ts.isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode);
50271
50328
  addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName);
50272
50329
  }
@@ -58416,9 +58473,9 @@ var ts;
58416
58473
  markAliasReferenced(symbol, node);
58417
58474
  }
58418
58475
  var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
58419
- var sourceSymbol = localOrExportSymbol.flags & 2097152 ? resolveAlias(localOrExportSymbol) : localOrExportSymbol;
58420
- if (sourceSymbol.declarations && getDeclarationNodeFlagsFromSymbol(sourceSymbol) & 134217728 && isUncalledFunctionReference(node, sourceSymbol)) {
58421
- addDeprecatedSuggestion(node, sourceSymbol.declarations, node.escapedText);
58476
+ var targetSymbol = checkDeprecatedAliasedSymbol(localOrExportSymbol, node);
58477
+ if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
58478
+ addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
58422
58479
  }
58423
58480
  var declaration = localOrExportSymbol.valueDeclaration;
58424
58481
  if (declaration && localOrExportSymbol.flags & 32) {
@@ -60950,7 +61007,7 @@ var ts;
60950
61007
  }
60951
61008
  }
60952
61009
  else {
60953
- if (prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 && isUncalledFunctionReference(node, prop)) {
61010
+ if (isDeprecatedSymbol(prop) && isUncalledFunctionReference(node, prop) && prop.declarations) {
60954
61011
  addDeprecatedSuggestion(right, prop.declarations, right.escapedText);
60955
61012
  }
60956
61013
  checkPropertyNotUsedBeforeDeclaration(prop, node, right);
@@ -62177,7 +62234,7 @@ var ts;
62177
62234
  }
62178
62235
  var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
62179
62236
  ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
62180
- 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);
62237
+ var chain = ts.chainDiagnosticMessages(ts.map(diags_3, ts.createDiagnosticMessageChainFromDiagnostic), ts.Diagnostics.No_overload_matches_this_call);
62181
62238
  var related = __spreadArray([], ts.flatMap(diags_3, function (d) { return d.relatedInformation; }), true);
62182
62239
  var diag = void 0;
62183
62240
  if (ts.every(diags_3, function (d) { return d.start === diags_3[0].start && d.length === diags_3[0].length && d.file === diags_3[0].file; })) {
@@ -69340,16 +69397,15 @@ var ts;
69340
69397
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
69341
69398
  case 206:
69342
69399
  case 205:
69343
- var ex = expr;
69344
- if (isConstantMemberAccess(ex)) {
69345
- var type = getTypeOfExpression(ex.expression);
69400
+ if (isConstantMemberAccess(expr)) {
69401
+ var type = getTypeOfExpression(expr.expression);
69346
69402
  if (type.symbol && type.symbol.flags & 384) {
69347
69403
  var name = void 0;
69348
- if (ex.kind === 205) {
69349
- name = ex.name.escapedText;
69404
+ if (expr.kind === 205) {
69405
+ name = expr.name.escapedText;
69350
69406
  }
69351
69407
  else {
69352
- name = ts.escapeLeadingUnderscores(ts.cast(ex.argumentExpression, ts.isLiteralExpression).text);
69408
+ name = ts.escapeLeadingUnderscores(ts.cast(expr.argumentExpression, ts.isLiteralExpression).text);
69353
69409
  }
69354
69410
  return evaluateEnumMember(expr, type.symbol, name);
69355
69411
  }
@@ -69377,6 +69433,10 @@ var ts;
69377
69433
  }
69378
69434
  }
69379
69435
  function isConstantMemberAccess(node) {
69436
+ var type = getTypeOfExpression(node);
69437
+ if (type === errorType) {
69438
+ return false;
69439
+ }
69380
69440
  return node.kind === 79 ||
69381
69441
  node.kind === 205 && isConstantMemberAccess(node.expression) ||
69382
69442
  node.kind === 206 && isConstantMemberAccess(node.expression) &&
@@ -69635,7 +69695,6 @@ var ts;
69635
69695
  return true;
69636
69696
  }
69637
69697
  function checkAliasSymbol(node) {
69638
- var _a;
69639
69698
  var symbol = getSymbolOfNode(node);
69640
69699
  var target = resolveAlias(symbol);
69641
69700
  if (target !== unknownSymbol) {
@@ -69682,11 +69741,46 @@ var ts;
69682
69741
  }
69683
69742
  }
69684
69743
  }
69685
- if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728); }))) {
69686
- addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
69744
+ if (ts.isImportSpecifier(node)) {
69745
+ var targetSymbol = checkDeprecatedAliasedSymbol(symbol, node);
69746
+ if (isDeprecatedAliasedSymbol(targetSymbol) && targetSymbol.declarations) {
69747
+ addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName);
69748
+ }
69687
69749
  }
69688
69750
  }
69689
69751
  }
69752
+ function isDeprecatedAliasedSymbol(symbol) {
69753
+ return !!symbol.declarations && ts.every(symbol.declarations, function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728); });
69754
+ }
69755
+ function checkDeprecatedAliasedSymbol(symbol, location) {
69756
+ if (!(symbol.flags & 2097152))
69757
+ return symbol;
69758
+ var targetSymbol = resolveAlias(symbol);
69759
+ if (targetSymbol === unknownSymbol)
69760
+ return targetSymbol;
69761
+ while (symbol.flags & 2097152) {
69762
+ var target = getImmediateAliasedSymbol(symbol);
69763
+ if (target) {
69764
+ if (target === targetSymbol)
69765
+ break;
69766
+ if (target.declarations && ts.length(target.declarations)) {
69767
+ if (isDeprecatedAliasedSymbol(target)) {
69768
+ addDeprecatedSuggestion(location, target.declarations, target.escapedName);
69769
+ break;
69770
+ }
69771
+ else {
69772
+ if (symbol === targetSymbol)
69773
+ break;
69774
+ symbol = target;
69775
+ }
69776
+ }
69777
+ }
69778
+ else {
69779
+ break;
69780
+ }
69781
+ }
69782
+ return targetSymbol;
69783
+ }
69690
69784
  function checkImportBinding(node) {
69691
69785
  checkCollisionsForDeclarationName(node, node.name);
69692
69786
  checkAliasSymbol(node);
@@ -71866,7 +71960,7 @@ var ts;
71866
71960
  if (quickResult !== undefined) {
71867
71961
  return quickResult;
71868
71962
  }
71869
- var lastStatic, lastDeclare, lastAsync, lastReadonly, lastOverride;
71963
+ var lastStatic, lastDeclare, lastAsync, lastOverride;
71870
71964
  var flags = 0;
71871
71965
  for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
71872
71966
  var modifier = _a[_i];
@@ -71968,7 +72062,6 @@ var ts;
71968
72062
  return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
71969
72063
  }
71970
72064
  flags |= 64;
71971
- lastReadonly = modifier;
71972
72065
  break;
71973
72066
  case 93:
71974
72067
  if (flags & 1) {
@@ -72081,18 +72174,12 @@ var ts;
72081
72174
  if (flags & 32) {
72082
72175
  return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
72083
72176
  }
72084
- if (flags & 128) {
72085
- return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "abstract");
72086
- }
72087
72177
  if (flags & 16384) {
72088
72178
  return grammarErrorOnNode(lastOverride, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override");
72089
72179
  }
72090
- else if (flags & 256) {
72180
+ if (flags & 256) {
72091
72181
  return grammarErrorOnNode(lastAsync, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async");
72092
72182
  }
72093
- else if (flags & 64) {
72094
- return grammarErrorOnNode(lastReadonly, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "readonly");
72095
- }
72096
72183
  return false;
72097
72184
  }
72098
72185
  else if ((node.kind === 265 || node.kind === 264) && flags & 2) {
@@ -95580,13 +95667,13 @@ var ts;
95580
95667
  redirectTargetsMap.add(fileFromPackageId.path, fileName);
95581
95668
  addFileToFilesByName(dupFile, path, redirectedPath);
95582
95669
  addFileIncludeReason(dupFile, reason);
95583
- sourceFileToPackageName.set(path, packageId.name);
95670
+ sourceFileToPackageName.set(path, ts.packageIdToPackageName(packageId));
95584
95671
  processingOtherFiles.push(dupFile);
95585
95672
  return dupFile;
95586
95673
  }
95587
95674
  else if (file) {
95588
95675
  packageIdToSourceFile.set(packageIdKey, file);
95589
- sourceFileToPackageName.set(path, packageId.name);
95676
+ sourceFileToPackageName.set(path, ts.packageIdToPackageName(packageId));
95590
95677
  }
95591
95678
  }
95592
95679
  addFileToFilesByName(file, path, redirectedPath);
@@ -99136,7 +99223,7 @@ var ts;
99136
99223
  if (!host.fileExists || !host.readFile) {
99137
99224
  return undefined;
99138
99225
  }
99139
- var parts = getNodeModulePathParts(path);
99226
+ var parts = ts.getNodeModulePathParts(path);
99140
99227
  if (!parts) {
99141
99228
  return undefined;
99142
99229
  }
@@ -99243,48 +99330,6 @@ var ts;
99243
99330
  }
99244
99331
  }
99245
99332
  }
99246
- function getNodeModulePathParts(fullPath) {
99247
- var topLevelNodeModulesIndex = 0;
99248
- var topLevelPackageNameIndex = 0;
99249
- var packageRootIndex = 0;
99250
- var fileNameIndex = 0;
99251
- var partStart = 0;
99252
- var partEnd = 0;
99253
- var state = 0;
99254
- while (partEnd >= 0) {
99255
- partStart = partEnd;
99256
- partEnd = fullPath.indexOf("/", partStart + 1);
99257
- switch (state) {
99258
- case 0:
99259
- if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
99260
- topLevelNodeModulesIndex = partStart;
99261
- topLevelPackageNameIndex = partEnd;
99262
- state = 1;
99263
- }
99264
- break;
99265
- case 1:
99266
- case 2:
99267
- if (state === 1 && fullPath.charAt(partStart + 1) === "@") {
99268
- state = 2;
99269
- }
99270
- else {
99271
- packageRootIndex = partEnd;
99272
- state = 3;
99273
- }
99274
- break;
99275
- case 3:
99276
- if (fullPath.indexOf(ts.nodeModulesPathPart, partStart) === partStart) {
99277
- state = 1;
99278
- }
99279
- else {
99280
- state = 3;
99281
- }
99282
- break;
99283
- }
99284
- }
99285
- fileNameIndex = partStart;
99286
- return state > 1 ? { topLevelNodeModulesIndex: topLevelNodeModulesIndex, topLevelPackageNameIndex: topLevelPackageNameIndex, packageRootIndex: packageRootIndex, fileNameIndex: fileNameIndex } : undefined;
99287
- }
99288
99333
  function getPathRelativeToRootDirs(path, rootDirs, getCanonicalFileName) {
99289
99334
  return ts.firstDefined(rootDirs, function (rootDir) {
99290
99335
  var relativePath = getRelativePathIfInDirectory(path, rootDir, getCanonicalFileName);