typescript 4.9.0-dev.20221013 → 4.9.0-dev.20221015

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.9";
72
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221013");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221015");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -6749,6 +6749,10 @@ var ts;
6749
6749
  Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),
6750
6750
  Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),
6751
6751
  Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"),
6752
+ Resolving_in_0_mode_with_conditions_1: diag(6402, ts.DiagnosticCategory.Message, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."),
6753
+ Matched_0_condition_1: diag(6403, ts.DiagnosticCategory.Message, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."),
6754
+ Using_0_subpath_1_with_target_2: diag(6404, ts.DiagnosticCategory.Message, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."),
6755
+ Saw_non_matching_condition_0: diag(6405, ts.DiagnosticCategory.Message, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."),
6752
6756
  The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
6753
6757
  The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
6754
6758
  The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
@@ -7065,6 +7069,8 @@ var ts;
7065
7069
  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}\""),
7066
7070
  Add_import_from_0: diag(90057, ts.DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""),
7067
7071
  Update_import_from_0: diag(90058, ts.DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""),
7072
+ Export_0_from_module_1: diag(90059, ts.DiagnosticCategory.Message, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"),
7073
+ Export_all_referenced_locals: diag(90060, ts.DiagnosticCategory.Message, "Export_all_referenced_locals_90060", "Export all referenced locals"),
7068
7074
  Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"),
7069
7075
  Convert_0_to_1_in_0: diag(95003, ts.DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"),
7070
7076
  Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"),
@@ -17284,6 +17290,32 @@ var ts;
17284
17290
  return parameter.kind === 343 ? (_a = parameter.typeExpression) === null || _a === void 0 ? void 0 : _a.type : parameter.type;
17285
17291
  }
17286
17292
  ts.getParameterTypeNode = getParameterTypeNode;
17293
+ function isTypeDeclaration(node) {
17294
+ switch (node.kind) {
17295
+ case 165:
17296
+ case 260:
17297
+ case 261:
17298
+ case 262:
17299
+ case 263:
17300
+ case 348:
17301
+ case 341:
17302
+ case 342:
17303
+ return true;
17304
+ case 270:
17305
+ return node.isTypeOnly;
17306
+ case 273:
17307
+ case 278:
17308
+ return node.parent.parent.isTypeOnly;
17309
+ default:
17310
+ return false;
17311
+ }
17312
+ }
17313
+ ts.isTypeDeclaration = isTypeDeclaration;
17314
+ function canHaveExportModifier(node) {
17315
+ return ts.isEnumDeclaration(node) || ts.isVariableStatement(node) || ts.isFunctionDeclaration(node) || ts.isClassDeclaration(node)
17316
+ || ts.isInterfaceDeclaration(node) || isTypeDeclaration(node) || (ts.isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node));
17317
+ }
17318
+ ts.canHaveExportModifier = canHaveExportModifier;
17287
17319
  })(ts || (ts = {}));
17288
17320
  var ts;
17289
17321
  (function (ts) {
@@ -36237,6 +36269,9 @@ var ts;
36237
36269
  requestContainingDirectory: containingDirectory,
36238
36270
  reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
36239
36271
  };
36272
+ if (traceEnabled && ts.getEmitModuleResolutionKind(compilerOptions) >= ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) <= ts.ModuleResolutionKind.NodeNext) {
36273
+ trace(host, ts.Diagnostics.Resolving_in_0_mode_with_conditions_1, features & NodeResolutionFeatures.EsmMode ? "ESM" : "CJS", conditions.map(function (c) { return "'".concat(c, "'"); }).join(", "));
36274
+ }
36240
36275
  var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
36241
36276
  return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state.resultFromCache);
36242
36277
  function tryResolve(extensions) {
@@ -36766,7 +36801,7 @@ var ts;
36766
36801
  }
36767
36802
  if (mainExport) {
36768
36803
  var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, subpath, scope, false);
36769
- return loadModuleFromTargetImportOrExport(mainExport, "", false);
36804
+ return loadModuleFromTargetImportOrExport(mainExport, "", false, ".");
36770
36805
  }
36771
36806
  }
36772
36807
  else if (allKeysStartWithDot(scope.contents.packageJsonContent.exports)) {
@@ -36841,7 +36876,7 @@ var ts;
36841
36876
  var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
36842
36877
  if (!ts.endsWith(moduleName, ts.directorySeparator) && moduleName.indexOf("*") === -1 && ts.hasProperty(lookupTable, moduleName)) {
36843
36878
  var target = lookupTable[moduleName];
36844
- return loadModuleFromTargetImportOrExport(target, "", false);
36879
+ return loadModuleFromTargetImportOrExport(target, "", false, moduleName);
36845
36880
  }
36846
36881
  var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }), comparePatternKeys);
36847
36882
  for (var _i = 0, expandingKeys_1 = expandingKeys; _i < expandingKeys_1.length; _i++) {
@@ -36850,17 +36885,17 @@ var ts;
36850
36885
  var target = lookupTable[potentialTarget];
36851
36886
  var starPos = potentialTarget.indexOf("*");
36852
36887
  var subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos));
36853
- return loadModuleFromTargetImportOrExport(target, subpath, true);
36888
+ return loadModuleFromTargetImportOrExport(target, subpath, true, potentialTarget);
36854
36889
  }
36855
36890
  else if (ts.endsWith(potentialTarget, "*") && ts.startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) {
36856
36891
  var target = lookupTable[potentialTarget];
36857
36892
  var subpath = moduleName.substring(potentialTarget.length - 1);
36858
- return loadModuleFromTargetImportOrExport(target, subpath, true);
36893
+ return loadModuleFromTargetImportOrExport(target, subpath, true, potentialTarget);
36859
36894
  }
36860
36895
  else if (ts.startsWith(moduleName, potentialTarget)) {
36861
36896
  var target = lookupTable[potentialTarget];
36862
36897
  var subpath = moduleName.substring(potentialTarget.length);
36863
- return loadModuleFromTargetImportOrExport(target, subpath, false);
36898
+ return loadModuleFromTargetImportOrExport(target, subpath, false, potentialTarget);
36864
36899
  }
36865
36900
  }
36866
36901
  function matchesPatternWithTrailer(target, name) {
@@ -36874,7 +36909,7 @@ var ts;
36874
36909
  }
36875
36910
  function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
36876
36911
  return loadModuleFromTargetImportOrExport;
36877
- function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
36912
+ function loadModuleFromTargetImportOrExport(target, subpath, pattern, key) {
36878
36913
  if (typeof target === "string") {
36879
36914
  if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
36880
36915
  if (state.traceEnabled) {
@@ -36885,6 +36920,8 @@ var ts;
36885
36920
  if (!ts.startsWith(target, "./")) {
36886
36921
  if (isImports && !ts.startsWith(target, "../") && !ts.startsWith(target, "/") && !ts.isRootedDiskPath(target)) {
36887
36922
  var combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath;
36923
+ traceIfEnabled(state, ts.Diagnostics.Using_0_subpath_1_with_target_2, "imports", key, combinedLookup);
36924
+ traceIfEnabled(state, ts.Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/");
36888
36925
  var result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache, [extensions], redirectedReference);
36889
36926
  return toSearchResult(result.resolvedModule ? { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension, packageId: result.resolvedModule.packageId, originalPath: result.resolvedModule.originalPath } : undefined);
36890
36927
  }
@@ -36909,6 +36946,9 @@ var ts;
36909
36946
  }
36910
36947
  return toSearchResult(undefined);
36911
36948
  }
36949
+ if (state.traceEnabled) {
36950
+ trace(state.host, ts.Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath);
36951
+ }
36912
36952
  var finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
36913
36953
  var inputLink = tryLoadInputFileForPath(finalPath, subpath, ts.combinePaths(scope.packageDirectory, "package.json"), isImports);
36914
36954
  if (inputLink)
@@ -36918,14 +36958,18 @@ var ts;
36918
36958
  else if (typeof target === "object" && target !== null) {
36919
36959
  if (!Array.isArray(target)) {
36920
36960
  for (var _i = 0, _a = ts.getOwnKeys(target); _i < _a.length; _i++) {
36921
- var key = _a[_i];
36922
- if (key === "default" || state.conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(state.conditions, key)) {
36923
- var subTarget = target[key];
36924
- var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
36961
+ var condition = _a[_i];
36962
+ if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) {
36963
+ traceIfEnabled(state, ts.Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
36964
+ var subTarget = target[condition];
36965
+ var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
36925
36966
  if (result) {
36926
36967
  return result;
36927
36968
  }
36928
36969
  }
36970
+ else {
36971
+ traceIfEnabled(state, ts.Diagnostics.Saw_non_matching_condition_0, condition);
36972
+ }
36929
36973
  }
36930
36974
  return undefined;
36931
36975
  }
@@ -36938,7 +36982,7 @@ var ts;
36938
36982
  }
36939
36983
  for (var _b = 0, target_2 = target; _b < target_2.length; _b++) {
36940
36984
  var elem = target_2[_b];
36941
- var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
36985
+ var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern, key);
36942
36986
  if (result) {
36943
36987
  return result;
36944
36988
  }
@@ -37289,6 +37333,15 @@ var ts;
37289
37333
  function toSearchResult(value) {
37290
37334
  return value !== undefined ? { value: value } : undefined;
37291
37335
  }
37336
+ function traceIfEnabled(state, diagnostic) {
37337
+ var args = [];
37338
+ for (var _i = 2; _i < arguments.length; _i++) {
37339
+ args[_i - 2] = arguments[_i];
37340
+ }
37341
+ if (state.traceEnabled) {
37342
+ trace.apply(void 0, __spreadArray([state.host, diagnostic], args, false));
37343
+ }
37344
+ }
37292
37345
  })(ts || (ts = {}));
37293
37346
  var ts;
37294
37347
  (function (ts) {
@@ -45842,7 +45895,7 @@ var ts;
45842
45895
  if (!e.propertyName) {
45843
45896
  var indices = ts.indicesOf(statements);
45844
45897
  var associatedIndices = ts.filter(indices, function (i) { return ts.nodeHasName(statements[i], e.name); });
45845
- if (ts.length(associatedIndices) && ts.every(associatedIndices, function (i) { return canHaveExportModifier(statements[i]); })) {
45898
+ if (ts.length(associatedIndices) && ts.every(associatedIndices, function (i) { return ts.canHaveExportModifier(statements[i]); })) {
45846
45899
  for (var _i = 0, associatedIndices_1 = associatedIndices; _i < associatedIndices_1.length; _i++) {
45847
45900
  var index_1 = associatedIndices_1[_i];
45848
45901
  statements[index_1] = addExportModifier(statements[index_1]);
@@ -45872,15 +45925,6 @@ var ts;
45872
45925
  }
45873
45926
  return statements;
45874
45927
  }
45875
- function canHaveExportModifier(node) {
45876
- return ts.isEnumDeclaration(node) ||
45877
- ts.isVariableStatement(node) ||
45878
- ts.isFunctionDeclaration(node) ||
45879
- ts.isClassDeclaration(node) ||
45880
- (ts.isModuleDeclaration(node) && !ts.isExternalModuleAugmentation(node) && !ts.isGlobalScopeAugmentation(node)) ||
45881
- ts.isInterfaceDeclaration(node) ||
45882
- isTypeDeclaration(node);
45883
- }
45884
45928
  function addExportModifier(node) {
45885
45929
  var flags = (ts.getEffectiveModifierFlags(node) | 1) & ~2;
45886
45930
  return ts.factory.updateModifiers(node, flags);
@@ -46065,7 +46109,7 @@ var ts;
46065
46109
  (ts.isJSDocTypeAlias(context.enclosingDeclaration) ? ts.getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration);
46066
46110
  if (additionalModifierFlags & 1 &&
46067
46111
  enclosingDeclaration_1 && (isExportingScope(enclosingDeclaration_1) || ts.isModuleDeclaration(enclosingDeclaration_1)) &&
46068
- canHaveExportModifier(node)) {
46112
+ ts.canHaveExportModifier(node)) {
46069
46113
  newModifierFlags |= 1;
46070
46114
  }
46071
46115
  if (addingDeclare && !(newModifierFlags & 1) &&
@@ -53135,18 +53179,18 @@ var ts;
53135
53179
  var result;
53136
53180
  var extraTypes;
53137
53181
  var tailCount = 0;
53138
- var _loop_20 = function () {
53182
+ while (true) {
53139
53183
  if (tailCount === 1000) {
53140
53184
  error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
53141
53185
  result = errorType;
53142
- return "break";
53186
+ break;
53143
53187
  }
53144
53188
  var isUnwrapped = isTypicalNondistributiveConditional(root);
53145
53189
  var checkType = instantiateType(unwrapNondistributiveConditionalTuple(root, getActualTypeVariable(root.checkType)), mapper);
53146
53190
  var checkTypeInstantiable = isGenericType(checkType);
53147
53191
  var extendsType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), mapper);
53148
53192
  if (checkType === wildcardType || extendsType === wildcardType) {
53149
- return { value: wildcardType };
53193
+ return wildcardType;
53150
53194
  }
53151
53195
  var combinedMapper = void 0;
53152
53196
  if (root.inferTypeParameters) {
@@ -53162,7 +53206,7 @@ var ts;
53162
53206
  }
53163
53207
  }
53164
53208
  }
53165
- if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) {
53209
+ if (!checkTypeInstantiable) {
53166
53210
  inferTypes(context.inferences, checkType, instantiateType(extendsType, freshMapper), 512 | 1024);
53167
53211
  }
53168
53212
  var innerMapper = combineTypeMappers(freshMapper, context.mapper);
@@ -53179,23 +53223,23 @@ var ts;
53179
53223
  var newRoot = falseType_1.root;
53180
53224
  if (newRoot.node.parent === root.node && (!newRoot.isDistributive || newRoot.checkType === root.checkType)) {
53181
53225
  root = newRoot;
53182
- return "continue";
53226
+ continue;
53183
53227
  }
53184
53228
  if (canTailRecurse(falseType_1, mapper)) {
53185
- return "continue";
53229
+ continue;
53186
53230
  }
53187
53231
  }
53188
53232
  result = instantiateType(falseType_1, mapper);
53189
- return "break";
53233
+ break;
53190
53234
  }
53191
53235
  if (inferredExtendsType.flags & 3 || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(inferredExtendsType))) {
53192
53236
  var trueType_1 = getTypeFromTypeNode(root.node.trueType);
53193
53237
  var trueMapper = combinedMapper || mapper;
53194
53238
  if (canTailRecurse(trueType_1, trueMapper)) {
53195
- return "continue";
53239
+ continue;
53196
53240
  }
53197
53241
  result = instantiateType(trueType_1, trueMapper);
53198
- return "break";
53242
+ break;
53199
53243
  }
53200
53244
  }
53201
53245
  result = createType(16777216);
@@ -53206,14 +53250,7 @@ var ts;
53206
53250
  result.combinedMapper = combinedMapper;
53207
53251
  result.aliasSymbol = aliasSymbol || root.aliasSymbol;
53208
53252
  result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(root.aliasTypeArguments, mapper);
53209
- return "break";
53210
- };
53211
- while (true) {
53212
- var state_6 = _loop_20();
53213
- if (typeof state_6 === "object")
53214
- return state_6.value;
53215
- if (state_6 === "break")
53216
- break;
53253
+ break;
53217
53254
  }
53218
53255
  return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
53219
53256
  function canTailRecurse(newType, newMapper) {
@@ -55429,7 +55466,7 @@ var ts;
55429
55466
  return 0;
55430
55467
  }
55431
55468
  }
55432
- var isPerformingCommonPropertyChecks = (relation !== comparableRelation || !(source.flags & 1048576) && isLiteralType(source)) &&
55469
+ var isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source)) &&
55433
55470
  !(intersectionState & 2) &&
55434
55471
  source.flags & (131068 | 524288 | 2097152) && source !== globalObjectType &&
55435
55472
  target.flags & (524288 | 2097152) && isWeakType(target) &&
@@ -55457,12 +55494,6 @@ var ts;
55457
55494
  var result_7 = skipCaching ?
55458
55495
  unionOrIntersectionRelatedTo(source, target, reportErrors, intersectionState) :
55459
55496
  recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags);
55460
- if (result_7 && !inPropertyCheck && (target.flags & 2097152 && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) ||
55461
- isNonGenericObjectType(target) && !isArrayOrTupleType(target) && source.flags & 2097152 && getApparentType(source).flags & 3670016 && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 262144); }))) {
55462
- inPropertyCheck = true;
55463
- result_7 &= recursiveTypeRelatedTo(source, target, reportErrors, 4, recursionFlags);
55464
- inPropertyCheck = false;
55465
- }
55466
55497
  if (result_7) {
55467
55498
  return result_7;
55468
55499
  }
@@ -55571,7 +55602,7 @@ var ts;
55571
55602
  reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
55572
55603
  checkTypes = reducedTarget.flags & 1048576 ? reducedTarget.types : [reducedTarget];
55573
55604
  }
55574
- var _loop_21 = function (prop) {
55605
+ var _loop_20 = function (prop) {
55575
55606
  if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
55576
55607
  if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
55577
55608
  if (reportErrors) {
@@ -55624,9 +55655,9 @@ var ts;
55624
55655
  };
55625
55656
  for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
55626
55657
  var prop = _b[_i];
55627
- var state_7 = _loop_21(prop);
55628
- if (typeof state_7 === "object")
55629
- return state_7.value;
55658
+ var state_6 = _loop_20(prop);
55659
+ if (typeof state_6 === "object")
55660
+ return state_6.value;
55630
55661
  }
55631
55662
  return false;
55632
55663
  }
@@ -55806,8 +55837,7 @@ var ts;
55806
55837
  if (overflow) {
55807
55838
  return 0;
55808
55839
  }
55809
- var keyIntersectionState = intersectionState | (inPropertyCheck ? 8 : 0);
55810
- var id = getRelationKey(source, target, keyIntersectionState, relation, false);
55840
+ var id = getRelationKey(source, target, intersectionState, relation, false);
55811
55841
  var entry = relation.get(id);
55812
55842
  if (entry !== undefined) {
55813
55843
  if (reportErrors && entry & 2 && !(entry & 4)) {
@@ -55831,7 +55861,7 @@ var ts;
55831
55861
  targetStack = [];
55832
55862
  }
55833
55863
  else {
55834
- var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, keyIntersectionState, relation, true) : undefined;
55864
+ var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, intersectionState, relation, true) : undefined;
55835
55865
  for (var i = 0; i < maybeCount; i++) {
55836
55866
  if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
55837
55867
  return 3;
@@ -55913,10 +55943,18 @@ var ts;
55913
55943
  function structuredTypeRelatedTo(source, target, reportErrors, intersectionState) {
55914
55944
  var saveErrorInfo = captureErrorCalculationState();
55915
55945
  var result = structuredTypeRelatedToWorker(source, target, reportErrors, intersectionState, saveErrorInfo);
55916
- if (!result && (source.flags & 2097152 || source.flags & 262144 && target.flags & 1048576)) {
55917
- var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 ? source.types : [source], !!(target.flags & 1048576));
55918
- if (constraint && !(constraint.flags & 131072) && everyType(constraint, function (c) { return c !== source; })) {
55919
- result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState);
55946
+ if (relation !== identityRelation) {
55947
+ if (!result && (source.flags & 2097152 || source.flags & 262144 && target.flags & 1048576)) {
55948
+ var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 ? source.types : [source], !!(target.flags & 1048576));
55949
+ if (constraint && !(constraint.flags & 131072) && everyType(constraint, function (c) { return c !== source; })) {
55950
+ result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState);
55951
+ }
55952
+ }
55953
+ if (result && !inPropertyCheck && (target.flags & 2097152 && !isGenericObjectType(target) && source.flags & (524288 | 2097152) ||
55954
+ isNonGenericObjectType(target) && !isArrayOrTupleType(target) && source.flags & 2097152 && getApparentType(source).flags & 3670016 && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 262144); }))) {
55955
+ inPropertyCheck = true;
55956
+ result &= propertiesRelatedTo(source, target, reportErrors, undefined, 0);
55957
+ inPropertyCheck = false;
55920
55958
  }
55921
55959
  }
55922
55960
  if (result) {
@@ -55925,9 +55963,6 @@ var ts;
55925
55963
  return result;
55926
55964
  }
55927
55965
  function structuredTypeRelatedToWorker(source, target, reportErrors, intersectionState, saveErrorInfo) {
55928
- if (intersectionState & 4) {
55929
- return propertiesRelatedTo(source, target, reportErrors, undefined, 0);
55930
- }
55931
55966
  var result;
55932
55967
  var originalErrorInfo;
55933
55968
  var varianceCheckFailed = false;
@@ -56403,11 +56438,11 @@ var ts;
56403
56438
  }
56404
56439
  var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
56405
56440
  var matchingTypes = [];
56406
- var _loop_22 = function (combination) {
56441
+ var _loop_21 = function (combination) {
56407
56442
  var hasMatch = false;
56408
56443
  outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
56409
56444
  var type = _d[_c];
56410
- var _loop_23 = function (i) {
56445
+ var _loop_22 = function (i) {
56411
56446
  var sourceProperty = sourcePropertiesFiltered[i];
56412
56447
  var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
56413
56448
  if (!targetProperty)
@@ -56420,8 +56455,8 @@ var ts;
56420
56455
  }
56421
56456
  };
56422
56457
  for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
56423
- var state_9 = _loop_23(i);
56424
- switch (state_9) {
56458
+ var state_8 = _loop_22(i);
56459
+ switch (state_8) {
56425
56460
  case "continue-outer": continue outer;
56426
56461
  }
56427
56462
  }
@@ -56434,9 +56469,9 @@ var ts;
56434
56469
  };
56435
56470
  for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
56436
56471
  var combination = discriminantCombinations_1[_a];
56437
- var state_8 = _loop_22(combination);
56438
- if (typeof state_8 === "object")
56439
- return state_8.value;
56472
+ var state_7 = _loop_21(combination);
56473
+ if (typeof state_7 === "object")
56474
+ return state_7.value;
56440
56475
  }
56441
56476
  var result = -1;
56442
56477
  for (var _b = 0, matchingTypes_1 = matchingTypes; _b < matchingTypes_1.length; _b++) {
@@ -57078,7 +57113,7 @@ var ts;
57078
57113
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes", "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
57079
57114
  links.variances = ts.emptyArray;
57080
57115
  var variances = [];
57081
- var _loop_24 = function (tp) {
57116
+ var _loop_23 = function (tp) {
57082
57117
  var modifiers = getVarianceModifiers(tp);
57083
57118
  var variance = modifiers & 65536 ?
57084
57119
  modifiers & 32768 ? 0 : 1 :
@@ -57109,7 +57144,7 @@ var ts;
57109
57144
  };
57110
57145
  for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
57111
57146
  var tp = typeParameters_2[_i];
57112
- _loop_24(tp);
57147
+ _loop_23(tp);
57113
57148
  }
57114
57149
  links.variances = variances;
57115
57150
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop({ variances: variances.map(ts.Debug.formatVariance) });
@@ -58754,7 +58789,7 @@ var ts;
58754
58789
  var matches = inferTypesFromTemplateLiteralType(source, target);
58755
58790
  var types = target.types;
58756
58791
  if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
58757
- var _loop_25 = function (i) {
58792
+ var _loop_24 = function (i) {
58758
58793
  var source_1 = matches ? matches[i] : neverType;
58759
58794
  var target_3 = types[i];
58760
58795
  if (source_1.flags & 128 && target_3.flags & 8650752) {
@@ -58798,7 +58833,7 @@ var ts;
58798
58833
  inferFromTypes(source_1, target_3);
58799
58834
  };
58800
58835
  for (var i = 0; i < types.length; i++) {
58801
- _loop_25(i);
58836
+ _loop_24(i);
58802
58837
  }
58803
58838
  }
58804
58839
  }
@@ -59278,7 +59313,7 @@ var ts;
59278
59313
  function mapTypesByKeyProperty(types, name) {
59279
59314
  var map = new ts.Map();
59280
59315
  var count = 0;
59281
- var _loop_26 = function (type) {
59316
+ var _loop_25 = function (type) {
59282
59317
  if (type.flags & (524288 | 2097152 | 58982400)) {
59283
59318
  var discriminant = getTypeOfPropertyOfType(type, name);
59284
59319
  if (discriminant) {
@@ -59304,9 +59339,9 @@ var ts;
59304
59339
  };
59305
59340
  for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
59306
59341
  var type = types_15[_i];
59307
- var state_10 = _loop_26(type);
59308
- if (typeof state_10 === "object")
59309
- return state_10.value;
59342
+ var state_9 = _loop_25(type);
59343
+ if (typeof state_9 === "object")
59344
+ return state_9.value;
59310
59345
  }
59311
59346
  return count >= 10 && count * 2 >= types.length ? map : undefined;
59312
59347
  }
@@ -64808,7 +64843,7 @@ var ts;
64808
64843
  var spreadIndex = getSpreadArgumentIndex(args);
64809
64844
  if (spreadIndex >= 0) {
64810
64845
  var effectiveArgs_1 = args.slice(0, spreadIndex);
64811
- var _loop_27 = function (i) {
64846
+ var _loop_26 = function (i) {
64812
64847
  var arg = args[i];
64813
64848
  var spreadType = arg.kind === 227 && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
64814
64849
  if (spreadType && isTupleType(spreadType)) {
@@ -64824,7 +64859,7 @@ var ts;
64824
64859
  }
64825
64860
  };
64826
64861
  for (var i = spreadIndex; i < args.length; i++) {
64827
- _loop_27(i);
64862
+ _loop_26(i);
64828
64863
  }
64829
64864
  return effectiveArgs_1;
64830
64865
  }
@@ -65074,7 +65109,7 @@ var ts;
65074
65109
  var min_3 = Number.MAX_VALUE;
65075
65110
  var minIndex = 0;
65076
65111
  var i_1 = 0;
65077
- var _loop_28 = function (c) {
65112
+ var _loop_27 = function (c) {
65078
65113
  var chain_2 = function () { return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
65079
65114
  var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0, true, chain_2);
65080
65115
  if (diags_2) {
@@ -65092,7 +65127,7 @@ var ts;
65092
65127
  };
65093
65128
  for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
65094
65129
  var c = candidatesForArgumentError_1[_a];
65095
- _loop_28(c);
65130
+ _loop_27(c);
65096
65131
  }
65097
65132
  var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
65098
65133
  ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
@@ -65235,7 +65270,7 @@ var ts;
65235
65270
  }
65236
65271
  var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
65237
65272
  var parameters = [];
65238
- var _loop_29 = function (i) {
65273
+ var _loop_28 = function (i) {
65239
65274
  var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
65240
65275
  i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
65241
65276
  i < s.parameters.length ? s.parameters[i] : undefined; });
@@ -65243,7 +65278,7 @@ var ts;
65243
65278
  parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
65244
65279
  };
65245
65280
  for (var i = 0; i < maxNonRestParam; i++) {
65246
- _loop_29(i);
65281
+ _loop_28(i);
65247
65282
  }
65248
65283
  var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
65249
65284
  var flags = 0;
@@ -68873,7 +68908,7 @@ var ts;
68873
68908
  var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
68874
68909
  if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
68875
68910
  var indexSignatureMap_1 = new ts.Map();
68876
- var _loop_30 = function (declaration) {
68911
+ var _loop_29 = function (declaration) {
68877
68912
  if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
68878
68913
  forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
68879
68914
  var entry = indexSignatureMap_1.get(getTypeId(type));
@@ -68888,7 +68923,7 @@ var ts;
68888
68923
  };
68889
68924
  for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
68890
68925
  var declaration = _a[_i];
68891
- _loop_30(declaration);
68926
+ _loop_29(declaration);
68892
68927
  }
68893
68928
  indexSignatureMap_1.forEach(function (entry) {
68894
68929
  if (entry.declarations.length > 1) {
@@ -69134,7 +69169,7 @@ var ts;
69134
69169
  }
69135
69170
  var symbol = getNodeLinks(node).resolvedSymbol;
69136
69171
  if (symbol) {
69137
- if (ts.some(symbol.declarations, function (d) { return isTypeDeclaration(d) && !!(d.flags & 268435456); })) {
69172
+ if (ts.some(symbol.declarations, function (d) { return ts.isTypeDeclaration(d) && !!(d.flags & 268435456); })) {
69138
69173
  addDeprecatedSuggestion(getDeprecatedSuggestionNode(node), symbol.declarations, symbol.escapedName);
69139
69174
  }
69140
69175
  if (type.flags & 32 && symbol.flags & 8) {
@@ -70255,7 +70290,7 @@ var ts;
70255
70290
  }
70256
70291
  function errorUnusedLocal(declaration, name, addDiagnostic) {
70257
70292
  var node = ts.getNameOfDeclaration(declaration) || declaration;
70258
- var message = isTypeDeclaration(declaration) ? ts.Diagnostics._0_is_declared_but_never_used : ts.Diagnostics._0_is_declared_but_its_value_is_never_read;
70293
+ var message = ts.isTypeDeclaration(declaration) ? ts.Diagnostics._0_is_declared_but_never_used : ts.Diagnostics._0_is_declared_but_its_value_is_never_read;
70259
70294
  addDiagnostic(declaration, 0, ts.createDiagnosticForNode(node, message, name));
70260
70295
  }
70261
70296
  function isIdentifierThatStartsWithUnderscore(node) {
@@ -71834,7 +71869,7 @@ var ts;
71834
71869
  var propDeclaration = declaration && declaration.kind === 223 ||
71835
71870
  name && name.kind === 164 ? declaration : undefined;
71836
71871
  var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
71837
- var _loop_31 = function (info) {
71872
+ var _loop_30 = function (info) {
71838
71873
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
71839
71874
  var errorNode = localPropDeclaration || localIndexDeclaration ||
71840
71875
  (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
@@ -71848,7 +71883,7 @@ var ts;
71848
71883
  };
71849
71884
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
71850
71885
  var info = indexInfos_9[_i];
71851
- _loop_31(info);
71886
+ _loop_30(info);
71852
71887
  }
71853
71888
  }
71854
71889
  function checkIndexConstraintForIndexSignature(type, checkInfo) {
@@ -71856,7 +71891,7 @@ var ts;
71856
71891
  var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
71857
71892
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 ? ts.getDeclarationOfKind(type.symbol, 261) : undefined;
71858
71893
  var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
71859
- var _loop_32 = function (info) {
71894
+ var _loop_31 = function (info) {
71860
71895
  if (info === checkInfo)
71861
71896
  return "continue";
71862
71897
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
@@ -71868,7 +71903,7 @@ var ts;
71868
71903
  };
71869
71904
  for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
71870
71905
  var info = indexInfos_10[_i];
71871
- _loop_32(info);
71906
+ _loop_31(info);
71872
71907
  }
71873
71908
  }
71874
71909
  function checkTypeNameIsReserved(name, message) {
@@ -71918,7 +71953,7 @@ var ts;
71918
71953
  }
71919
71954
  else {
71920
71955
  ts.forEach(jsdocParameters, function (_a, index) {
71921
- var name = _a.name;
71956
+ var name = _a.name, isNameFirst = _a.isNameFirst;
71922
71957
  if (excludedParameters.has(index) || ts.isIdentifier(name) && parameters.has(name.escapedText)) {
71923
71958
  return;
71924
71959
  }
@@ -71928,7 +71963,9 @@ var ts;
71928
71963
  }
71929
71964
  }
71930
71965
  else {
71931
- errorOrSuggestion(isJs, name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(name));
71966
+ if (!isNameFirst) {
71967
+ errorOrSuggestion(isJs, name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(name));
71968
+ }
71932
71969
  }
71933
71970
  });
71934
71971
  }
@@ -72163,7 +72200,7 @@ var ts;
72163
72200
  var baseTypes = baseTypeNode && getBaseTypes(type);
72164
72201
  var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
72165
72202
  var baseStaticType = getBaseConstructorTypeOfClass(type);
72166
- var _loop_33 = function (member) {
72203
+ var _loop_32 = function (member) {
72167
72204
  if (ts.hasAmbientModifier(member)) {
72168
72205
  return "continue";
72169
72206
  }
@@ -72178,7 +72215,7 @@ var ts;
72178
72215
  };
72179
72216
  for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
72180
72217
  var member = _a[_i];
72181
- _loop_33(member);
72218
+ _loop_32(member);
72182
72219
  }
72183
72220
  }
72184
72221
  function checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, memberIsParameterProperty, reportErrors) {
@@ -72253,7 +72290,7 @@ var ts;
72253
72290
  }
72254
72291
  function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
72255
72292
  var issuedMemberError = false;
72256
- var _loop_34 = function (member) {
72293
+ var _loop_33 = function (member) {
72257
72294
  if (ts.isStatic(member)) {
72258
72295
  return "continue";
72259
72296
  }
@@ -72271,7 +72308,7 @@ var ts;
72271
72308
  };
72272
72309
  for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
72273
72310
  var member = _a[_i];
72274
- _loop_34(member);
72311
+ _loop_33(member);
72275
72312
  }
72276
72313
  if (!issuedMemberError) {
72277
72314
  checkTypeAssignableTo(typeWithThis, baseWithThis, node.name || node, broadDiag);
@@ -72318,7 +72355,7 @@ var ts;
72318
72355
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
72319
72356
  var _a, _b, _c, _d;
72320
72357
  var baseProperties = getPropertiesOfType(baseType);
72321
- var _loop_35 = function (baseProperty) {
72358
+ var _loop_34 = function (baseProperty) {
72322
72359
  var base = getTargetSymbol(baseProperty);
72323
72360
  if (base.flags & 4194304) {
72324
72361
  return "continue";
@@ -72416,8 +72453,8 @@ var ts;
72416
72453
  };
72417
72454
  basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
72418
72455
  var baseProperty = baseProperties_1[_i];
72419
- var state_11 = _loop_35(baseProperty);
72420
- switch (state_11) {
72456
+ var state_10 = _loop_34(baseProperty);
72457
+ switch (state_10) {
72421
72458
  case "continue-basePropertyCheck": continue basePropertyCheck;
72422
72459
  }
72423
72460
  }
@@ -73975,29 +74012,9 @@ var ts;
73975
74012
  }
73976
74013
  function isTypeDeclarationName(name) {
73977
74014
  return name.kind === 79 &&
73978
- isTypeDeclaration(name.parent) &&
74015
+ ts.isTypeDeclaration(name.parent) &&
73979
74016
  ts.getNameOfDeclaration(name.parent) === name;
73980
74017
  }
73981
- function isTypeDeclaration(node) {
73982
- switch (node.kind) {
73983
- case 165:
73984
- case 260:
73985
- case 261:
73986
- case 262:
73987
- case 263:
73988
- case 348:
73989
- case 341:
73990
- case 342:
73991
- return true;
73992
- case 270:
73993
- return node.isTypeOnly;
73994
- case 273:
73995
- case 278:
73996
- return node.parent.parent.isTypeOnly;
73997
- default:
73998
- return false;
73999
- }
74000
- }
74001
74018
  function isTypeReferenceIdentifier(node) {
74002
74019
  while (node.parent.kind === 163) {
74003
74020
  node = node.parent;
@@ -74392,7 +74409,7 @@ var ts;
74392
74409
  var baseType = ts.firstOrUndefined(getBaseTypes(classType));
74393
74410
  return baseType ? getTypeWithThisArgument(baseType, classType.thisType) : errorType;
74394
74411
  }
74395
- if (isTypeDeclaration(node)) {
74412
+ if (ts.isTypeDeclaration(node)) {
74396
74413
  var symbol = getSymbolOfNode(node);
74397
74414
  return getDeclaredTypeOfSymbol(symbol);
74398
74415
  }
@@ -103786,7 +103803,7 @@ var ts;
103786
103803
  importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
103787
103804
  });
103788
103805
  var sortedPaths = [];
103789
- var _loop_36 = function (directory) {
103806
+ var _loop_35 = function (directory) {
103790
103807
  var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
103791
103808
  var pathsInDirectory;
103792
103809
  allFileNames.forEach(function (_a, fileName) {
@@ -103810,9 +103827,9 @@ var ts;
103810
103827
  };
103811
103828
  var out_directory_1;
103812
103829
  for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
103813
- var state_12 = _loop_36(directory);
103830
+ var state_11 = _loop_35(directory);
103814
103831
  directory = out_directory_1;
103815
- if (state_12 === "break")
103832
+ if (state_11 === "break")
103816
103833
  break;
103817
103834
  }
103818
103835
  if (allFileNames.size) {
@@ -103871,7 +103888,7 @@ var ts;
103871
103888
  }
103872
103889
  function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) {
103873
103890
  for (var key in paths) {
103874
- var _loop_37 = function (patternText_1) {
103891
+ var _loop_36 = function (patternText_1) {
103875
103892
  var pattern = ts.normalizePath(patternText_1);
103876
103893
  var indexOfStar = pattern.indexOf("*");
103877
103894
  var candidates = allowedEndings.map(function (ending) { return ({
@@ -103902,9 +103919,9 @@ var ts;
103902
103919
  };
103903
103920
  for (var _i = 0, _a = paths[key]; _i < _a.length; _i++) {
103904
103921
  var patternText_1 = _a[_i];
103905
- var state_13 = _loop_37(patternText_1);
103906
- if (typeof state_13 === "object")
103907
- return state_13.value;
103922
+ var state_12 = _loop_36(patternText_1);
103923
+ if (typeof state_12 === "object")
103924
+ return state_12.value;
103908
103925
  }
103909
103926
  }
103910
103927
  function validateEnding(_a) {