@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/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.2";
21
- var version = `${versionMajorMinor}.0-insiders.20230802`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230803`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -44357,7 +44357,7 @@ function createTypeChecker(host) {
44357
44357
  return symbol;
44358
44358
  }
44359
44359
  if (symbol.flags & 2097152 /* Alias */) {
44360
- const targetFlags = getAllSymbolFlags(symbol);
44360
+ const targetFlags = getSymbolFlags(symbol);
44361
44361
  if (targetFlags & meaning) {
44362
44362
  return symbol;
44363
44363
  }
@@ -45117,7 +45117,7 @@ function createTypeChecker(host) {
45117
45117
  /*isUse*/
45118
45118
  false
45119
45119
  ));
45120
- const allFlags = symbol && getAllSymbolFlags(symbol);
45120
+ const allFlags = symbol && getSymbolFlags(symbol);
45121
45121
  if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {
45122
45122
  const rawName = unescapeLeadingUnderscores(name);
45123
45123
  if (isES2015OrLaterConstructorName(name)) {
@@ -45853,11 +45853,23 @@ function createTypeChecker(host) {
45853
45853
  }
45854
45854
  return void 0;
45855
45855
  }
45856
- function getAllSymbolFlags(symbol) {
45857
- let flags = symbol.flags;
45856
+ function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) {
45857
+ const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol);
45858
+ const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration);
45859
+ const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName(
45860
+ typeOnlyDeclaration.moduleSpecifier,
45861
+ typeOnlyDeclaration.moduleSpecifier,
45862
+ /*ignoreErrors*/
45863
+ true
45864
+ ) : resolveAlias(typeOnlyDeclaration.symbol));
45865
+ const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0;
45866
+ let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags;
45858
45867
  let seenSymbols;
45859
45868
  while (symbol.flags & 2097152 /* Alias */) {
45860
- const target = resolveAlias(symbol);
45869
+ const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
45870
+ if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) {
45871
+ break;
45872
+ }
45861
45873
  if (target === unknownSymbol) {
45862
45874
  return 67108863 /* All */;
45863
45875
  }
@@ -45915,7 +45927,7 @@ function createTypeChecker(host) {
45915
45927
  }
45916
45928
  if (links.typeOnlyDeclaration) {
45917
45929
  const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);
45918
- return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
45930
+ return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
45919
45931
  }
45920
45932
  return void 0;
45921
45933
  }
@@ -45926,7 +45938,11 @@ function createTypeChecker(host) {
45926
45938
  const symbol = getSymbolOfDeclaration(node);
45927
45939
  const target = resolveAlias(symbol);
45928
45940
  if (target) {
45929
- const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */);
45941
+ const markAlias = target === unknownSymbol || getSymbolFlags(
45942
+ symbol,
45943
+ /*excludeTypeOnlyMeanings*/
45944
+ true
45945
+ ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);
45930
45946
  if (markAlias) {
45931
45947
  markAliasSymbolAsReferenced(symbol);
45932
45948
  }
@@ -45941,7 +45957,7 @@ function createTypeChecker(host) {
45941
45957
  if (!node)
45942
45958
  return Debug.fail();
45943
45959
  if (isInternalModuleImportEqualsDeclaration(node)) {
45944
- if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
45960
+ if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
45945
45961
  checkExpressionCached(node.moduleReference);
45946
45962
  }
45947
45963
  }
@@ -46792,7 +46808,7 @@ function createTypeChecker(host) {
46792
46808
  return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
46793
46809
  }
46794
46810
  function symbolIsValue(symbol, includeTypeOnlyMembers) {
46795
- return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
46811
+ return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
46796
46812
  }
46797
46813
  function findConstructorDeclaration(node) {
46798
46814
  const members = node.members;
@@ -47059,7 +47075,7 @@ function createTypeChecker(host) {
47059
47075
  }
47060
47076
  const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);
47061
47077
  symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
47062
- const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
47078
+ const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
47063
47079
  if (flags & meaning) {
47064
47080
  qualify = true;
47065
47081
  return true;
@@ -49921,7 +49937,7 @@ function createTypeChecker(host) {
49921
49937
  return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
49922
49938
  }
49923
49939
  function isTypeOnlyNamespace(symbol) {
49924
- return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
49940
+ return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
49925
49941
  }
49926
49942
  function serializeModule(symbol, symbolName2, modifierFlags) {
49927
49943
  const members = getNamespaceMembersForSerialization(symbol);
@@ -52193,7 +52209,7 @@ function createTypeChecker(host) {
52193
52209
  true
52194
52210
  );
52195
52211
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
52196
- 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;
52212
+ 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;
52197
52213
  }
52198
52214
  return links.type;
52199
52215
  }
@@ -56500,10 +56516,7 @@ function createTypeChecker(host) {
56500
56516
  }
56501
56517
  }
56502
56518
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
56503
- const templates = filter(
56504
- types,
56505
- (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
56506
- );
56519
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
56507
56520
  if (templates.length) {
56508
56521
  let i = types.length;
56509
56522
  while (i > 0) {
@@ -56908,19 +56921,15 @@ function createTypeChecker(host) {
56908
56921
  function getConstituentCountOfTypes(types) {
56909
56922
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
56910
56923
  }
56911
- function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
56912
- if (types.length !== 2) {
56913
- return false;
56914
- }
56915
- const [t1, t2] = types;
56916
- return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
56924
+ function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
56925
+ return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
56917
56926
  }
56918
56927
  function getTypeFromIntersectionTypeNode(node) {
56919
56928
  const links = getNodeLinks(node);
56920
56929
  if (!links.resolvedType) {
56921
56930
  const aliasSymbol = getAliasSymbolForTypeNode(node);
56922
56931
  const types = map(node.types, getTypeFromTypeNode);
56923
- const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
56932
+ const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
56924
56933
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
56925
56934
  }
56926
56935
  return links.resolvedType;
@@ -59810,6 +59819,7 @@ function createTypeChecker(host) {
59810
59819
  let errorInfo;
59811
59820
  let relatedInfo;
59812
59821
  let maybeKeys;
59822
+ let maybeKeysSet;
59813
59823
  let sourceStack;
59814
59824
  let targetStack;
59815
59825
  let maybeCount = 0;
@@ -60679,9 +60689,13 @@ function createTypeChecker(host) {
60679
60689
  }
60680
60690
  if (!maybeKeys) {
60681
60691
  maybeKeys = [];
60692
+ maybeKeysSet = /* @__PURE__ */ new Set();
60682
60693
  sourceStack = [];
60683
60694
  targetStack = [];
60684
60695
  } else {
60696
+ if (maybeKeysSet.has(id)) {
60697
+ return 3 /* Maybe */;
60698
+ }
60685
60699
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
60686
60700
  source2,
60687
60701
  target2,
@@ -60690,10 +60704,8 @@ function createTypeChecker(host) {
60690
60704
  /*ignoreConstraints*/
60691
60705
  true
60692
60706
  ) : void 0;
60693
- for (let i = 0; i < maybeCount; i++) {
60694
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
60695
- return 3 /* Maybe */;
60696
- }
60707
+ if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {
60708
+ return 3 /* Maybe */;
60697
60709
  }
60698
60710
  if (sourceDepth === 100 || targetDepth === 100) {
60699
60711
  overflow = true;
@@ -60702,6 +60714,7 @@ function createTypeChecker(host) {
60702
60714
  }
60703
60715
  const maybeStart = maybeCount;
60704
60716
  maybeKeys[maybeCount] = id;
60717
+ maybeKeysSet.add(id);
60705
60718
  maybeCount++;
60706
60719
  const saveExpandingFlags = expandingFlags;
60707
60720
  if (recursionFlags & 1 /* Source */) {
@@ -60754,17 +60767,34 @@ function createTypeChecker(host) {
60754
60767
  if (result2) {
60755
60768
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
60756
60769
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
60757
- for (let i = maybeStart; i < maybeCount; i++) {
60758
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
60759
- }
60770
+ resetMaybeStack(
60771
+ /*markAllAsSucceeded*/
60772
+ true
60773
+ );
60774
+ } else {
60775
+ resetMaybeStack(
60776
+ /*markAllAsSucceeded*/
60777
+ false
60778
+ );
60760
60779
  }
60761
- maybeCount = maybeStart;
60762
60780
  }
60763
60781
  } else {
60764
60782
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
60765
- maybeCount = maybeStart;
60783
+ resetMaybeStack(
60784
+ /*markAllAsSucceeded*/
60785
+ false
60786
+ );
60766
60787
  }
60767
60788
  return result2;
60789
+ function resetMaybeStack(markAllAsSucceeded) {
60790
+ for (let i = maybeStart; i < maybeCount; i++) {
60791
+ maybeKeysSet.delete(maybeKeys[i]);
60792
+ if (markAllAsSucceeded) {
60793
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
60794
+ }
60795
+ }
60796
+ maybeCount = maybeStart;
60797
+ }
60768
60798
  }
60769
60799
  function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {
60770
60800
  const saveErrorInfo = captureErrorCalculationState();
@@ -63346,9 +63376,6 @@ function createTypeChecker(host) {
63346
63376
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
63347
63377
  return true;
63348
63378
  }
63349
- if (target.flags & 2097152 /* Intersection */) {
63350
- return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
63351
- }
63352
63379
  if (source.flags & 128 /* StringLiteral */) {
63353
63380
  const value = source.value;
63354
63381
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -63359,7 +63386,7 @@ function createTypeChecker(host) {
63359
63386
  value,
63360
63387
  /*roundTripOnly*/
63361
63388
  false
63362
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
63389
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
63363
63390
  }
63364
63391
  if (source.flags & 134217728 /* TemplateLiteral */) {
63365
63392
  const texts = source.texts;
@@ -66211,9 +66238,13 @@ function createTypeChecker(host) {
66211
66238
  symbol,
66212
66239
  /*excludes*/
66213
66240
  111551 /* Value */
66214
- ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) {
66241
+ ) && !isInTypeQuery(location)) {
66215
66242
  const target = resolveAlias(symbol);
66216
- if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
66243
+ if (getSymbolFlags(
66244
+ symbol,
66245
+ /*excludeTypeOnlyMeanings*/
66246
+ true
66247
+ ) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
66217
66248
  if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
66218
66249
  markAliasSymbolAsReferenced(symbol);
66219
66250
  } else {
@@ -77016,9 +77047,6 @@ function createTypeChecker(host) {
77016
77047
  if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) {
77017
77048
  return;
77018
77049
  }
77019
- if (node.kind === 260 /* VariableDeclaration */ && !node.initializer) {
77020
- return;
77021
- }
77022
77050
  const symbol = getSymbolOfDeclaration(node);
77023
77051
  if (symbol.flags & 1 /* FunctionScopedVariable */) {
77024
77052
  if (!isIdentifier(node.name))
@@ -79286,10 +79314,22 @@ function createTypeChecker(host) {
79286
79314
  return +expr.text;
79287
79315
  case 217 /* ParenthesizedExpression */:
79288
79316
  return evaluate(expr.expression, location);
79289
- case 80 /* Identifier */:
79290
- if (isInfinityOrNaNString(expr.escapedText)) {
79291
- return +expr.escapedText;
79317
+ case 80 /* Identifier */: {
79318
+ const identifier = expr;
79319
+ if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName(
79320
+ identifier,
79321
+ 111551 /* Value */,
79322
+ /*ignoreErrors*/
79323
+ true
79324
+ ) === getGlobalSymbol(
79325
+ identifier.escapedText,
79326
+ 111551 /* Value */,
79327
+ /*diagnostic*/
79328
+ void 0
79329
+ )) {
79330
+ return +identifier.escapedText;
79292
79331
  }
79332
+ }
79293
79333
  case 211 /* PropertyAccessExpression */:
79294
79334
  if (isEntityNameExpression(expr)) {
79295
79335
  const symbol = resolveEntityName(
@@ -79628,7 +79668,7 @@ function createTypeChecker(host) {
79628
79668
  }
79629
79669
  return;
79630
79670
  }
79631
- const targetFlags = getAllSymbolFlags(target);
79671
+ const targetFlags = getSymbolFlags(target);
79632
79672
  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);
79633
79673
  if (targetFlags & excludedMeanings) {
79634
79674
  const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
@@ -79786,7 +79826,7 @@ function createTypeChecker(host) {
79786
79826
  if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
79787
79827
  const target = resolveAlias(getSymbolOfDeclaration(node));
79788
79828
  if (target !== unknownSymbol) {
79789
- const targetFlags = getAllSymbolFlags(target);
79829
+ const targetFlags = getSymbolFlags(target);
79790
79830
  if (targetFlags & 111551 /* Value */) {
79791
79831
  const moduleName = getFirstIdentifier(node.moduleReference);
79792
79832
  if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
@@ -79926,7 +79966,7 @@ function createTypeChecker(host) {
79926
79966
  markExportAsReferenced(node);
79927
79967
  }
79928
79968
  const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
79929
- if (!target || getAllSymbolFlags(target) & 111551 /* Value */) {
79969
+ if (!target || getSymbolFlags(target) & 111551 /* Value */) {
79930
79970
  checkExpressionCached(node.propertyName || node.name);
79931
79971
  }
79932
79972
  }
@@ -79971,7 +80011,7 @@ function createTypeChecker(host) {
79971
80011
  ));
79972
80012
  if (sym) {
79973
80013
  markAliasReferenced(sym, id);
79974
- if (getAllSymbolFlags(sym) & 111551 /* Value */) {
80014
+ if (getSymbolFlags(sym) & 111551 /* Value */) {
79975
80015
  checkExpressionCached(id);
79976
80016
  if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
79977
80017
  error(
@@ -81218,7 +81258,7 @@ function createTypeChecker(host) {
81218
81258
  return symbolLinks2.exportsSomeValue;
81219
81259
  function isValue(s) {
81220
81260
  s = resolveSymbol(s);
81221
- return s && !!(getAllSymbolFlags(s) & 111551 /* Value */);
81261
+ return s && !!(getSymbolFlags(s) & 111551 /* Value */);
81222
81262
  }
81223
81263
  }
81224
81264
  function isNameOfModuleOrEnumDeclaration(node) {
@@ -81348,7 +81388,11 @@ function createTypeChecker(host) {
81348
81388
  case 276 /* ImportSpecifier */:
81349
81389
  case 281 /* ExportSpecifier */:
81350
81390
  const symbol = getSymbolOfDeclaration(node);
81351
- return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */);
81391
+ return !!symbol && isAliasResolvedToValue(
81392
+ symbol,
81393
+ /*excludeTypeOnlyValues*/
81394
+ true
81395
+ );
81352
81396
  case 278 /* ExportDeclaration */:
81353
81397
  const exportClause = node.exportClause;
81354
81398
  return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
@@ -81365,7 +81409,7 @@ function createTypeChecker(host) {
81365
81409
  const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
81366
81410
  return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
81367
81411
  }
81368
- function isAliasResolvedToValue(symbol) {
81412
+ function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
81369
81413
  if (!symbol) {
81370
81414
  return false;
81371
81415
  }
@@ -81373,7 +81417,12 @@ function createTypeChecker(host) {
81373
81417
  if (target === unknownSymbol) {
81374
81418
  return true;
81375
81419
  }
81376
- return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
81420
+ return !!(getSymbolFlags(
81421
+ symbol,
81422
+ excludeTypeOnlyValues,
81423
+ /*excludeLocalMeanings*/
81424
+ true
81425
+ ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
81377
81426
  }
81378
81427
  function isConstEnumOrConstEnumOnlyModule(s) {
81379
81428
  return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
@@ -81387,7 +81436,7 @@ function createTypeChecker(host) {
81387
81436
  return true;
81388
81437
  }
81389
81438
  const target = getSymbolLinks(symbol).aliasTarget;
81390
- if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
81439
+ if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
81391
81440
  return true;
81392
81441
  }
81393
81442
  }