@typescript-deploys/pr-build 5.5.0-pr-58404-2 → 5.5.0-pr-58326-8

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.
Files changed (3) hide show
  1. package/lib/tsc.js +106 -106
  2. package/lib/typescript.js +107 -107
  3. package/package.json +1 -1
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.5";
21
- var version = `${versionMajorMinor}.0-insiders.20240503`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240506`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -16360,6 +16360,8 @@ function getAllAccessorDeclarations(declarations, accessor) {
16360
16360
  function getEffectiveTypeAnnotationNode(node) {
16361
16361
  if (!isInJSFile(node) && isFunctionDeclaration(node))
16362
16362
  return void 0;
16363
+ if (isTypeAliasDeclaration(node))
16364
+ return void 0;
16363
16365
  const type = node.type;
16364
16366
  if (type || !isInJSFile(node))
16365
16367
  return type;
@@ -46667,7 +46669,12 @@ function createTypeChecker(host) {
46667
46669
  if (resolvedTarget === unknownSymbol) {
46668
46670
  return source;
46669
46671
  }
46670
- target = cloneSymbol(resolvedTarget);
46672
+ if (!(resolvedTarget.flags & getExcludedSymbolFlags(source.flags)) || (source.flags | resolvedTarget.flags) & 67108864 /* Assignment */) {
46673
+ target = cloneSymbol(resolvedTarget);
46674
+ } else {
46675
+ reportMergeSymbolError(target, source);
46676
+ return source;
46677
+ }
46671
46678
  }
46672
46679
  if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
46673
46680
  target.constEnumOnlyModule = false;
@@ -46699,31 +46706,34 @@ function createTypeChecker(host) {
46699
46706
  );
46700
46707
  }
46701
46708
  } else {
46702
- const isEitherEnum = !!(target.flags & 384 /* Enum */ || source.flags & 384 /* Enum */);
46703
- const isEitherBlockScoped = !!(target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */);
46709
+ reportMergeSymbolError(target, source);
46710
+ }
46711
+ return target;
46712
+ function reportMergeSymbolError(target2, source2) {
46713
+ const isEitherEnum = !!(target2.flags & 384 /* Enum */ || source2.flags & 384 /* Enum */);
46714
+ const isEitherBlockScoped = !!(target2.flags & 2 /* BlockScopedVariable */ || source2.flags & 2 /* BlockScopedVariable */);
46704
46715
  const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;
46705
- const sourceSymbolFile = source.declarations && getSourceFileOfNode(source.declarations[0]);
46706
- const targetSymbolFile = target.declarations && getSourceFileOfNode(target.declarations[0]);
46716
+ const sourceSymbolFile = source2.declarations && getSourceFileOfNode(source2.declarations[0]);
46717
+ const targetSymbolFile = target2.declarations && getSourceFileOfNode(target2.declarations[0]);
46707
46718
  const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);
46708
46719
  const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);
46709
- const symbolName2 = symbolToString(source);
46720
+ const symbolName2 = symbolToString(source2);
46710
46721
  if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
46711
46722
  const firstFile = comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
46712
46723
  const secondFile = firstFile === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
46713
46724
  const filesDuplicates = getOrUpdate(amalgamatedDuplicates, `${firstFile.path}|${secondFile.path}`, () => ({ firstFile, secondFile, conflictingSymbols: /* @__PURE__ */ new Map() }));
46714
46725
  const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName2, () => ({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] }));
46715
46726
  if (!isSourcePlainJs)
46716
- addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
46727
+ addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source2);
46717
46728
  if (!isTargetPlainJs)
46718
- addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
46729
+ addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target2);
46719
46730
  } else {
46720
46731
  if (!isSourcePlainJs)
46721
- addDuplicateDeclarationErrorsForSymbols(source, message, symbolName2, target);
46732
+ addDuplicateDeclarationErrorsForSymbols(source2, message, symbolName2, target2);
46722
46733
  if (!isTargetPlainJs)
46723
- addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source);
46734
+ addDuplicateDeclarationErrorsForSymbols(target2, message, symbolName2, source2);
46724
46735
  }
46725
46736
  }
46726
- return target;
46727
46737
  function addDuplicateLocations(locs, symbol) {
46728
46738
  if (symbol.declarations) {
46729
46739
  for (const decl of symbol.declarations) {
@@ -114209,13 +114219,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114209
114219
  }
114210
114220
  }
114211
114221
  function emitComputedPropertyName(node) {
114212
- const savedPrivateNameTempFlags = privateNameTempFlags;
114213
- const savedReservedMemberNames = reservedPrivateNames;
114214
- popPrivateNameGenerationScope();
114215
114222
  writePunctuation("[");
114216
114223
  emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);
114217
114224
  writePunctuation("]");
114218
- pushPrivateNameGenerationScope(savedPrivateNameTempFlags, savedReservedMemberNames);
114219
114225
  }
114220
114226
  function emitTypeParameter(node) {
114221
114227
  emitModifierList(node, node.modifiers);
@@ -114276,15 +114282,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114276
114282
  writeTrailingSemicolon();
114277
114283
  }
114278
114284
  function emitMethodSignature(node) {
114279
- pushNameGenerationScope(node);
114280
114285
  emitModifierList(node, node.modifiers);
114281
114286
  emit(node.name);
114282
114287
  emit(node.questionToken);
114283
- emitTypeParameters(node, node.typeParameters);
114284
- emitParameters(node, node.parameters);
114285
- emitTypeAnnotation(node.type);
114286
- writeTrailingSemicolon();
114287
- popNameGenerationScope(node);
114288
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
114288
114289
  }
114289
114290
  function emitMethodDeclaration(node) {
114290
114291
  emitDecoratorsAndModifiers(
@@ -114296,11 +114297,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114296
114297
  emit(node.asteriskToken);
114297
114298
  emit(node.name);
114298
114299
  emit(node.questionToken);
114299
- emitSignatureAndBody(node, emitSignatureHead);
114300
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
114300
114301
  }
114301
114302
  function emitClassStaticBlockDeclaration(node) {
114302
114303
  writeKeyword("static");
114304
+ pushNameGenerationScope(node);
114303
114305
  emitBlockFunctionBody(node.body);
114306
+ popNameGenerationScope(node);
114304
114307
  }
114305
114308
  function emitConstructor(node) {
114306
114309
  emitDecoratorsAndModifiers(
@@ -114310,7 +114313,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114310
114313
  false
114311
114314
  );
114312
114315
  writeKeyword("constructor");
114313
- emitSignatureAndBody(node, emitSignatureHead);
114316
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
114314
114317
  }
114315
114318
  function emitAccessorDeclaration(node) {
114316
114319
  const pos = emitDecoratorsAndModifiers(
@@ -114323,25 +114326,15 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114323
114326
  emitTokenWithComment(token, pos, writeKeyword, node);
114324
114327
  writeSpace();
114325
114328
  emit(node.name);
114326
- emitSignatureAndBody(node, emitSignatureHead);
114329
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
114327
114330
  }
114328
114331
  function emitCallSignature(node) {
114329
- pushNameGenerationScope(node);
114330
- emitTypeParameters(node, node.typeParameters);
114331
- emitParameters(node, node.parameters);
114332
- emitTypeAnnotation(node.type);
114333
- writeTrailingSemicolon();
114334
- popNameGenerationScope(node);
114332
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
114335
114333
  }
114336
114334
  function emitConstructSignature(node) {
114337
- pushNameGenerationScope(node);
114338
114335
  writeKeyword("new");
114339
114336
  writeSpace();
114340
- emitTypeParameters(node, node.typeParameters);
114341
- emitParameters(node, node.parameters);
114342
- emitTypeAnnotation(node.type);
114343
- writeTrailingSemicolon();
114344
- popNameGenerationScope(node);
114337
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
114345
114338
  }
114346
114339
  function emitIndexSignature(node) {
114347
114340
  emitDecoratorsAndModifiers(
@@ -114379,14 +114372,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114379
114372
  emitTypeArguments(node, node.typeArguments);
114380
114373
  }
114381
114374
  function emitFunctionType(node) {
114382
- pushNameGenerationScope(node);
114375
+ emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
114376
+ }
114377
+ function emitFunctionTypeHead(node) {
114383
114378
  emitTypeParameters(node, node.typeParameters);
114384
114379
  emitParametersForArrow(node, node.parameters);
114385
114380
  writeSpace();
114386
114381
  writePunctuation("=>");
114382
+ }
114383
+ function emitFunctionTypeBody(node) {
114387
114384
  writeSpace();
114388
114385
  emit(node.type);
114389
- popNameGenerationScope(node);
114390
114386
  }
114391
114387
  function emitJSDocFunctionType(node) {
114392
114388
  writeKeyword("function");
@@ -114407,17 +114403,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114407
114403
  writePunctuation("=");
114408
114404
  }
114409
114405
  function emitConstructorType(node) {
114410
- pushNameGenerationScope(node);
114411
114406
  emitModifierList(node, node.modifiers);
114412
114407
  writeKeyword("new");
114413
114408
  writeSpace();
114414
- emitTypeParameters(node, node.typeParameters);
114415
- emitParameters(node, node.parameters);
114416
- writeSpace();
114417
- writePunctuation("=>");
114418
- writeSpace();
114419
- emit(node.type);
114420
- popNameGenerationScope(node);
114409
+ emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
114421
114410
  }
114422
114411
  function emitTypeQuery(node) {
114423
114412
  writeKeyword("typeof");
@@ -114426,16 +114415,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114426
114415
  emitTypeArguments(node, node.typeArguments);
114427
114416
  }
114428
114417
  function emitTypeLiteral(node) {
114429
- pushPrivateNameGenerationScope(
114430
- 0 /* Auto */,
114431
- /*newReservedMemberNames*/
114432
- void 0
114433
- );
114418
+ pushNameGenerationScope(node);
114419
+ forEach(node.members, generateMemberNames);
114434
114420
  writePunctuation("{");
114435
114421
  const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineTypeLiteralMembers */ : 32897 /* MultiLineTypeLiteralMembers */;
114436
114422
  emitList(node, node.members, flags | 524288 /* NoSpaceIfEmpty */);
114437
114423
  writePunctuation("}");
114438
- popPrivateNameGenerationScope();
114424
+ popNameGenerationScope(node);
114439
114425
  }
114440
114426
  function emitArrayType(node) {
114441
114427
  emit(node.elementType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType);
@@ -114607,11 +114593,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114607
114593
  emitExpressionList(node, elements, 8914 /* ArrayLiteralExpressionElements */ | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma);
114608
114594
  }
114609
114595
  function emitObjectLiteralExpression(node) {
114610
- pushPrivateNameGenerationScope(
114611
- 0 /* Auto */,
114612
- /*newReservedMemberNames*/
114613
- void 0
114614
- );
114596
+ pushNameGenerationScope(node);
114615
114597
  forEach(node.properties, generateMemberNames);
114616
114598
  const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
114617
114599
  if (indentedFlag) {
@@ -114623,7 +114605,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114623
114605
  if (indentedFlag) {
114624
114606
  decreaseIndent();
114625
114607
  }
114626
- popPrivateNameGenerationScope();
114608
+ popNameGenerationScope(node);
114627
114609
  }
114628
114610
  function emitPropertyAccessExpression(node) {
114629
114611
  emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
@@ -114738,7 +114720,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114738
114720
  }
114739
114721
  function emitArrowFunction(node) {
114740
114722
  emitModifierList(node, node.modifiers);
114741
- emitSignatureAndBody(node, emitArrowFunctionHead);
114723
+ emitSignatureAndBody(node, emitArrowFunctionHead, emitArrowFunctionBody);
114742
114724
  }
114743
114725
  function emitArrowFunctionHead(node) {
114744
114726
  emitTypeParameters(node, node.typeParameters);
@@ -114747,6 +114729,14 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114747
114729
  writeSpace();
114748
114730
  emit(node.equalsGreaterThanToken);
114749
114731
  }
114732
+ function emitArrowFunctionBody(node) {
114733
+ if (isBlock(node.body)) {
114734
+ emitBlockFunctionBody(node.body);
114735
+ } else {
114736
+ writeSpace();
114737
+ emitExpression(node.body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
114738
+ }
114739
+ }
114750
114740
  function emitDeleteExpression(node) {
114751
114741
  emitTokenWithComment(91 /* DeleteKeyword */, node.pos, writeKeyword, node);
114752
114742
  writeSpace();
@@ -115294,35 +115284,33 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115294
115284
  emit(node.asteriskToken);
115295
115285
  writeSpace();
115296
115286
  emitIdentifierName(node.name);
115297
- emitSignatureAndBody(node, emitSignatureHead);
115287
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
115298
115288
  }
115299
- function emitSignatureAndBody(node, emitSignatureHead2) {
115289
+ function emitSignatureAndBody(node, emitSignatureHead2, emitBody) {
115290
+ const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
115291
+ if (indentedFlag) {
115292
+ increaseIndent();
115293
+ }
115294
+ pushNameGenerationScope(node);
115295
+ forEach(node.parameters, generateNames);
115296
+ emitSignatureHead2(node);
115297
+ emitBody(node);
115298
+ popNameGenerationScope(node);
115299
+ if (indentedFlag) {
115300
+ decreaseIndent();
115301
+ }
115302
+ }
115303
+ function emitFunctionBody(node) {
115300
115304
  const body = node.body;
115301
115305
  if (body) {
115302
- if (isBlock(body)) {
115303
- const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
115304
- if (indentedFlag) {
115305
- increaseIndent();
115306
- }
115307
- pushNameGenerationScope(node);
115308
- forEach(node.parameters, generateNames);
115309
- generateNames(node.body);
115310
- emitSignatureHead2(node);
115311
- emitBlockFunctionBody(body);
115312
- popNameGenerationScope(node);
115313
- if (indentedFlag) {
115314
- decreaseIndent();
115315
- }
115316
- } else {
115317
- emitSignatureHead2(node);
115318
- writeSpace();
115319
- emitExpression(body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
115320
- }
115306
+ emitBlockFunctionBody(body);
115321
115307
  } else {
115322
- emitSignatureHead2(node);
115323
115308
  writeTrailingSemicolon();
115324
115309
  }
115325
115310
  }
115311
+ function emitEmptyFunctionBody(_node) {
115312
+ writeTrailingSemicolon();
115313
+ }
115326
115314
  function emitSignatureHead(node) {
115327
115315
  emitTypeParameters(node, node.typeParameters);
115328
115316
  emitParameters(node, node.parameters);
@@ -115351,6 +115339,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115351
115339
  return true;
115352
115340
  }
115353
115341
  function emitBlockFunctionBody(body) {
115342
+ generateNames(body);
115354
115343
  onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(body);
115355
115344
  writeSpace();
115356
115345
  writePunctuation("{");
@@ -115391,12 +115380,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115391
115380
  emitClassDeclarationOrExpression(node);
115392
115381
  }
115393
115382
  function emitClassDeclarationOrExpression(node) {
115394
- pushPrivateNameGenerationScope(
115395
- 0 /* Auto */,
115396
- /*newReservedMemberNames*/
115397
- void 0
115398
- );
115399
- forEach(node.members, generateMemberNames);
115400
115383
  emitDecoratorsAndModifiers(
115401
115384
  node,
115402
115385
  node.modifiers,
@@ -115416,19 +115399,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115416
115399
  emitList(node, node.heritageClauses, 0 /* ClassHeritageClauses */);
115417
115400
  writeSpace();
115418
115401
  writePunctuation("{");
115402
+ pushNameGenerationScope(node);
115403
+ forEach(node.members, generateMemberNames);
115419
115404
  emitList(node, node.members, 129 /* ClassMembers */);
115405
+ popNameGenerationScope(node);
115420
115406
  writePunctuation("}");
115421
115407
  if (indentedFlag) {
115422
115408
  decreaseIndent();
115423
115409
  }
115424
- popPrivateNameGenerationScope();
115425
115410
  }
115426
115411
  function emitInterfaceDeclaration(node) {
115427
- pushPrivateNameGenerationScope(
115428
- 0 /* Auto */,
115429
- /*newReservedMemberNames*/
115430
- void 0
115431
- );
115432
115412
  emitDecoratorsAndModifiers(
115433
115413
  node,
115434
115414
  node.modifiers,
@@ -115442,9 +115422,11 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115442
115422
  emitList(node, node.heritageClauses, 512 /* HeritageClauses */);
115443
115423
  writeSpace();
115444
115424
  writePunctuation("{");
115425
+ pushNameGenerationScope(node);
115426
+ forEach(node.members, generateMemberNames);
115445
115427
  emitList(node, node.members, 129 /* InterfaceMembers */);
115428
+ popNameGenerationScope(node);
115446
115429
  writePunctuation("}");
115447
- popPrivateNameGenerationScope();
115448
115430
  }
115449
115431
  function emitTypeAliasDeclaration(node) {
115450
115432
  emitDecoratorsAndModifiers(
@@ -116825,6 +116807,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
116825
116807
  return getLiteralText(node, currentSourceFile, flags);
116826
116808
  }
116827
116809
  function pushNameGenerationScope(node) {
116810
+ privateNameTempFlagsStack.push(privateNameTempFlags);
116811
+ privateNameTempFlags = 0 /* Auto */;
116812
+ reservedPrivateNamesStack.push(reservedPrivateNames);
116828
116813
  if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {
116829
116814
  return;
116830
116815
  }
@@ -116835,6 +116820,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
116835
116820
  reservedNamesStack.push(reservedNames);
116836
116821
  }
116837
116822
  function popNameGenerationScope(node) {
116823
+ privateNameTempFlags = privateNameTempFlagsStack.pop();
116824
+ reservedPrivateNames = reservedPrivateNamesStack.pop();
116838
116825
  if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {
116839
116826
  return;
116840
116827
  }
@@ -116848,16 +116835,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
116848
116835
  }
116849
116836
  reservedNames.add(name);
116850
116837
  }
116851
- function pushPrivateNameGenerationScope(newPrivateNameTempFlags, newReservedMemberNames) {
116852
- privateNameTempFlagsStack.push(privateNameTempFlags);
116853
- privateNameTempFlags = newPrivateNameTempFlags;
116854
- reservedPrivateNamesStack.push(reservedNames);
116855
- reservedPrivateNames = newReservedMemberNames;
116856
- }
116857
- function popPrivateNameGenerationScope() {
116858
- privateNameTempFlags = privateNameTempFlagsStack.pop();
116859
- reservedPrivateNames = reservedPrivateNamesStack.pop();
116860
- }
116861
116838
  function reservePrivateNameInNestedScopes(name) {
116862
116839
  if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) {
116863
116840
  reservedPrivateNames = /* @__PURE__ */ new Set();
@@ -116957,7 +116934,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
116957
116934
  case 303 /* PropertyAssignment */:
116958
116935
  case 304 /* ShorthandPropertyAssignment */:
116959
116936
  case 172 /* PropertyDeclaration */:
116937
+ case 171 /* PropertySignature */:
116960
116938
  case 174 /* MethodDeclaration */:
116939
+ case 173 /* MethodSignature */:
116961
116940
  case 177 /* GetAccessor */:
116962
116941
  case 178 /* SetAccessor */:
116963
116942
  generateNameIfNeeded(node.name);
@@ -116991,7 +116970,28 @@ function createPrinter(printerOptions = {}, handlers = {}) {
116991
116970
  return isFileLevelUniqueNameInCurrentFile(name, privateName) && !isReservedName(name, privateName) && !generatedNames.has(name);
116992
116971
  }
116993
116972
  function isReservedName(name, privateName) {
116994
- return privateName ? !!(reservedPrivateNames == null ? void 0 : reservedPrivateNames.has(name)) : !!(reservedNames == null ? void 0 : reservedNames.has(name));
116973
+ let set;
116974
+ let stack;
116975
+ if (privateName) {
116976
+ set = reservedPrivateNames;
116977
+ stack = reservedPrivateNamesStack;
116978
+ } else {
116979
+ set = reservedNames;
116980
+ stack = reservedNamesStack;
116981
+ }
116982
+ if (set == null ? void 0 : set.has(name)) {
116983
+ return true;
116984
+ }
116985
+ for (let i = stack.length - 1; i >= 0; i--) {
116986
+ if (set === stack[i]) {
116987
+ continue;
116988
+ }
116989
+ set = stack[i];
116990
+ if (set == null ? void 0 : set.has(name)) {
116991
+ return true;
116992
+ }
116993
+ }
116994
+ return false;
116995
116995
  }
116996
116996
  function isFileLevelUniqueNameInCurrentFile(name, _isPrivate) {
116997
116997
  return currentSourceFile ? isFileLevelUniqueName(currentSourceFile, name, hasGlobalName) : true;
package/lib/typescript.js CHANGED
@@ -2364,7 +2364,7 @@ module.exports = __toCommonJS(typescript_exports);
2364
2364
 
2365
2365
  // src/compiler/corePublic.ts
2366
2366
  var versionMajorMinor = "5.5";
2367
- var version = `${versionMajorMinor}.0-insiders.20240503`;
2367
+ var version = `${versionMajorMinor}.0-insiders.20240506`;
2368
2368
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2369
2369
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2370
2370
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -20457,6 +20457,8 @@ function getAllAccessorDeclarations(declarations, accessor) {
20457
20457
  function getEffectiveTypeAnnotationNode(node) {
20458
20458
  if (!isInJSFile(node) && isFunctionDeclaration(node))
20459
20459
  return void 0;
20460
+ if (isTypeAliasDeclaration(node))
20461
+ return void 0;
20460
20462
  const type = node.type;
20461
20463
  if (type || !isInJSFile(node))
20462
20464
  return type;
@@ -51507,7 +51509,12 @@ function createTypeChecker(host) {
51507
51509
  if (resolvedTarget === unknownSymbol) {
51508
51510
  return source;
51509
51511
  }
51510
- target = cloneSymbol(resolvedTarget);
51512
+ if (!(resolvedTarget.flags & getExcludedSymbolFlags(source.flags)) || (source.flags | resolvedTarget.flags) & 67108864 /* Assignment */) {
51513
+ target = cloneSymbol(resolvedTarget);
51514
+ } else {
51515
+ reportMergeSymbolError(target, source);
51516
+ return source;
51517
+ }
51511
51518
  }
51512
51519
  if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
51513
51520
  target.constEnumOnlyModule = false;
@@ -51539,31 +51546,34 @@ function createTypeChecker(host) {
51539
51546
  );
51540
51547
  }
51541
51548
  } else {
51542
- const isEitherEnum = !!(target.flags & 384 /* Enum */ || source.flags & 384 /* Enum */);
51543
- const isEitherBlockScoped = !!(target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */);
51549
+ reportMergeSymbolError(target, source);
51550
+ }
51551
+ return target;
51552
+ function reportMergeSymbolError(target2, source2) {
51553
+ const isEitherEnum = !!(target2.flags & 384 /* Enum */ || source2.flags & 384 /* Enum */);
51554
+ const isEitherBlockScoped = !!(target2.flags & 2 /* BlockScopedVariable */ || source2.flags & 2 /* BlockScopedVariable */);
51544
51555
  const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0;
51545
- const sourceSymbolFile = source.declarations && getSourceFileOfNode(source.declarations[0]);
51546
- const targetSymbolFile = target.declarations && getSourceFileOfNode(target.declarations[0]);
51556
+ const sourceSymbolFile = source2.declarations && getSourceFileOfNode(source2.declarations[0]);
51557
+ const targetSymbolFile = target2.declarations && getSourceFileOfNode(target2.declarations[0]);
51547
51558
  const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);
51548
51559
  const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);
51549
- const symbolName2 = symbolToString(source);
51560
+ const symbolName2 = symbolToString(source2);
51550
51561
  if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
51551
51562
  const firstFile = comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
51552
51563
  const secondFile = firstFile === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
51553
51564
  const filesDuplicates = getOrUpdate(amalgamatedDuplicates, `${firstFile.path}|${secondFile.path}`, () => ({ firstFile, secondFile, conflictingSymbols: /* @__PURE__ */ new Map() }));
51554
51565
  const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName2, () => ({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] }));
51555
51566
  if (!isSourcePlainJs)
51556
- addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
51567
+ addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source2);
51557
51568
  if (!isTargetPlainJs)
51558
- addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
51569
+ addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target2);
51559
51570
  } else {
51560
51571
  if (!isSourcePlainJs)
51561
- addDuplicateDeclarationErrorsForSymbols(source, message, symbolName2, target);
51572
+ addDuplicateDeclarationErrorsForSymbols(source2, message, symbolName2, target2);
51562
51573
  if (!isTargetPlainJs)
51563
- addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source);
51574
+ addDuplicateDeclarationErrorsForSymbols(target2, message, symbolName2, source2);
51564
51575
  }
51565
51576
  }
51566
- return target;
51567
51577
  function addDuplicateLocations(locs, symbol) {
51568
51578
  if (symbol.declarations) {
51569
51579
  for (const decl of symbol.declarations) {
@@ -119247,13 +119257,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119247
119257
  }
119248
119258
  }
119249
119259
  function emitComputedPropertyName(node) {
119250
- const savedPrivateNameTempFlags = privateNameTempFlags;
119251
- const savedReservedMemberNames = reservedPrivateNames;
119252
- popPrivateNameGenerationScope();
119253
119260
  writePunctuation("[");
119254
119261
  emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);
119255
119262
  writePunctuation("]");
119256
- pushPrivateNameGenerationScope(savedPrivateNameTempFlags, savedReservedMemberNames);
119257
119263
  }
119258
119264
  function emitTypeParameter(node) {
119259
119265
  emitModifierList(node, node.modifiers);
@@ -119314,15 +119320,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119314
119320
  writeTrailingSemicolon();
119315
119321
  }
119316
119322
  function emitMethodSignature(node) {
119317
- pushNameGenerationScope(node);
119318
119323
  emitModifierList(node, node.modifiers);
119319
119324
  emit(node.name);
119320
119325
  emit(node.questionToken);
119321
- emitTypeParameters(node, node.typeParameters);
119322
- emitParameters(node, node.parameters);
119323
- emitTypeAnnotation(node.type);
119324
- writeTrailingSemicolon();
119325
- popNameGenerationScope(node);
119326
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
119326
119327
  }
119327
119328
  function emitMethodDeclaration(node) {
119328
119329
  emitDecoratorsAndModifiers(
@@ -119334,11 +119335,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119334
119335
  emit(node.asteriskToken);
119335
119336
  emit(node.name);
119336
119337
  emit(node.questionToken);
119337
- emitSignatureAndBody(node, emitSignatureHead);
119338
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
119338
119339
  }
119339
119340
  function emitClassStaticBlockDeclaration(node) {
119340
119341
  writeKeyword("static");
119342
+ pushNameGenerationScope(node);
119341
119343
  emitBlockFunctionBody(node.body);
119344
+ popNameGenerationScope(node);
119342
119345
  }
119343
119346
  function emitConstructor(node) {
119344
119347
  emitDecoratorsAndModifiers(
@@ -119348,7 +119351,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119348
119351
  false
119349
119352
  );
119350
119353
  writeKeyword("constructor");
119351
- emitSignatureAndBody(node, emitSignatureHead);
119354
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
119352
119355
  }
119353
119356
  function emitAccessorDeclaration(node) {
119354
119357
  const pos = emitDecoratorsAndModifiers(
@@ -119361,25 +119364,15 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119361
119364
  emitTokenWithComment(token, pos, writeKeyword, node);
119362
119365
  writeSpace();
119363
119366
  emit(node.name);
119364
- emitSignatureAndBody(node, emitSignatureHead);
119367
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
119365
119368
  }
119366
119369
  function emitCallSignature(node) {
119367
- pushNameGenerationScope(node);
119368
- emitTypeParameters(node, node.typeParameters);
119369
- emitParameters(node, node.parameters);
119370
- emitTypeAnnotation(node.type);
119371
- writeTrailingSemicolon();
119372
- popNameGenerationScope(node);
119370
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
119373
119371
  }
119374
119372
  function emitConstructSignature(node) {
119375
- pushNameGenerationScope(node);
119376
119373
  writeKeyword("new");
119377
119374
  writeSpace();
119378
- emitTypeParameters(node, node.typeParameters);
119379
- emitParameters(node, node.parameters);
119380
- emitTypeAnnotation(node.type);
119381
- writeTrailingSemicolon();
119382
- popNameGenerationScope(node);
119375
+ emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
119383
119376
  }
119384
119377
  function emitIndexSignature(node) {
119385
119378
  emitDecoratorsAndModifiers(
@@ -119417,14 +119410,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119417
119410
  emitTypeArguments(node, node.typeArguments);
119418
119411
  }
119419
119412
  function emitFunctionType(node) {
119420
- pushNameGenerationScope(node);
119413
+ emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
119414
+ }
119415
+ function emitFunctionTypeHead(node) {
119421
119416
  emitTypeParameters(node, node.typeParameters);
119422
119417
  emitParametersForArrow(node, node.parameters);
119423
119418
  writeSpace();
119424
119419
  writePunctuation("=>");
119420
+ }
119421
+ function emitFunctionTypeBody(node) {
119425
119422
  writeSpace();
119426
119423
  emit(node.type);
119427
- popNameGenerationScope(node);
119428
119424
  }
119429
119425
  function emitJSDocFunctionType(node) {
119430
119426
  writeKeyword("function");
@@ -119445,17 +119441,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119445
119441
  writePunctuation("=");
119446
119442
  }
119447
119443
  function emitConstructorType(node) {
119448
- pushNameGenerationScope(node);
119449
119444
  emitModifierList(node, node.modifiers);
119450
119445
  writeKeyword("new");
119451
119446
  writeSpace();
119452
- emitTypeParameters(node, node.typeParameters);
119453
- emitParameters(node, node.parameters);
119454
- writeSpace();
119455
- writePunctuation("=>");
119456
- writeSpace();
119457
- emit(node.type);
119458
- popNameGenerationScope(node);
119447
+ emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
119459
119448
  }
119460
119449
  function emitTypeQuery(node) {
119461
119450
  writeKeyword("typeof");
@@ -119464,16 +119453,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119464
119453
  emitTypeArguments(node, node.typeArguments);
119465
119454
  }
119466
119455
  function emitTypeLiteral(node) {
119467
- pushPrivateNameGenerationScope(
119468
- 0 /* Auto */,
119469
- /*newReservedMemberNames*/
119470
- void 0
119471
- );
119456
+ pushNameGenerationScope(node);
119457
+ forEach(node.members, generateMemberNames);
119472
119458
  writePunctuation("{");
119473
119459
  const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineTypeLiteralMembers */ : 32897 /* MultiLineTypeLiteralMembers */;
119474
119460
  emitList(node, node.members, flags | 524288 /* NoSpaceIfEmpty */);
119475
119461
  writePunctuation("}");
119476
- popPrivateNameGenerationScope();
119462
+ popNameGenerationScope(node);
119477
119463
  }
119478
119464
  function emitArrayType(node) {
119479
119465
  emit(node.elementType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType);
@@ -119645,11 +119631,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119645
119631
  emitExpressionList(node, elements, 8914 /* ArrayLiteralExpressionElements */ | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma);
119646
119632
  }
119647
119633
  function emitObjectLiteralExpression(node) {
119648
- pushPrivateNameGenerationScope(
119649
- 0 /* Auto */,
119650
- /*newReservedMemberNames*/
119651
- void 0
119652
- );
119634
+ pushNameGenerationScope(node);
119653
119635
  forEach(node.properties, generateMemberNames);
119654
119636
  const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
119655
119637
  if (indentedFlag) {
@@ -119661,7 +119643,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119661
119643
  if (indentedFlag) {
119662
119644
  decreaseIndent();
119663
119645
  }
119664
- popPrivateNameGenerationScope();
119646
+ popNameGenerationScope(node);
119665
119647
  }
119666
119648
  function emitPropertyAccessExpression(node) {
119667
119649
  emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
@@ -119776,7 +119758,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119776
119758
  }
119777
119759
  function emitArrowFunction(node) {
119778
119760
  emitModifierList(node, node.modifiers);
119779
- emitSignatureAndBody(node, emitArrowFunctionHead);
119761
+ emitSignatureAndBody(node, emitArrowFunctionHead, emitArrowFunctionBody);
119780
119762
  }
119781
119763
  function emitArrowFunctionHead(node) {
119782
119764
  emitTypeParameters(node, node.typeParameters);
@@ -119785,6 +119767,14 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119785
119767
  writeSpace();
119786
119768
  emit(node.equalsGreaterThanToken);
119787
119769
  }
119770
+ function emitArrowFunctionBody(node) {
119771
+ if (isBlock(node.body)) {
119772
+ emitBlockFunctionBody(node.body);
119773
+ } else {
119774
+ writeSpace();
119775
+ emitExpression(node.body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
119776
+ }
119777
+ }
119788
119778
  function emitDeleteExpression(node) {
119789
119779
  emitTokenWithComment(91 /* DeleteKeyword */, node.pos, writeKeyword, node);
119790
119780
  writeSpace();
@@ -120332,35 +120322,33 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120332
120322
  emit(node.asteriskToken);
120333
120323
  writeSpace();
120334
120324
  emitIdentifierName(node.name);
120335
- emitSignatureAndBody(node, emitSignatureHead);
120325
+ emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
120336
120326
  }
120337
- function emitSignatureAndBody(node, emitSignatureHead2) {
120327
+ function emitSignatureAndBody(node, emitSignatureHead2, emitBody) {
120328
+ const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
120329
+ if (indentedFlag) {
120330
+ increaseIndent();
120331
+ }
120332
+ pushNameGenerationScope(node);
120333
+ forEach(node.parameters, generateNames);
120334
+ emitSignatureHead2(node);
120335
+ emitBody(node);
120336
+ popNameGenerationScope(node);
120337
+ if (indentedFlag) {
120338
+ decreaseIndent();
120339
+ }
120340
+ }
120341
+ function emitFunctionBody(node) {
120338
120342
  const body = node.body;
120339
120343
  if (body) {
120340
- if (isBlock(body)) {
120341
- const indentedFlag = getEmitFlags(node) & 131072 /* Indented */;
120342
- if (indentedFlag) {
120343
- increaseIndent();
120344
- }
120345
- pushNameGenerationScope(node);
120346
- forEach(node.parameters, generateNames);
120347
- generateNames(node.body);
120348
- emitSignatureHead2(node);
120349
- emitBlockFunctionBody(body);
120350
- popNameGenerationScope(node);
120351
- if (indentedFlag) {
120352
- decreaseIndent();
120353
- }
120354
- } else {
120355
- emitSignatureHead2(node);
120356
- writeSpace();
120357
- emitExpression(body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
120358
- }
120344
+ emitBlockFunctionBody(body);
120359
120345
  } else {
120360
- emitSignatureHead2(node);
120361
120346
  writeTrailingSemicolon();
120362
120347
  }
120363
120348
  }
120349
+ function emitEmptyFunctionBody(_node) {
120350
+ writeTrailingSemicolon();
120351
+ }
120364
120352
  function emitSignatureHead(node) {
120365
120353
  emitTypeParameters(node, node.typeParameters);
120366
120354
  emitParameters(node, node.parameters);
@@ -120389,6 +120377,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120389
120377
  return true;
120390
120378
  }
120391
120379
  function emitBlockFunctionBody(body) {
120380
+ generateNames(body);
120392
120381
  onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(body);
120393
120382
  writeSpace();
120394
120383
  writePunctuation("{");
@@ -120429,12 +120418,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120429
120418
  emitClassDeclarationOrExpression(node);
120430
120419
  }
120431
120420
  function emitClassDeclarationOrExpression(node) {
120432
- pushPrivateNameGenerationScope(
120433
- 0 /* Auto */,
120434
- /*newReservedMemberNames*/
120435
- void 0
120436
- );
120437
- forEach(node.members, generateMemberNames);
120438
120421
  emitDecoratorsAndModifiers(
120439
120422
  node,
120440
120423
  node.modifiers,
@@ -120454,19 +120437,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120454
120437
  emitList(node, node.heritageClauses, 0 /* ClassHeritageClauses */);
120455
120438
  writeSpace();
120456
120439
  writePunctuation("{");
120440
+ pushNameGenerationScope(node);
120441
+ forEach(node.members, generateMemberNames);
120457
120442
  emitList(node, node.members, 129 /* ClassMembers */);
120443
+ popNameGenerationScope(node);
120458
120444
  writePunctuation("}");
120459
120445
  if (indentedFlag) {
120460
120446
  decreaseIndent();
120461
120447
  }
120462
- popPrivateNameGenerationScope();
120463
120448
  }
120464
120449
  function emitInterfaceDeclaration(node) {
120465
- pushPrivateNameGenerationScope(
120466
- 0 /* Auto */,
120467
- /*newReservedMemberNames*/
120468
- void 0
120469
- );
120470
120450
  emitDecoratorsAndModifiers(
120471
120451
  node,
120472
120452
  node.modifiers,
@@ -120480,9 +120460,11 @@ function createPrinter(printerOptions = {}, handlers = {}) {
120480
120460
  emitList(node, node.heritageClauses, 512 /* HeritageClauses */);
120481
120461
  writeSpace();
120482
120462
  writePunctuation("{");
120463
+ pushNameGenerationScope(node);
120464
+ forEach(node.members, generateMemberNames);
120483
120465
  emitList(node, node.members, 129 /* InterfaceMembers */);
120466
+ popNameGenerationScope(node);
120484
120467
  writePunctuation("}");
120485
- popPrivateNameGenerationScope();
120486
120468
  }
120487
120469
  function emitTypeAliasDeclaration(node) {
120488
120470
  emitDecoratorsAndModifiers(
@@ -121863,6 +121845,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121863
121845
  return getLiteralText(node, currentSourceFile, flags);
121864
121846
  }
121865
121847
  function pushNameGenerationScope(node) {
121848
+ privateNameTempFlagsStack.push(privateNameTempFlags);
121849
+ privateNameTempFlags = 0 /* Auto */;
121850
+ reservedPrivateNamesStack.push(reservedPrivateNames);
121866
121851
  if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {
121867
121852
  return;
121868
121853
  }
@@ -121873,6 +121858,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121873
121858
  reservedNamesStack.push(reservedNames);
121874
121859
  }
121875
121860
  function popNameGenerationScope(node) {
121861
+ privateNameTempFlags = privateNameTempFlagsStack.pop();
121862
+ reservedPrivateNames = reservedPrivateNamesStack.pop();
121876
121863
  if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) {
121877
121864
  return;
121878
121865
  }
@@ -121886,16 +121873,6 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121886
121873
  }
121887
121874
  reservedNames.add(name);
121888
121875
  }
121889
- function pushPrivateNameGenerationScope(newPrivateNameTempFlags, newReservedMemberNames) {
121890
- privateNameTempFlagsStack.push(privateNameTempFlags);
121891
- privateNameTempFlags = newPrivateNameTempFlags;
121892
- reservedPrivateNamesStack.push(reservedNames);
121893
- reservedPrivateNames = newReservedMemberNames;
121894
- }
121895
- function popPrivateNameGenerationScope() {
121896
- privateNameTempFlags = privateNameTempFlagsStack.pop();
121897
- reservedPrivateNames = reservedPrivateNamesStack.pop();
121898
- }
121899
121876
  function reservePrivateNameInNestedScopes(name) {
121900
121877
  if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) {
121901
121878
  reservedPrivateNames = /* @__PURE__ */ new Set();
@@ -121995,7 +121972,9 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121995
121972
  case 303 /* PropertyAssignment */:
121996
121973
  case 304 /* ShorthandPropertyAssignment */:
121997
121974
  case 172 /* PropertyDeclaration */:
121975
+ case 171 /* PropertySignature */:
121998
121976
  case 174 /* MethodDeclaration */:
121977
+ case 173 /* MethodSignature */:
121999
121978
  case 177 /* GetAccessor */:
122000
121979
  case 178 /* SetAccessor */:
122001
121980
  generateNameIfNeeded(node.name);
@@ -122029,7 +122008,28 @@ function createPrinter(printerOptions = {}, handlers = {}) {
122029
122008
  return isFileLevelUniqueNameInCurrentFile(name, privateName) && !isReservedName(name, privateName) && !generatedNames.has(name);
122030
122009
  }
122031
122010
  function isReservedName(name, privateName) {
122032
- return privateName ? !!(reservedPrivateNames == null ? void 0 : reservedPrivateNames.has(name)) : !!(reservedNames == null ? void 0 : reservedNames.has(name));
122011
+ let set;
122012
+ let stack;
122013
+ if (privateName) {
122014
+ set = reservedPrivateNames;
122015
+ stack = reservedPrivateNamesStack;
122016
+ } else {
122017
+ set = reservedNames;
122018
+ stack = reservedNamesStack;
122019
+ }
122020
+ if (set == null ? void 0 : set.has(name)) {
122021
+ return true;
122022
+ }
122023
+ for (let i = stack.length - 1; i >= 0; i--) {
122024
+ if (set === stack[i]) {
122025
+ continue;
122026
+ }
122027
+ set = stack[i];
122028
+ if (set == null ? void 0 : set.has(name)) {
122029
+ return true;
122030
+ }
122031
+ }
122032
+ return false;
122033
122033
  }
122034
122034
  function isFileLevelUniqueNameInCurrentFile(name, _isPrivate) {
122035
122035
  return currentSourceFile ? isFileLevelUniqueName(currentSourceFile, name, hasGlobalName) : true;
@@ -149272,7 +149272,7 @@ var invalidOperationsInSyntacticMode = [
149272
149272
  "findRenameLocations",
149273
149273
  "getApplicableRefactors"
149274
149274
  ];
149275
- function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory(), host.jsDocParsingMode), syntaxOnlyOrLanguageServiceMode) {
149275
+ function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()), syntaxOnlyOrLanguageServiceMode) {
149276
149276
  var _a;
149277
149277
  let languageServiceMode;
149278
149278
  if (syntaxOnlyOrLanguageServiceMode === void 0) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.5.0-pr-58404-2",
5
+ "version": "5.5.0-pr-58326-8",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [