typescript 5.0.0-dev.20230125 → 5.0.0-dev.20230126

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
@@ -23,7 +23,7 @@ var __export = (target, all) => {
23
23
 
24
24
  // src/compiler/corePublic.ts
25
25
  var versionMajorMinor = "5.0";
26
- var version = `${versionMajorMinor}.0-dev.20230125`;
26
+ var version = `${versionMajorMinor}.0-dev.20230126`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -11724,6 +11724,20 @@ function getScriptTargetFeatures() {
11724
11724
  BigUint64Array: ["at"],
11725
11725
  ObjectConstructor: ["hasOwn"],
11726
11726
  Error: ["cause"]
11727
+ },
11728
+ es2023: {
11729
+ Array: ["findLastIndex", "findLast"],
11730
+ Int8Array: ["findLastIndex", "findLast"],
11731
+ Uint8Array: ["findLastIndex", "findLast"],
11732
+ Uint8ClampedArray: ["findLastIndex", "findLast"],
11733
+ Int16Array: ["findLastIndex", "findLast"],
11734
+ Uint16Array: ["findLastIndex", "findLast"],
11735
+ Int32Array: ["findLastIndex", "findLast"],
11736
+ Uint32Array: ["findLastIndex", "findLast"],
11737
+ Float32Array: ["findLastIndex", "findLast"],
11738
+ Float64Array: ["findLastIndex", "findLast"],
11739
+ BigInt64Array: ["findLastIndex", "findLast"],
11740
+ BigUint64Array: ["findLastIndex", "findLast"]
11727
11741
  }
11728
11742
  };
11729
11743
  }
@@ -46308,7 +46322,7 @@ function createTypeChecker(host) {
46308
46322
  return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
46309
46323
  function symbolToStringWorker(writer2) {
46310
46324
  const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
46311
- const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true });
46325
+ const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
46312
46326
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
46313
46327
  printer.writeNode(
46314
46328
  4 /* Unspecified */,
@@ -46330,7 +46344,7 @@ function createTypeChecker(host) {
46330
46344
  sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
46331
46345
  }
46332
46346
  const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
46333
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
46347
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
46334
46348
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
46335
46349
  printer.writeNode(
46336
46350
  4 /* Unspecified */,
@@ -46347,8 +46361,7 @@ function createTypeChecker(host) {
46347
46361
  const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
46348
46362
  if (typeNode === void 0)
46349
46363
  return Debug.fail("should always get typenode");
46350
- const options = { removeComments: type !== unresolvedType };
46351
- const printer = createPrinter(options);
46364
+ const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
46352
46365
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
46353
46366
  printer.writeNode(
46354
46367
  4 /* Unspecified */,
@@ -49699,7 +49712,7 @@ function createTypeChecker(host) {
49699
49712
  typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
49700
49713
  // TODO: GH#18217
49701
49714
  );
49702
- const printer = createPrinter({ removeComments: true });
49715
+ const printer = createPrinterWithRemoveComments();
49703
49716
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
49704
49717
  printer.writeNode(
49705
49718
  4 /* Unspecified */,
@@ -64727,7 +64740,7 @@ function createTypeChecker(host) {
64727
64740
  return getNonMissingTypeOfSymbol(symbol);
64728
64741
  }
64729
64742
  function getControlFlowContainer(node) {
64730
- return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 295 /* CatchClause */ || node2.kind === 169 /* PropertyDeclaration */);
64743
+ return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
64731
64744
  }
64732
64745
  function isSymbolAssigned(symbol) {
64733
64746
  if (!symbol.valueDeclaration) {
@@ -64988,14 +65001,13 @@ function createTypeChecker(host) {
64988
65001
  const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
64989
65002
  const declarationContainer = getControlFlowContainer(declaration);
64990
65003
  let flowContainer = getControlFlowContainer(node);
64991
- const isCatch = flowContainer.kind === 295 /* CatchClause */;
64992
65004
  const isOuterVariable = flowContainer !== declarationContainer;
64993
65005
  const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
64994
65006
  const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
64995
65007
  while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
64996
65008
  flowContainer = getControlFlowContainer(flowContainer);
64997
65009
  }
64998
- const assumeInitialized = isParameter2 || isCatch || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
65010
+ const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
64999
65011
  const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
65000
65012
  const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
65001
65013
  if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
@@ -78255,7 +78267,7 @@ function createTypeChecker(host) {
78255
78267
  if (typeAnnotationNode) {
78256
78268
  checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);
78257
78269
  }
78258
- const isIllegalExportDefaultInCJS = !node.isExportEquals && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
78270
+ const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
78259
78271
  if (node.expression.kind === 79 /* Identifier */) {
78260
78272
  const id = node.expression;
78261
78273
  const sym = resolveEntityName(
@@ -106274,6 +106286,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
106274
106286
  );
106275
106287
  return outputFiles;
106276
106288
  }
106289
+ var createPrinterWithDefaults = memoize(() => createPrinter({}));
106290
+ var createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
106291
+ var createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
106292
+ var createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
106277
106293
  function createPrinter(printerOptions = {}, handlers = {}) {
106278
106294
  const {
106279
106295
  hasGlobalName,
package/lib/tsserver.js CHANGED
@@ -429,6 +429,10 @@ __export(server_exports, {
429
429
  createPatternMatcher: () => createPatternMatcher,
430
430
  createPrependNodes: () => createPrependNodes,
431
431
  createPrinter: () => createPrinter,
432
+ createPrinterWithDefaults: () => createPrinterWithDefaults,
433
+ createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
434
+ createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
435
+ createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
432
436
  createProgram: () => createProgram,
433
437
  createProgramHost: () => createProgramHost,
434
438
  createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
@@ -2373,7 +2377,7 @@ __export(ts_server_exports3, {
2373
2377
 
2374
2378
  // src/compiler/corePublic.ts
2375
2379
  var versionMajorMinor = "5.0";
2376
- var version = `${versionMajorMinor}.0-dev.20230125`;
2380
+ var version = `${versionMajorMinor}.0-dev.20230126`;
2377
2381
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2378
2382
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2379
2383
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -15492,6 +15496,20 @@ function getScriptTargetFeatures() {
15492
15496
  BigUint64Array: ["at"],
15493
15497
  ObjectConstructor: ["hasOwn"],
15494
15498
  Error: ["cause"]
15499
+ },
15500
+ es2023: {
15501
+ Array: ["findLastIndex", "findLast"],
15502
+ Int8Array: ["findLastIndex", "findLast"],
15503
+ Uint8Array: ["findLastIndex", "findLast"],
15504
+ Uint8ClampedArray: ["findLastIndex", "findLast"],
15505
+ Int16Array: ["findLastIndex", "findLast"],
15506
+ Uint16Array: ["findLastIndex", "findLast"],
15507
+ Int32Array: ["findLastIndex", "findLast"],
15508
+ Uint32Array: ["findLastIndex", "findLast"],
15509
+ Float32Array: ["findLastIndex", "findLast"],
15510
+ Float64Array: ["findLastIndex", "findLast"],
15511
+ BigInt64Array: ["findLastIndex", "findLast"],
15512
+ BigUint64Array: ["findLastIndex", "findLast"]
15495
15513
  }
15496
15514
  };
15497
15515
  }
@@ -50977,7 +50995,7 @@ function createTypeChecker(host) {
50977
50995
  return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
50978
50996
  function symbolToStringWorker(writer2) {
50979
50997
  const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
50980
- const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true });
50998
+ const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
50981
50999
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
50982
51000
  printer.writeNode(
50983
51001
  4 /* Unspecified */,
@@ -50999,7 +51017,7 @@ function createTypeChecker(host) {
50999
51017
  sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
51000
51018
  }
51001
51019
  const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
51002
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
51020
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
51003
51021
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
51004
51022
  printer.writeNode(
51005
51023
  4 /* Unspecified */,
@@ -51016,8 +51034,7 @@ function createTypeChecker(host) {
51016
51034
  const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
51017
51035
  if (typeNode === void 0)
51018
51036
  return Debug.fail("should always get typenode");
51019
- const options = { removeComments: type !== unresolvedType };
51020
- const printer = createPrinter(options);
51037
+ const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
51021
51038
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
51022
51039
  printer.writeNode(
51023
51040
  4 /* Unspecified */,
@@ -54368,7 +54385,7 @@ function createTypeChecker(host) {
54368
54385
  typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
54369
54386
  // TODO: GH#18217
54370
54387
  );
54371
- const printer = createPrinter({ removeComments: true });
54388
+ const printer = createPrinterWithRemoveComments();
54372
54389
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
54373
54390
  printer.writeNode(
54374
54391
  4 /* Unspecified */,
@@ -69396,7 +69413,7 @@ function createTypeChecker(host) {
69396
69413
  return getNonMissingTypeOfSymbol(symbol);
69397
69414
  }
69398
69415
  function getControlFlowContainer(node) {
69399
- return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 295 /* CatchClause */ || node2.kind === 169 /* PropertyDeclaration */);
69416
+ return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
69400
69417
  }
69401
69418
  function isSymbolAssigned(symbol) {
69402
69419
  if (!symbol.valueDeclaration) {
@@ -69657,14 +69674,13 @@ function createTypeChecker(host) {
69657
69674
  const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
69658
69675
  const declarationContainer = getControlFlowContainer(declaration);
69659
69676
  let flowContainer = getControlFlowContainer(node);
69660
- const isCatch = flowContainer.kind === 295 /* CatchClause */;
69661
69677
  const isOuterVariable = flowContainer !== declarationContainer;
69662
69678
  const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
69663
69679
  const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
69664
69680
  while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
69665
69681
  flowContainer = getControlFlowContainer(flowContainer);
69666
69682
  }
69667
- const assumeInitialized = isParameter2 || isCatch || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
69683
+ const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
69668
69684
  const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
69669
69685
  const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
69670
69686
  if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
@@ -82924,7 +82940,7 @@ function createTypeChecker(host) {
82924
82940
  if (typeAnnotationNode) {
82925
82941
  checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);
82926
82942
  }
82927
- const isIllegalExportDefaultInCJS = !node.isExportEquals && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
82943
+ const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
82928
82944
  if (node.expression.kind === 79 /* Identifier */) {
82929
82945
  const id = node.expression;
82930
82946
  const sym = resolveEntityName(
@@ -111125,6 +111141,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
111125
111141
  );
111126
111142
  return outputFiles;
111127
111143
  }
111144
+ var createPrinterWithDefaults = memoize(() => createPrinter({}));
111145
+ var createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
111146
+ var createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
111147
+ var createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
111128
111148
  function createPrinter(printerOptions = {}, handlers = {}) {
111129
111149
  const {
111130
111150
  hasGlobalName,
@@ -126912,6 +126932,10 @@ __export(ts_exports3, {
126912
126932
  createPatternMatcher: () => createPatternMatcher,
126913
126933
  createPrependNodes: () => createPrependNodes,
126914
126934
  createPrinter: () => createPrinter,
126935
+ createPrinterWithDefaults: () => createPrinterWithDefaults,
126936
+ createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
126937
+ createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
126938
+ createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
126915
126939
  createProgram: () => createProgram,
126916
126940
  createProgramHost: () => createProgramHost,
126917
126941
  createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
@@ -131004,7 +131028,7 @@ function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, f
131004
131028
  function nodeToDisplayParts(node, enclosingDeclaration) {
131005
131029
  const file = enclosingDeclaration.getSourceFile();
131006
131030
  return mapToDisplayParts((writer) => {
131007
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
131031
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
131008
131032
  printer.writeNode(4 /* Unspecified */, node, file, writer);
131009
131033
  });
131010
131034
  }
@@ -139467,7 +139491,7 @@ function getCallHierarchyItemName(program, node) {
139467
139491
  }
139468
139492
  }
139469
139493
  if (text === void 0) {
139470
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
139494
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
139471
139495
  text = usingSingleLineStringWriter((writer) => printer.writeNode(4 /* Unspecified */, node, node.getSourceFile(), writer));
139472
139496
  }
139473
139497
  return { text, pos: declName.getStart(), end: declName.getEnd() };
@@ -146189,7 +146213,7 @@ function getDeleteAction(context, { name, jsDocHost, jsDocParameterTag }) {
146189
146213
  Diagnostics.Delete_all_unused_param_tags
146190
146214
  );
146191
146215
  }
146192
- function getRenameAction(context, { name, signature, jsDocParameterTag }) {
146216
+ function getRenameAction(context, { name, jsDocHost, signature, jsDocParameterTag }) {
146193
146217
  if (!length(signature.parameters))
146194
146218
  return void 0;
146195
146219
  const sourceFile = context.sourceFile;
@@ -146212,7 +146236,7 @@ function getRenameAction(context, { name, signature, jsDocParameterTag }) {
146212
146236
  jsDocParameterTag.isNameFirst,
146213
146237
  jsDocParameterTag.comment
146214
146238
  );
146215
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, signature, map(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t)));
146239
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t)));
146216
146240
  return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name.getText(sourceFile), parameterName]);
146217
146241
  }
146218
146242
  function getInfo10(sourceFile, pos) {
@@ -157237,8 +157261,7 @@ function provideInlayHints(context) {
157237
157261
  }
157238
157262
  function printTypeInSingleLine(type) {
157239
157263
  const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;
157240
- const options = { removeComments: true };
157241
- const printer = createPrinter(options);
157264
+ const printer = createPrinterWithRemoveComments();
157242
157265
  return usingSingleLineStringWriter((writer) => {
157243
157266
  const typeNode = checker.typeToTypeNode(
157244
157267
  type,
@@ -164169,7 +164192,7 @@ function createTypeHelpItems(symbol, { argumentCount, argumentsSpan: applicableS
164169
164192
  }
164170
164193
  function getTypeHelpItem(symbol, typeParameters, checker, enclosingDeclaration, sourceFile) {
164171
164194
  const typeSymbolDisplay = symbolToDisplayParts(checker, symbol);
164172
- const printer = createPrinter({ removeComments: true });
164195
+ const printer = createPrinterWithRemoveComments();
164173
164196
  const parameters = typeParameters.map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
164174
164197
  const documentation = symbol.getDocumentationComment(checker);
164175
164198
  const tags = symbol.getJsDocTags(checker);
@@ -164213,7 +164236,7 @@ function returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, chec
164213
164236
  }
164214
164237
  function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
164215
164238
  const typeParameters = (candidateSignature.target || candidateSignature).typeParameters;
164216
- const printer = createPrinter({ removeComments: true });
164239
+ const printer = createPrinterWithRemoveComments();
164217
164240
  const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
164218
164241
  const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
164219
164242
  return checker.getExpandedParameters(candidateSignature).map((paramList) => {
@@ -164225,7 +164248,7 @@ function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclara
164225
164248
  });
164226
164249
  }
164227
164250
  function itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
164228
- const printer = createPrinter({ removeComments: true });
164251
+ const printer = createPrinterWithRemoveComments();
164229
164252
  const typeParameterParts = mapToDisplayParts((writer) => {
164230
164253
  if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) {
164231
164254
  const args = factory.createNodeArray(candidateSignature.typeParameters.map((p) => checker.typeParameterToDeclaration(p, enclosingDeclaration, signatureHelpNodeBuilderFlags)));
@@ -164600,7 +164623,6 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
164600
164623
  let hasAddedSymbolInfo = false;
164601
164624
  const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location);
164602
164625
  let type;
164603
- let printer;
164604
164626
  let documentationFromAlias;
164605
164627
  let tagsFromAlias;
164606
164628
  let hasMultipleSignatures = false;
@@ -164993,10 +165015,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
164993
165015
  }
164994
165016
  return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags };
164995
165017
  function getPrinter() {
164996
- if (!printer) {
164997
- printer = createPrinter({ removeComments: true });
164998
- }
164999
- return printer;
165018
+ return createPrinterWithRemoveComments();
165000
165019
  }
165001
165020
  function prefixNextMeaning() {
165002
165021
  if (displayParts.length) {
@@ -181076,6 +181095,10 @@ start(initializeNodeSystem(), require("os").platform());
181076
181095
  createPatternMatcher,
181077
181096
  createPrependNodes,
181078
181097
  createPrinter,
181098
+ createPrinterWithDefaults,
181099
+ createPrinterWithRemoveComments,
181100
+ createPrinterWithRemoveCommentsNeverAsciiEscape,
181101
+ createPrinterWithRemoveCommentsOmitTrailingSemicolon,
181079
181102
  createProgram,
181080
181103
  createProgramHost,
181081
181104
  createPropertyNameNodeForIdentifierOrLiteral,
@@ -42,7 +42,7 @@ var ts = (() => {
42
42
  "src/compiler/corePublic.ts"() {
43
43
  "use strict";
44
44
  versionMajorMinor = "5.0";
45
- version = `${versionMajorMinor}.0-dev.20230125`;
45
+ version = `${versionMajorMinor}.0-dev.20230126`;
46
46
  Comparison = /* @__PURE__ */ ((Comparison3) => {
47
47
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
48
48
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -13247,6 +13247,20 @@ ${lanes.join("\n")}
13247
13247
  BigUint64Array: ["at"],
13248
13248
  ObjectConstructor: ["hasOwn"],
13249
13249
  Error: ["cause"]
13250
+ },
13251
+ es2023: {
13252
+ Array: ["findLastIndex", "findLast"],
13253
+ Int8Array: ["findLastIndex", "findLast"],
13254
+ Uint8Array: ["findLastIndex", "findLast"],
13255
+ Uint8ClampedArray: ["findLastIndex", "findLast"],
13256
+ Int16Array: ["findLastIndex", "findLast"],
13257
+ Uint16Array: ["findLastIndex", "findLast"],
13258
+ Int32Array: ["findLastIndex", "findLast"],
13259
+ Uint32Array: ["findLastIndex", "findLast"],
13260
+ Float32Array: ["findLastIndex", "findLast"],
13261
+ Float64Array: ["findLastIndex", "findLast"],
13262
+ BigInt64Array: ["findLastIndex", "findLast"],
13263
+ BigUint64Array: ["findLastIndex", "findLast"]
13250
13264
  }
13251
13265
  };
13252
13266
  }
@@ -48708,7 +48722,7 @@ ${lanes.join("\n")}
48708
48722
  return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
48709
48723
  function symbolToStringWorker(writer2) {
48710
48724
  const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
48711
- const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true });
48725
+ const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
48712
48726
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
48713
48727
  printer.writeNode(
48714
48728
  4 /* Unspecified */,
@@ -48730,7 +48744,7 @@ ${lanes.join("\n")}
48730
48744
  sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
48731
48745
  }
48732
48746
  const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
48733
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
48747
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
48734
48748
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
48735
48749
  printer.writeNode(
48736
48750
  4 /* Unspecified */,
@@ -48747,8 +48761,7 @@ ${lanes.join("\n")}
48747
48761
  const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
48748
48762
  if (typeNode === void 0)
48749
48763
  return Debug.fail("should always get typenode");
48750
- const options = { removeComments: type !== unresolvedType };
48751
- const printer = createPrinter(options);
48764
+ const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
48752
48765
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
48753
48766
  printer.writeNode(
48754
48767
  4 /* Unspecified */,
@@ -52099,7 +52112,7 @@ ${lanes.join("\n")}
52099
52112
  typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
52100
52113
  // TODO: GH#18217
52101
52114
  );
52102
- const printer = createPrinter({ removeComments: true });
52115
+ const printer = createPrinterWithRemoveComments();
52103
52116
  const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
52104
52117
  printer.writeNode(
52105
52118
  4 /* Unspecified */,
@@ -67127,7 +67140,7 @@ ${lanes.join("\n")}
67127
67140
  return getNonMissingTypeOfSymbol(symbol);
67128
67141
  }
67129
67142
  function getControlFlowContainer(node) {
67130
- return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 295 /* CatchClause */ || node2.kind === 169 /* PropertyDeclaration */);
67143
+ return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
67131
67144
  }
67132
67145
  function isSymbolAssigned(symbol) {
67133
67146
  if (!symbol.valueDeclaration) {
@@ -67388,14 +67401,13 @@ ${lanes.join("\n")}
67388
67401
  const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
67389
67402
  const declarationContainer = getControlFlowContainer(declaration);
67390
67403
  let flowContainer = getControlFlowContainer(node);
67391
- const isCatch = flowContainer.kind === 295 /* CatchClause */;
67392
67404
  const isOuterVariable = flowContainer !== declarationContainer;
67393
67405
  const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
67394
67406
  const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
67395
67407
  while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
67396
67408
  flowContainer = getControlFlowContainer(flowContainer);
67397
67409
  }
67398
- const assumeInitialized = isParameter2 || isCatch || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
67410
+ const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
67399
67411
  const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
67400
67412
  const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
67401
67413
  if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
@@ -80655,7 +80667,7 @@ ${lanes.join("\n")}
80655
80667
  if (typeAnnotationNode) {
80656
80668
  checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);
80657
80669
  }
80658
- const isIllegalExportDefaultInCJS = !node.isExportEquals && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
80670
+ const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */);
80659
80671
  if (node.expression.kind === 79 /* Identifier */) {
80660
80672
  const id = node.expression;
80661
80673
  const sym = resolveEntityName(
@@ -113784,7 +113796,7 @@ ${lanes.join("\n")}
113784
113796
  function getEmitListItem(emit, parenthesizerRule) {
113785
113797
  return emit.length === 1 ? emitListItemNoParenthesizer : typeof parenthesizerRule === "object" ? emitListItemWithParenthesizerRuleSelector : emitListItemWithParenthesizerRule;
113786
113798
  }
113787
- var brackets, notImplementedResolver, TempFlags;
113799
+ var brackets, notImplementedResolver, createPrinterWithDefaults, createPrinterWithRemoveComments, createPrinterWithRemoveCommentsNeverAsciiEscape, createPrinterWithRemoveCommentsOmitTrailingSemicolon, TempFlags;
113788
113800
  var init_emitter = __esm({
113789
113801
  "src/compiler/emitter.ts"() {
113790
113802
  "use strict";
@@ -113835,6 +113847,10 @@ ${lanes.join("\n")}
113835
113847
  getDeclarationStatementsForSourceFile: notImplemented,
113836
113848
  isImportRequiredByAugmentation: notImplemented
113837
113849
  };
113850
+ createPrinterWithDefaults = memoize(() => createPrinter({}));
113851
+ createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
113852
+ createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
113853
+ createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
113838
113854
  TempFlags = /* @__PURE__ */ ((TempFlags2) => {
113839
113855
  TempFlags2[TempFlags2["Auto"] = 0] = "Auto";
113840
113856
  TempFlags2[TempFlags2["CountMask"] = 268435455] = "CountMask";
@@ -126889,7 +126905,7 @@ ${lanes.join("\n")}
126889
126905
  function nodeToDisplayParts(node, enclosingDeclaration) {
126890
126906
  const file = enclosingDeclaration.getSourceFile();
126891
126907
  return mapToDisplayParts((writer) => {
126892
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
126908
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
126893
126909
  printer.writeNode(4 /* Unspecified */, node, file, writer);
126894
126910
  });
126895
126911
  }
@@ -135514,7 +135530,7 @@ ${lanes.join("\n")}
135514
135530
  }
135515
135531
  }
135516
135532
  if (text === void 0) {
135517
- const printer = createPrinter({ removeComments: true, omitTrailingSemicolon: true });
135533
+ const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
135518
135534
  text = usingSingleLineStringWriter((writer) => printer.writeNode(4 /* Unspecified */, node, node.getSourceFile(), writer));
135519
135535
  }
135520
135536
  return { text, pos: declName.getStart(), end: declName.getEnd() };
@@ -142519,7 +142535,7 @@ ${lanes.join("\n")}
142519
142535
  Diagnostics.Delete_all_unused_param_tags
142520
142536
  );
142521
142537
  }
142522
- function getRenameAction(context, { name, signature, jsDocParameterTag }) {
142538
+ function getRenameAction(context, { name, jsDocHost, signature, jsDocParameterTag }) {
142523
142539
  if (!length(signature.parameters))
142524
142540
  return void 0;
142525
142541
  const sourceFile = context.sourceFile;
@@ -142542,7 +142558,7 @@ ${lanes.join("\n")}
142542
142558
  jsDocParameterTag.isNameFirst,
142543
142559
  jsDocParameterTag.comment
142544
142560
  );
142545
- const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, signature, map(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t)));
142561
+ const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t)));
142546
142562
  return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name.getText(sourceFile), parameterName]);
142547
142563
  }
142548
142564
  function getInfo10(sourceFile, pos) {
@@ -153995,8 +154011,7 @@ ${lanes.join("\n")}
153995
154011
  }
153996
154012
  function printTypeInSingleLine(type) {
153997
154013
  const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;
153998
- const options = { removeComments: true };
153999
- const printer = createPrinter(options);
154014
+ const printer = createPrinterWithRemoveComments();
154000
154015
  return usingSingleLineStringWriter((writer) => {
154001
154016
  const typeNode = checker.typeToTypeNode(
154002
154017
  type,
@@ -161171,7 +161186,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
161171
161186
  }
161172
161187
  function getTypeHelpItem(symbol, typeParameters, checker, enclosingDeclaration, sourceFile) {
161173
161188
  const typeSymbolDisplay = symbolToDisplayParts(checker, symbol);
161174
- const printer = createPrinter({ removeComments: true });
161189
+ const printer = createPrinterWithRemoveComments();
161175
161190
  const parameters = typeParameters.map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
161176
161191
  const documentation = symbol.getDocumentationComment(checker);
161177
161192
  const tags = symbol.getJsDocTags(checker);
@@ -161214,7 +161229,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
161214
161229
  }
161215
161230
  function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
161216
161231
  const typeParameters = (candidateSignature.target || candidateSignature).typeParameters;
161217
- const printer = createPrinter({ removeComments: true });
161232
+ const printer = createPrinterWithRemoveComments();
161218
161233
  const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
161219
161234
  const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
161220
161235
  return checker.getExpandedParameters(candidateSignature).map((paramList) => {
@@ -161226,7 +161241,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
161226
161241
  });
161227
161242
  }
161228
161243
  function itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
161229
- const printer = createPrinter({ removeComments: true });
161244
+ const printer = createPrinterWithRemoveComments();
161230
161245
  const typeParameterParts = mapToDisplayParts((writer) => {
161231
161246
  if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) {
161232
161247
  const args = factory.createNodeArray(candidateSignature.typeParameters.map((p) => checker.typeParameterToDeclaration(p, enclosingDeclaration, signatureHelpNodeBuilderFlags)));
@@ -161632,7 +161647,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
161632
161647
  let hasAddedSymbolInfo = false;
161633
161648
  const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location);
161634
161649
  let type;
161635
- let printer;
161636
161650
  let documentationFromAlias;
161637
161651
  let tagsFromAlias;
161638
161652
  let hasMultipleSignatures = false;
@@ -162025,10 +162039,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
162025
162039
  }
162026
162040
  return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags };
162027
162041
  function getPrinter() {
162028
- if (!printer) {
162029
- printer = createPrinter({ removeComments: true });
162030
- }
162031
- return printer;
162042
+ return createPrinterWithRemoveComments();
162032
162043
  }
162033
162044
  function prefixNextMeaning() {
162034
162045
  if (displayParts.length) {
@@ -177735,6 +177746,10 @@ ${e.message}`;
177735
177746
  createPatternMatcher: () => createPatternMatcher,
177736
177747
  createPrependNodes: () => createPrependNodes,
177737
177748
  createPrinter: () => createPrinter,
177749
+ createPrinterWithDefaults: () => createPrinterWithDefaults,
177750
+ createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
177751
+ createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
177752
+ createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
177738
177753
  createProgram: () => createProgram,
177739
177754
  createProgramHost: () => createProgramHost,
177740
177755
  createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
@@ -180087,6 +180102,10 @@ ${e.message}`;
180087
180102
  createPatternMatcher: () => createPatternMatcher,
180088
180103
  createPrependNodes: () => createPrependNodes,
180089
180104
  createPrinter: () => createPrinter,
180105
+ createPrinterWithDefaults: () => createPrinterWithDefaults,
180106
+ createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
180107
+ createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
180108
+ createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
180090
180109
  createProgram: () => createProgram,
180091
180110
  createProgramHost: () => createProgramHost,
180092
180111
  createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,