@typescript-deploys/pr-build 5.2.0-pr-54188-13 → 5.2.0-pr-55177-9

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.
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230802`;
38
+ version = `${versionMajorMinor}.0-insiders.20230803`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -46831,7 +46831,7 @@ ${lanes.join("\n")}
46831
46831
  return symbol;
46832
46832
  }
46833
46833
  if (symbol.flags & 2097152 /* Alias */) {
46834
- const targetFlags = getAllSymbolFlags(symbol);
46834
+ const targetFlags = getSymbolFlags(symbol);
46835
46835
  if (targetFlags & meaning) {
46836
46836
  return symbol;
46837
46837
  }
@@ -47591,7 +47591,7 @@ ${lanes.join("\n")}
47591
47591
  /*isUse*/
47592
47592
  false
47593
47593
  ));
47594
- const allFlags = symbol && getAllSymbolFlags(symbol);
47594
+ const allFlags = symbol && getSymbolFlags(symbol);
47595
47595
  if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {
47596
47596
  const rawName = unescapeLeadingUnderscores(name);
47597
47597
  if (isES2015OrLaterConstructorName(name)) {
@@ -48327,11 +48327,23 @@ ${lanes.join("\n")}
48327
48327
  }
48328
48328
  return void 0;
48329
48329
  }
48330
- function getAllSymbolFlags(symbol) {
48331
- let flags = symbol.flags;
48330
+ function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) {
48331
+ const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol);
48332
+ const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration);
48333
+ const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName(
48334
+ typeOnlyDeclaration.moduleSpecifier,
48335
+ typeOnlyDeclaration.moduleSpecifier,
48336
+ /*ignoreErrors*/
48337
+ true
48338
+ ) : resolveAlias(typeOnlyDeclaration.symbol));
48339
+ const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0;
48340
+ let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags;
48332
48341
  let seenSymbols;
48333
48342
  while (symbol.flags & 2097152 /* Alias */) {
48334
- const target = resolveAlias(symbol);
48343
+ const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
48344
+ if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) {
48345
+ break;
48346
+ }
48335
48347
  if (target === unknownSymbol) {
48336
48348
  return 67108863 /* All */;
48337
48349
  }
@@ -48389,7 +48401,7 @@ ${lanes.join("\n")}
48389
48401
  }
48390
48402
  if (links.typeOnlyDeclaration) {
48391
48403
  const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);
48392
- return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
48404
+ return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
48393
48405
  }
48394
48406
  return void 0;
48395
48407
  }
@@ -48400,7 +48412,11 @@ ${lanes.join("\n")}
48400
48412
  const symbol = getSymbolOfDeclaration(node);
48401
48413
  const target = resolveAlias(symbol);
48402
48414
  if (target) {
48403
- const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */);
48415
+ const markAlias = target === unknownSymbol || getSymbolFlags(
48416
+ symbol,
48417
+ /*excludeTypeOnlyMeanings*/
48418
+ true
48419
+ ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);
48404
48420
  if (markAlias) {
48405
48421
  markAliasSymbolAsReferenced(symbol);
48406
48422
  }
@@ -48415,7 +48431,7 @@ ${lanes.join("\n")}
48415
48431
  if (!node)
48416
48432
  return Debug.fail();
48417
48433
  if (isInternalModuleImportEqualsDeclaration(node)) {
48418
- if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
48434
+ if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
48419
48435
  checkExpressionCached(node.moduleReference);
48420
48436
  }
48421
48437
  }
@@ -49266,7 +49282,7 @@ ${lanes.join("\n")}
49266
49282
  return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
49267
49283
  }
49268
49284
  function symbolIsValue(symbol, includeTypeOnlyMembers) {
49269
- return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
49285
+ return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
49270
49286
  }
49271
49287
  function findConstructorDeclaration(node) {
49272
49288
  const members = node.members;
@@ -49533,7 +49549,7 @@ ${lanes.join("\n")}
49533
49549
  }
49534
49550
  const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);
49535
49551
  symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
49536
- const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
49552
+ const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
49537
49553
  if (flags & meaning) {
49538
49554
  qualify = true;
49539
49555
  return true;
@@ -52395,7 +52411,7 @@ ${lanes.join("\n")}
52395
52411
  return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
52396
52412
  }
52397
52413
  function isTypeOnlyNamespace(symbol) {
52398
- return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
52414
+ return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
52399
52415
  }
52400
52416
  function serializeModule(symbol, symbolName2, modifierFlags) {
52401
52417
  const members = getNamespaceMembersForSerialization(symbol);
@@ -54667,7 +54683,7 @@ ${lanes.join("\n")}
54667
54683
  true
54668
54684
  );
54669
54685
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
54670
- 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;
54686
+ 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;
54671
54687
  }
54672
54688
  return links.type;
54673
54689
  }
@@ -58974,10 +58990,7 @@ ${lanes.join("\n")}
58974
58990
  }
58975
58991
  }
58976
58992
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
58977
- const templates = filter(
58978
- types,
58979
- (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
58980
- );
58993
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
58981
58994
  if (templates.length) {
58982
58995
  let i = types.length;
58983
58996
  while (i > 0) {
@@ -59382,19 +59395,15 @@ ${lanes.join("\n")}
59382
59395
  function getConstituentCountOfTypes(types) {
59383
59396
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
59384
59397
  }
59385
- function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
59386
- if (types.length !== 2) {
59387
- return false;
59388
- }
59389
- const [t1, t2] = types;
59390
- return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
59398
+ function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
59399
+ return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
59391
59400
  }
59392
59401
  function getTypeFromIntersectionTypeNode(node) {
59393
59402
  const links = getNodeLinks(node);
59394
59403
  if (!links.resolvedType) {
59395
59404
  const aliasSymbol = getAliasSymbolForTypeNode(node);
59396
59405
  const types = map(node.types, getTypeFromTypeNode);
59397
- const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
59406
+ const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
59398
59407
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
59399
59408
  }
59400
59409
  return links.resolvedType;
@@ -62284,6 +62293,7 @@ ${lanes.join("\n")}
62284
62293
  let errorInfo;
62285
62294
  let relatedInfo;
62286
62295
  let maybeKeys;
62296
+ let maybeKeysSet;
62287
62297
  let sourceStack;
62288
62298
  let targetStack;
62289
62299
  let maybeCount = 0;
@@ -63153,9 +63163,13 @@ ${lanes.join("\n")}
63153
63163
  }
63154
63164
  if (!maybeKeys) {
63155
63165
  maybeKeys = [];
63166
+ maybeKeysSet = /* @__PURE__ */ new Set();
63156
63167
  sourceStack = [];
63157
63168
  targetStack = [];
63158
63169
  } else {
63170
+ if (maybeKeysSet.has(id)) {
63171
+ return 3 /* Maybe */;
63172
+ }
63159
63173
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
63160
63174
  source2,
63161
63175
  target2,
@@ -63164,10 +63178,8 @@ ${lanes.join("\n")}
63164
63178
  /*ignoreConstraints*/
63165
63179
  true
63166
63180
  ) : void 0;
63167
- for (let i = 0; i < maybeCount; i++) {
63168
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63169
- return 3 /* Maybe */;
63170
- }
63181
+ if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {
63182
+ return 3 /* Maybe */;
63171
63183
  }
63172
63184
  if (sourceDepth === 100 || targetDepth === 100) {
63173
63185
  overflow = true;
@@ -63176,6 +63188,7 @@ ${lanes.join("\n")}
63176
63188
  }
63177
63189
  const maybeStart = maybeCount;
63178
63190
  maybeKeys[maybeCount] = id;
63191
+ maybeKeysSet.add(id);
63179
63192
  maybeCount++;
63180
63193
  const saveExpandingFlags = expandingFlags;
63181
63194
  if (recursionFlags & 1 /* Source */) {
@@ -63228,17 +63241,34 @@ ${lanes.join("\n")}
63228
63241
  if (result2) {
63229
63242
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
63230
63243
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
63231
- for (let i = maybeStart; i < maybeCount; i++) {
63232
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
63233
- }
63244
+ resetMaybeStack(
63245
+ /*markAllAsSucceeded*/
63246
+ true
63247
+ );
63248
+ } else {
63249
+ resetMaybeStack(
63250
+ /*markAllAsSucceeded*/
63251
+ false
63252
+ );
63234
63253
  }
63235
- maybeCount = maybeStart;
63236
63254
  }
63237
63255
  } else {
63238
63256
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
63239
- maybeCount = maybeStart;
63257
+ resetMaybeStack(
63258
+ /*markAllAsSucceeded*/
63259
+ false
63260
+ );
63240
63261
  }
63241
63262
  return result2;
63263
+ function resetMaybeStack(markAllAsSucceeded) {
63264
+ for (let i = maybeStart; i < maybeCount; i++) {
63265
+ maybeKeysSet.delete(maybeKeys[i]);
63266
+ if (markAllAsSucceeded) {
63267
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
63268
+ }
63269
+ }
63270
+ maybeCount = maybeStart;
63271
+ }
63242
63272
  }
63243
63273
  function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {
63244
63274
  const saveErrorInfo = captureErrorCalculationState();
@@ -65820,9 +65850,6 @@ ${lanes.join("\n")}
65820
65850
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
65821
65851
  return true;
65822
65852
  }
65823
- if (target.flags & 2097152 /* Intersection */) {
65824
- return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
65825
- }
65826
65853
  if (source.flags & 128 /* StringLiteral */) {
65827
65854
  const value = source.value;
65828
65855
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -65833,7 +65860,7 @@ ${lanes.join("\n")}
65833
65860
  value,
65834
65861
  /*roundTripOnly*/
65835
65862
  false
65836
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
65863
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
65837
65864
  }
65838
65865
  if (source.flags & 134217728 /* TemplateLiteral */) {
65839
65866
  const texts = source.texts;
@@ -68685,9 +68712,13 @@ ${lanes.join("\n")}
68685
68712
  symbol,
68686
68713
  /*excludes*/
68687
68714
  111551 /* Value */
68688
- ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) {
68715
+ ) && !isInTypeQuery(location)) {
68689
68716
  const target = resolveAlias(symbol);
68690
- if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
68717
+ if (getSymbolFlags(
68718
+ symbol,
68719
+ /*excludeTypeOnlyMeanings*/
68720
+ true
68721
+ ) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
68691
68722
  if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
68692
68723
  markAliasSymbolAsReferenced(symbol);
68693
68724
  } else {
@@ -69755,7 +69786,7 @@ ${lanes.join("\n")}
69755
69786
  } else if (t.flags & 3670016 /* StructuredType */) {
69756
69787
  const prop = getPropertyOfType(t, name);
69757
69788
  if (prop) {
69758
- return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
69789
+ return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */));
69759
69790
  }
69760
69791
  if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
69761
69792
  const restType = getElementTypeOfSliceOfTupleType(
@@ -69840,7 +69871,7 @@ ${lanes.join("\n")}
69840
69871
  (t) => {
69841
69872
  if (isTupleType(t)) {
69842
69873
  if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) {
69843
- return getTypeArguments(t)[index];
69874
+ return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */));
69844
69875
  }
69845
69876
  const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0;
69846
69877
  const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0;
@@ -79490,9 +79521,6 @@ ${lanes.join("\n")}
79490
79521
  if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) {
79491
79522
  return;
79492
79523
  }
79493
- if (node.kind === 260 /* VariableDeclaration */ && !node.initializer) {
79494
- return;
79495
- }
79496
79524
  const symbol = getSymbolOfDeclaration(node);
79497
79525
  if (symbol.flags & 1 /* FunctionScopedVariable */) {
79498
79526
  if (!isIdentifier(node.name))
@@ -81760,10 +81788,22 @@ ${lanes.join("\n")}
81760
81788
  return +expr.text;
81761
81789
  case 217 /* ParenthesizedExpression */:
81762
81790
  return evaluate(expr.expression, location);
81763
- case 80 /* Identifier */:
81764
- if (isInfinityOrNaNString(expr.escapedText)) {
81765
- return +expr.escapedText;
81791
+ case 80 /* Identifier */: {
81792
+ const identifier = expr;
81793
+ if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName(
81794
+ identifier,
81795
+ 111551 /* Value */,
81796
+ /*ignoreErrors*/
81797
+ true
81798
+ ) === getGlobalSymbol(
81799
+ identifier.escapedText,
81800
+ 111551 /* Value */,
81801
+ /*diagnostic*/
81802
+ void 0
81803
+ )) {
81804
+ return +identifier.escapedText;
81766
81805
  }
81806
+ }
81767
81807
  case 211 /* PropertyAccessExpression */:
81768
81808
  if (isEntityNameExpression(expr)) {
81769
81809
  const symbol = resolveEntityName(
@@ -82102,7 +82142,7 @@ ${lanes.join("\n")}
82102
82142
  }
82103
82143
  return;
82104
82144
  }
82105
- const targetFlags = getAllSymbolFlags(target);
82145
+ const targetFlags = getSymbolFlags(target);
82106
82146
  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);
82107
82147
  if (targetFlags & excludedMeanings) {
82108
82148
  const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
@@ -82260,7 +82300,7 @@ ${lanes.join("\n")}
82260
82300
  if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
82261
82301
  const target = resolveAlias(getSymbolOfDeclaration(node));
82262
82302
  if (target !== unknownSymbol) {
82263
- const targetFlags = getAllSymbolFlags(target);
82303
+ const targetFlags = getSymbolFlags(target);
82264
82304
  if (targetFlags & 111551 /* Value */) {
82265
82305
  const moduleName = getFirstIdentifier(node.moduleReference);
82266
82306
  if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
@@ -82400,7 +82440,7 @@ ${lanes.join("\n")}
82400
82440
  markExportAsReferenced(node);
82401
82441
  }
82402
82442
  const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
82403
- if (!target || getAllSymbolFlags(target) & 111551 /* Value */) {
82443
+ if (!target || getSymbolFlags(target) & 111551 /* Value */) {
82404
82444
  checkExpressionCached(node.propertyName || node.name);
82405
82445
  }
82406
82446
  }
@@ -82445,7 +82485,7 @@ ${lanes.join("\n")}
82445
82485
  ));
82446
82486
  if (sym) {
82447
82487
  markAliasReferenced(sym, id);
82448
- if (getAllSymbolFlags(sym) & 111551 /* Value */) {
82488
+ if (getSymbolFlags(sym) & 111551 /* Value */) {
82449
82489
  checkExpressionCached(id);
82450
82490
  if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
82451
82491
  error2(
@@ -83692,7 +83732,7 @@ ${lanes.join("\n")}
83692
83732
  return symbolLinks2.exportsSomeValue;
83693
83733
  function isValue(s) {
83694
83734
  s = resolveSymbol(s);
83695
- return s && !!(getAllSymbolFlags(s) & 111551 /* Value */);
83735
+ return s && !!(getSymbolFlags(s) & 111551 /* Value */);
83696
83736
  }
83697
83737
  }
83698
83738
  function isNameOfModuleOrEnumDeclaration(node) {
@@ -83822,7 +83862,11 @@ ${lanes.join("\n")}
83822
83862
  case 276 /* ImportSpecifier */:
83823
83863
  case 281 /* ExportSpecifier */:
83824
83864
  const symbol = getSymbolOfDeclaration(node);
83825
- return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */);
83865
+ return !!symbol && isAliasResolvedToValue(
83866
+ symbol,
83867
+ /*excludeTypeOnlyValues*/
83868
+ true
83869
+ );
83826
83870
  case 278 /* ExportDeclaration */:
83827
83871
  const exportClause = node.exportClause;
83828
83872
  return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
@@ -83839,7 +83883,7 @@ ${lanes.join("\n")}
83839
83883
  const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
83840
83884
  return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
83841
83885
  }
83842
- function isAliasResolvedToValue(symbol) {
83886
+ function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
83843
83887
  if (!symbol) {
83844
83888
  return false;
83845
83889
  }
@@ -83847,7 +83891,12 @@ ${lanes.join("\n")}
83847
83891
  if (target === unknownSymbol) {
83848
83892
  return true;
83849
83893
  }
83850
- return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
83894
+ return !!(getSymbolFlags(
83895
+ symbol,
83896
+ excludeTypeOnlyValues,
83897
+ /*excludeLocalMeanings*/
83898
+ true
83899
+ ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
83851
83900
  }
83852
83901
  function isConstEnumOrConstEnumOnlyModule(s) {
83853
83902
  return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
@@ -83861,7 +83910,7 @@ ${lanes.join("\n")}
83861
83910
  return true;
83862
83911
  }
83863
83912
  const target = getSymbolLinks(symbol).aliasTarget;
83864
- if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
83913
+ if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
83865
83914
  return true;
83866
83915
  }
83867
83916
  }
@@ -1774,9 +1774,11 @@ declare namespace ts {
1774
1774
  };
1775
1775
  }) | ExportDeclaration & {
1776
1776
  readonly isTypeOnly: true;
1777
+ readonly moduleSpecifier: Expression;
1777
1778
  } | NamespaceExport & {
1778
1779
  readonly parent: ExportDeclaration & {
1779
1780
  readonly isTypeOnly: true;
1781
+ readonly moduleSpecifier: Expression;
1780
1782
  };
1781
1783
  };
1782
1784
  type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration;