@typescript-deploys/pr-build 5.2.0-pr-54188-13 → 5.2.0-pr-55224-37

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/tsserver.js CHANGED
@@ -2331,7 +2331,7 @@ module.exports = __toCommonJS(server_exports);
2331
2331
 
2332
2332
  // src/compiler/corePublic.ts
2333
2333
  var versionMajorMinor = "5.2";
2334
- var version = `${versionMajorMinor}.0-insiders.20230802`;
2334
+ var version = `${versionMajorMinor}.0-insiders.20230803`;
2335
2335
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2336
2336
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2337
2337
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -49068,7 +49068,7 @@ function createTypeChecker(host) {
49068
49068
  return symbol;
49069
49069
  }
49070
49070
  if (symbol.flags & 2097152 /* Alias */) {
49071
- const targetFlags = getAllSymbolFlags(symbol);
49071
+ const targetFlags = getSymbolFlags(symbol);
49072
49072
  if (targetFlags & meaning) {
49073
49073
  return symbol;
49074
49074
  }
@@ -49828,7 +49828,7 @@ function createTypeChecker(host) {
49828
49828
  /*isUse*/
49829
49829
  false
49830
49830
  ));
49831
- const allFlags = symbol && getAllSymbolFlags(symbol);
49831
+ const allFlags = symbol && getSymbolFlags(symbol);
49832
49832
  if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {
49833
49833
  const rawName = unescapeLeadingUnderscores(name);
49834
49834
  if (isES2015OrLaterConstructorName(name)) {
@@ -50564,11 +50564,23 @@ function createTypeChecker(host) {
50564
50564
  }
50565
50565
  return void 0;
50566
50566
  }
50567
- function getAllSymbolFlags(symbol) {
50568
- let flags = symbol.flags;
50567
+ function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) {
50568
+ const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol);
50569
+ const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration);
50570
+ const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName(
50571
+ typeOnlyDeclaration.moduleSpecifier,
50572
+ typeOnlyDeclaration.moduleSpecifier,
50573
+ /*ignoreErrors*/
50574
+ true
50575
+ ) : resolveAlias(typeOnlyDeclaration.symbol));
50576
+ const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0;
50577
+ let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags;
50569
50578
  let seenSymbols;
50570
50579
  while (symbol.flags & 2097152 /* Alias */) {
50571
- const target = resolveAlias(symbol);
50580
+ const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
50581
+ if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) {
50582
+ break;
50583
+ }
50572
50584
  if (target === unknownSymbol) {
50573
50585
  return 67108863 /* All */;
50574
50586
  }
@@ -50626,7 +50638,7 @@ function createTypeChecker(host) {
50626
50638
  }
50627
50639
  if (links.typeOnlyDeclaration) {
50628
50640
  const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);
50629
- return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
50641
+ return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
50630
50642
  }
50631
50643
  return void 0;
50632
50644
  }
@@ -50637,7 +50649,11 @@ function createTypeChecker(host) {
50637
50649
  const symbol = getSymbolOfDeclaration(node);
50638
50650
  const target = resolveAlias(symbol);
50639
50651
  if (target) {
50640
- const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */);
50652
+ const markAlias = target === unknownSymbol || getSymbolFlags(
50653
+ symbol,
50654
+ /*excludeTypeOnlyMeanings*/
50655
+ true
50656
+ ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);
50641
50657
  if (markAlias) {
50642
50658
  markAliasSymbolAsReferenced(symbol);
50643
50659
  }
@@ -50652,7 +50668,7 @@ function createTypeChecker(host) {
50652
50668
  if (!node)
50653
50669
  return Debug.fail();
50654
50670
  if (isInternalModuleImportEqualsDeclaration(node)) {
50655
- if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
50671
+ if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
50656
50672
  checkExpressionCached(node.moduleReference);
50657
50673
  }
50658
50674
  }
@@ -51503,7 +51519,7 @@ function createTypeChecker(host) {
51503
51519
  return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
51504
51520
  }
51505
51521
  function symbolIsValue(symbol, includeTypeOnlyMembers) {
51506
- return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
51522
+ return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
51507
51523
  }
51508
51524
  function findConstructorDeclaration(node) {
51509
51525
  const members = node.members;
@@ -51770,7 +51786,7 @@ function createTypeChecker(host) {
51770
51786
  }
51771
51787
  const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);
51772
51788
  symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
51773
- const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
51789
+ const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
51774
51790
  if (flags & meaning) {
51775
51791
  qualify = true;
51776
51792
  return true;
@@ -54632,7 +54648,7 @@ function createTypeChecker(host) {
54632
54648
  return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
54633
54649
  }
54634
54650
  function isTypeOnlyNamespace(symbol) {
54635
- return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
54651
+ return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
54636
54652
  }
54637
54653
  function serializeModule(symbol, symbolName2, modifierFlags) {
54638
54654
  const members = getNamespaceMembersForSerialization(symbol);
@@ -56904,7 +56920,7 @@ function createTypeChecker(host) {
56904
56920
  true
56905
56921
  );
56906
56922
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
56907
- links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getAllSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
56923
+ links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
56908
56924
  }
56909
56925
  return links.type;
56910
56926
  }
@@ -61211,10 +61227,7 @@ function createTypeChecker(host) {
61211
61227
  }
61212
61228
  }
61213
61229
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
61214
- const templates = filter(
61215
- types,
61216
- (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
61217
- );
61230
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
61218
61231
  if (templates.length) {
61219
61232
  let i = types.length;
61220
61233
  while (i > 0) {
@@ -61619,19 +61632,15 @@ function createTypeChecker(host) {
61619
61632
  function getConstituentCountOfTypes(types) {
61620
61633
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
61621
61634
  }
61622
- function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
61623
- if (types.length !== 2) {
61624
- return false;
61625
- }
61626
- const [t1, t2] = types;
61627
- return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
61635
+ function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
61636
+ return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
61628
61637
  }
61629
61638
  function getTypeFromIntersectionTypeNode(node) {
61630
61639
  const links = getNodeLinks(node);
61631
61640
  if (!links.resolvedType) {
61632
61641
  const aliasSymbol = getAliasSymbolForTypeNode(node);
61633
61642
  const types = map(node.types, getTypeFromTypeNode);
61634
- const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
61643
+ const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
61635
61644
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
61636
61645
  }
61637
61646
  return links.resolvedType;
@@ -64521,6 +64530,7 @@ function createTypeChecker(host) {
64521
64530
  let errorInfo;
64522
64531
  let relatedInfo;
64523
64532
  let maybeKeys;
64533
+ let maybeKeysSet;
64524
64534
  let sourceStack;
64525
64535
  let targetStack;
64526
64536
  let maybeCount = 0;
@@ -65390,9 +65400,13 @@ function createTypeChecker(host) {
65390
65400
  }
65391
65401
  if (!maybeKeys) {
65392
65402
  maybeKeys = [];
65403
+ maybeKeysSet = /* @__PURE__ */ new Set();
65393
65404
  sourceStack = [];
65394
65405
  targetStack = [];
65395
65406
  } else {
65407
+ if (maybeKeysSet.has(id)) {
65408
+ return 3 /* Maybe */;
65409
+ }
65396
65410
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
65397
65411
  source2,
65398
65412
  target2,
@@ -65401,10 +65415,8 @@ function createTypeChecker(host) {
65401
65415
  /*ignoreConstraints*/
65402
65416
  true
65403
65417
  ) : void 0;
65404
- for (let i = 0; i < maybeCount; i++) {
65405
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
65406
- return 3 /* Maybe */;
65407
- }
65418
+ if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {
65419
+ return 3 /* Maybe */;
65408
65420
  }
65409
65421
  if (sourceDepth === 100 || targetDepth === 100) {
65410
65422
  overflow = true;
@@ -65413,6 +65425,7 @@ function createTypeChecker(host) {
65413
65425
  }
65414
65426
  const maybeStart = maybeCount;
65415
65427
  maybeKeys[maybeCount] = id;
65428
+ maybeKeysSet.add(id);
65416
65429
  maybeCount++;
65417
65430
  const saveExpandingFlags = expandingFlags;
65418
65431
  if (recursionFlags & 1 /* Source */) {
@@ -65465,17 +65478,34 @@ function createTypeChecker(host) {
65465
65478
  if (result2) {
65466
65479
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
65467
65480
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
65468
- for (let i = maybeStart; i < maybeCount; i++) {
65469
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
65470
- }
65481
+ resetMaybeStack(
65482
+ /*markAllAsSucceeded*/
65483
+ true
65484
+ );
65485
+ } else {
65486
+ resetMaybeStack(
65487
+ /*markAllAsSucceeded*/
65488
+ false
65489
+ );
65471
65490
  }
65472
- maybeCount = maybeStart;
65473
65491
  }
65474
65492
  } else {
65475
65493
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
65476
- maybeCount = maybeStart;
65494
+ resetMaybeStack(
65495
+ /*markAllAsSucceeded*/
65496
+ false
65497
+ );
65477
65498
  }
65478
65499
  return result2;
65500
+ function resetMaybeStack(markAllAsSucceeded) {
65501
+ for (let i = maybeStart; i < maybeCount; i++) {
65502
+ maybeKeysSet.delete(maybeKeys[i]);
65503
+ if (markAllAsSucceeded) {
65504
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
65505
+ }
65506
+ }
65507
+ maybeCount = maybeStart;
65508
+ }
65479
65509
  }
65480
65510
  function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {
65481
65511
  const saveErrorInfo = captureErrorCalculationState();
@@ -68057,9 +68087,6 @@ function createTypeChecker(host) {
68057
68087
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
68058
68088
  return true;
68059
68089
  }
68060
- if (target.flags & 2097152 /* Intersection */) {
68061
- return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
68062
- }
68063
68090
  if (source.flags & 128 /* StringLiteral */) {
68064
68091
  const value = source.value;
68065
68092
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -68070,7 +68097,7 @@ function createTypeChecker(host) {
68070
68097
  value,
68071
68098
  /*roundTripOnly*/
68072
68099
  false
68073
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
68100
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
68074
68101
  }
68075
68102
  if (source.flags & 134217728 /* TemplateLiteral */) {
68076
68103
  const texts = source.texts;
@@ -70922,9 +70949,13 @@ function createTypeChecker(host) {
70922
70949
  symbol,
70923
70950
  /*excludes*/
70924
70951
  111551 /* Value */
70925
- ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) {
70952
+ ) && !isInTypeQuery(location)) {
70926
70953
  const target = resolveAlias(symbol);
70927
- if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
70954
+ if (getSymbolFlags(
70955
+ symbol,
70956
+ /*excludeTypeOnlyMeanings*/
70957
+ true
70958
+ ) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
70928
70959
  if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
70929
70960
  markAliasSymbolAsReferenced(symbol);
70930
70961
  } else {
@@ -81727,9 +81758,6 @@ function createTypeChecker(host) {
81727
81758
  if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) {
81728
81759
  return;
81729
81760
  }
81730
- if (node.kind === 260 /* VariableDeclaration */ && !node.initializer) {
81731
- return;
81732
- }
81733
81761
  const symbol = getSymbolOfDeclaration(node);
81734
81762
  if (symbol.flags & 1 /* FunctionScopedVariable */) {
81735
81763
  if (!isIdentifier(node.name))
@@ -83997,10 +84025,22 @@ function createTypeChecker(host) {
83997
84025
  return +expr.text;
83998
84026
  case 217 /* ParenthesizedExpression */:
83999
84027
  return evaluate(expr.expression, location);
84000
- case 80 /* Identifier */:
84001
- if (isInfinityOrNaNString(expr.escapedText)) {
84002
- return +expr.escapedText;
84028
+ case 80 /* Identifier */: {
84029
+ const identifier = expr;
84030
+ if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName(
84031
+ identifier,
84032
+ 111551 /* Value */,
84033
+ /*ignoreErrors*/
84034
+ true
84035
+ ) === getGlobalSymbol(
84036
+ identifier.escapedText,
84037
+ 111551 /* Value */,
84038
+ /*diagnostic*/
84039
+ void 0
84040
+ )) {
84041
+ return +identifier.escapedText;
84003
84042
  }
84043
+ }
84004
84044
  case 211 /* PropertyAccessExpression */:
84005
84045
  if (isEntityNameExpression(expr)) {
84006
84046
  const symbol = resolveEntityName(
@@ -84339,7 +84379,7 @@ function createTypeChecker(host) {
84339
84379
  }
84340
84380
  return;
84341
84381
  }
84342
- const targetFlags = getAllSymbolFlags(target);
84382
+ const targetFlags = getSymbolFlags(target);
84343
84383
  const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0);
84344
84384
  if (targetFlags & excludedMeanings) {
84345
84385
  const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
@@ -84497,7 +84537,7 @@ function createTypeChecker(host) {
84497
84537
  if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
84498
84538
  const target = resolveAlias(getSymbolOfDeclaration(node));
84499
84539
  if (target !== unknownSymbol) {
84500
- const targetFlags = getAllSymbolFlags(target);
84540
+ const targetFlags = getSymbolFlags(target);
84501
84541
  if (targetFlags & 111551 /* Value */) {
84502
84542
  const moduleName = getFirstIdentifier(node.moduleReference);
84503
84543
  if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
@@ -84637,7 +84677,7 @@ function createTypeChecker(host) {
84637
84677
  markExportAsReferenced(node);
84638
84678
  }
84639
84679
  const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
84640
- if (!target || getAllSymbolFlags(target) & 111551 /* Value */) {
84680
+ if (!target || getSymbolFlags(target) & 111551 /* Value */) {
84641
84681
  checkExpressionCached(node.propertyName || node.name);
84642
84682
  }
84643
84683
  }
@@ -84682,7 +84722,7 @@ function createTypeChecker(host) {
84682
84722
  ));
84683
84723
  if (sym) {
84684
84724
  markAliasReferenced(sym, id);
84685
- if (getAllSymbolFlags(sym) & 111551 /* Value */) {
84725
+ if (getSymbolFlags(sym) & 111551 /* Value */) {
84686
84726
  checkExpressionCached(id);
84687
84727
  if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
84688
84728
  error2(
@@ -85929,7 +85969,7 @@ function createTypeChecker(host) {
85929
85969
  return symbolLinks2.exportsSomeValue;
85930
85970
  function isValue(s) {
85931
85971
  s = resolveSymbol(s);
85932
- return s && !!(getAllSymbolFlags(s) & 111551 /* Value */);
85972
+ return s && !!(getSymbolFlags(s) & 111551 /* Value */);
85933
85973
  }
85934
85974
  }
85935
85975
  function isNameOfModuleOrEnumDeclaration(node) {
@@ -86059,7 +86099,11 @@ function createTypeChecker(host) {
86059
86099
  case 276 /* ImportSpecifier */:
86060
86100
  case 281 /* ExportSpecifier */:
86061
86101
  const symbol = getSymbolOfDeclaration(node);
86062
- return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */);
86102
+ return !!symbol && isAliasResolvedToValue(
86103
+ symbol,
86104
+ /*excludeTypeOnlyValues*/
86105
+ true
86106
+ );
86063
86107
  case 278 /* ExportDeclaration */:
86064
86108
  const exportClause = node.exportClause;
86065
86109
  return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
@@ -86076,7 +86120,7 @@ function createTypeChecker(host) {
86076
86120
  const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
86077
86121
  return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
86078
86122
  }
86079
- function isAliasResolvedToValue(symbol) {
86123
+ function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
86080
86124
  if (!symbol) {
86081
86125
  return false;
86082
86126
  }
@@ -86084,7 +86128,12 @@ function createTypeChecker(host) {
86084
86128
  if (target === unknownSymbol) {
86085
86129
  return true;
86086
86130
  }
86087
- return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
86131
+ return !!(getSymbolFlags(
86132
+ symbol,
86133
+ excludeTypeOnlyValues,
86134
+ /*excludeLocalMeanings*/
86135
+ true
86136
+ ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
86088
86137
  }
86089
86138
  function isConstEnumOrConstEnumOnlyModule(s) {
86090
86139
  return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
@@ -86098,7 +86147,7 @@ function createTypeChecker(host) {
86098
86147
  return true;
86099
86148
  }
86100
86149
  const target = getSymbolLinks(symbol).aliasTarget;
86101
- if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
86150
+ if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
86102
86151
  return true;
86103
86152
  }
86104
86153
  }
@@ -5832,9 +5832,11 @@ declare namespace ts {
5832
5832
  };
5833
5833
  }) | ExportDeclaration & {
5834
5834
  readonly isTypeOnly: true;
5835
+ readonly moduleSpecifier: Expression;
5835
5836
  } | NamespaceExport & {
5836
5837
  readonly parent: ExportDeclaration & {
5837
5838
  readonly isTypeOnly: true;
5839
+ readonly moduleSpecifier: Expression;
5838
5840
  };
5839
5841
  };
5840
5842
  type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration;