typescript 5.0.0-dev.20230112 → 5.0.0-dev.20230114

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/typescript.js CHANGED
@@ -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.20230112`;
45
+ version = `${versionMajorMinor}.0-dev.20230114`;
46
46
  Comparison = /* @__PURE__ */ ((Comparison3) => {
47
47
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
48
48
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3980,6 +3980,8 @@ ${lanes.join("\n")}
3980
3980
  NodeFlags4[NodeFlags4["ContextFlags"] = 50720768] = "ContextFlags";
3981
3981
  NodeFlags4[NodeFlags4["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags";
3982
3982
  NodeFlags4[NodeFlags4["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags";
3983
+ NodeFlags4[NodeFlags4["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape";
3984
+ NodeFlags4[NodeFlags4["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace";
3983
3985
  return NodeFlags4;
3984
3986
  })(NodeFlags || {});
3985
3987
  ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
@@ -8405,6 +8407,8 @@ ${lanes.join("\n")}
8405
8407
  package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, 3 /* Message */, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."),
8406
8408
  package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, 3 /* Message */, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"),
8407
8409
  Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, 3 /* Message */, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."),
8410
+ Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: diag(6277, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),
8411
+ There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),
8408
8412
  Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
8409
8413
  Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
8410
8414
  Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
@@ -11478,6 +11482,10 @@ ${lanes.join("\n")}
11478
11482
  function idText(identifierOrPrivateName) {
11479
11483
  return unescapeLeadingUnderscores(identifierOrPrivateName.escapedText);
11480
11484
  }
11485
+ function identifierToKeywordKind(node) {
11486
+ const token = stringToToken(node.escapedText);
11487
+ return token ? tryCast(token, isKeyword) : void 0;
11488
+ }
11481
11489
  function symbolName(symbol) {
11482
11490
  if (symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) {
11483
11491
  return idText(symbol.valueDeclaration.name);
@@ -11785,15 +11793,17 @@ ${lanes.join("\n")}
11785
11793
  }
11786
11794
  }
11787
11795
  function getJSDocTagsWorker(node, noCache) {
11796
+ var _a2, _b;
11788
11797
  if (!canHaveJSDoc(node))
11789
11798
  return emptyArray;
11790
- let tags = node.jsDocCache;
11799
+ let tags = (_a2 = node.jsDoc) == null ? void 0 : _a2.jsDocCache;
11791
11800
  if (tags === void 0 || noCache) {
11792
11801
  const comments = getJSDocCommentsAndTags(node, noCache);
11793
11802
  Debug.assert(comments.length < 2 || comments[0] !== comments[1]);
11794
11803
  tags = flatMap(comments, (j) => isJSDoc(j) ? j.tags : j);
11795
11804
  if (!noCache) {
11796
- node.jsDocCache = tags;
11805
+ (_b = node.jsDoc) != null ? _b : node.jsDoc = [];
11806
+ node.jsDoc.jsDocCache = tags;
11797
11807
  }
11798
11808
  }
11799
11809
  return tags;
@@ -11992,10 +12002,12 @@ ${lanes.join("\n")}
11992
12002
  return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind);
11993
12003
  }
11994
12004
  function isGeneratedIdentifier(node) {
11995
- return isIdentifier(node) && node.autoGenerate !== void 0;
12005
+ var _a2;
12006
+ return isIdentifier(node) && ((_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate) !== void 0;
11996
12007
  }
11997
12008
  function isGeneratedPrivateIdentifier(node) {
11998
- return isPrivateIdentifier(node) && node.autoGenerate !== void 0;
12009
+ var _a2;
12010
+ return isPrivateIdentifier(node) && ((_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate) !== void 0;
11999
12011
  }
12000
12012
  function isPrivateIdentifierClassElementDeclaration(node) {
12001
12013
  return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name);
@@ -13373,10 +13385,11 @@ ${lanes.join("\n")}
13373
13385
  return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
13374
13386
  }
13375
13387
  function tryGetTextOfPropertyName(name) {
13388
+ var _a2;
13376
13389
  switch (name.kind) {
13377
13390
  case 79 /* Identifier */:
13378
13391
  case 80 /* PrivateIdentifier */:
13379
- return name.autoGenerate ? void 0 : name.escapedText;
13392
+ return ((_a2 = name.emitNode) == null ? void 0 : _a2.autoGenerate) ? void 0 : name.escapedText;
13380
13393
  case 10 /* StringLiteral */:
13381
13394
  case 8 /* NumericLiteral */:
13382
13395
  case 14 /* NoSubstitutionTemplateLiteral */:
@@ -13494,6 +13507,20 @@ ${lanes.join("\n")}
13494
13507
  const start = scanner2.getTokenPos();
13495
13508
  return createTextSpanFromBounds(start, scanner2.getTextPos());
13496
13509
  }
13510
+ function scanTokenAtPosition(sourceFile, pos) {
13511
+ const scanner2 = createScanner(
13512
+ sourceFile.languageVersion,
13513
+ /*skipTrivia*/
13514
+ true,
13515
+ sourceFile.languageVariant,
13516
+ sourceFile.text,
13517
+ /*onError:*/
13518
+ void 0,
13519
+ pos
13520
+ );
13521
+ scanner2.scan();
13522
+ return scanner2.getToken();
13523
+ }
13497
13524
  function getErrorSpanForArrowFunction(sourceFile, node) {
13498
13525
  const pos = skipTrivia(sourceFile.text, node.pos);
13499
13526
  if (node.body && node.body.kind === 238 /* Block */) {
@@ -15176,7 +15203,8 @@ ${lanes.join("\n")}
15176
15203
  const token = stringToToken(name);
15177
15204
  return token !== void 0 && isKeyword(token);
15178
15205
  }
15179
- function isIdentifierANonContextualKeyword({ originalKeywordKind }) {
15206
+ function isIdentifierANonContextualKeyword(node) {
15207
+ const originalKeywordKind = identifierToKeywordKind(node);
15180
15208
  return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind);
15181
15209
  }
15182
15210
  function isTrivia(token) {
@@ -15975,7 +16003,7 @@ ${lanes.join("\n")}
15975
16003
  return node.parent.kind === 183 /* TypeQuery */;
15976
16004
  }
15977
16005
  function identifierIsThisKeyword(id) {
15978
- return id.originalKeywordKind === 108 /* ThisKeyword */;
16006
+ return id.escapedText === "this";
15979
16007
  }
15980
16008
  function getAllAccessorDeclarations(declarations, accessor) {
15981
16009
  let firstAccessor;
@@ -16286,7 +16314,7 @@ ${lanes.join("\n")}
16286
16314
  }
16287
16315
  function getSyntacticModifierFlagsNoCache(node) {
16288
16316
  let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */;
16289
- if (node.flags & 4 /* NestedNamespace */ || node.kind === 79 /* Identifier */ && node.isInJSDocNamespace) {
16317
+ if (node.flags & 4 /* NestedNamespace */ || node.kind === 79 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
16290
16318
  flags |= 1 /* Export */;
16291
16319
  }
16292
16320
  return flags;
@@ -17049,15 +17077,19 @@ ${lanes.join("\n")}
17049
17077
  this.parent = void 0;
17050
17078
  this.original = void 0;
17051
17079
  this.emitNode = void 0;
17052
- this.flowNode = void 0;
17053
17080
  }
17054
17081
  function SourceMapSource(fileName, text, skipTrivia2) {
17055
17082
  this.fileName = fileName;
17056
17083
  this.text = text;
17057
17084
  this.skipTrivia = skipTrivia2 || ((pos) => pos);
17058
17085
  }
17086
+ function addObjectAllocatorPatcher(fn) {
17087
+ objectAllocatorPatchers.push(fn);
17088
+ fn(objectAllocator);
17089
+ }
17059
17090
  function setObjectAllocator(alloc) {
17060
17091
  Object.assign(objectAllocator, alloc);
17092
+ forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));
17061
17093
  }
17062
17094
  function formatStringFromArgs(text, args, baseIndex = 0) {
17063
17095
  return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
@@ -18403,7 +18435,7 @@ ${lanes.join("\n")}
18403
18435
  const kind = node.kind;
18404
18436
  return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
18405
18437
  }
18406
- var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18438
+ var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18407
18439
  var init_utilities = __esm({
18408
18440
  "src/compiler/utilities.ts"() {
18409
18441
  "use strict";
@@ -18524,6 +18556,7 @@ ${lanes.join("\n")}
18524
18556
  getSignatureConstructor: () => Signature2,
18525
18557
  getSourceMapSourceConstructor: () => SourceMapSource
18526
18558
  };
18559
+ objectAllocatorPatchers = [];
18527
18560
  reservedCharacterPattern = /[^\w\s\/]/g;
18528
18561
  wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
18529
18562
  commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
@@ -19211,7 +19244,6 @@ ${lanes.join("\n")}
19211
19244
  createRegularExpressionLiteral: createRegularExpressionLiteral2,
19212
19245
  createLiteralLikeNode,
19213
19246
  createIdentifier: createIdentifier3,
19214
- updateIdentifier,
19215
19247
  createTempVariable: createTempVariable3,
19216
19248
  createLoopVariable: createLoopVariable2,
19217
19249
  createUniqueName: createUniqueName2,
@@ -19954,55 +19986,43 @@ ${lanes.join("\n")}
19954
19986
  );
19955
19987
  }
19956
19988
  }
19957
- function createBaseIdentifier(escapedText, originalKeywordKind) {
19989
+ function createBaseIdentifier(escapedText) {
19958
19990
  const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
19959
- node.originalKeywordKind = originalKeywordKind;
19960
19991
  node.escapedText = escapedText;
19961
- node.autoGenerate = void 0;
19962
- node.typeArguments = void 0;
19963
- node.hasExtendedUnicodeEscape = void 0;
19964
19992
  node.jsDoc = void 0;
19965
- node.jsDocCache = void 0;
19966
19993
  node.flowNode = void 0;
19967
19994
  node.symbol = void 0;
19968
19995
  return node;
19969
19996
  }
19970
19997
  function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
19971
- const node = createBaseIdentifier(
19972
- escapeLeadingUnderscores(text),
19973
- /*originalKeywordKind*/
19974
- void 0
19975
- );
19976
- node.autoGenerate = {
19998
+ const node = createBaseIdentifier(escapeLeadingUnderscores(text));
19999
+ setIdentifierAutoGenerate(node, {
19977
20000
  flags: autoGenerateFlags,
19978
20001
  id: nextAutoGenerateId,
19979
20002
  prefix,
19980
20003
  suffix
19981
- };
20004
+ });
19982
20005
  nextAutoGenerateId++;
19983
20006
  return node;
19984
20007
  }
19985
- function createIdentifier3(text, typeArguments, originalKeywordKind, hasExtendedUnicodeEscape) {
20008
+ function createIdentifier3(text, originalKeywordKind, hasExtendedUnicodeEscape) {
19986
20009
  if (originalKeywordKind === void 0 && text) {
19987
20010
  originalKeywordKind = stringToToken(text);
19988
20011
  }
19989
20012
  if (originalKeywordKind === 79 /* Identifier */) {
19990
20013
  originalKeywordKind = void 0;
19991
20014
  }
19992
- const node = createBaseIdentifier(escapeLeadingUnderscores(text), originalKeywordKind);
19993
- node.typeArguments = asNodeArray(typeArguments);
19994
- node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
19995
- if (node.originalKeywordKind === 133 /* AwaitKeyword */) {
20015
+ const node = createBaseIdentifier(escapeLeadingUnderscores(text));
20016
+ if (hasExtendedUnicodeEscape)
20017
+ node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */;
20018
+ if (node.escapedText === "await") {
19996
20019
  node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
19997
20020
  }
19998
- if (node.hasExtendedUnicodeEscape) {
20021
+ if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
19999
20022
  node.transformFlags |= 1024 /* ContainsES2015 */;
20000
20023
  }
20001
20024
  return node;
20002
20025
  }
20003
- function updateIdentifier(node, typeArguments) {
20004
- return node.typeArguments !== typeArguments ? update(createIdentifier3(idText(node), typeArguments), node) : node;
20005
- }
20006
20026
  function createTempVariable3(recordTempVariable, reservedInNestedScopes, prefix, suffix) {
20007
20027
  let flags2 = 1 /* Auto */;
20008
20028
  if (reservedInNestedScopes)
@@ -20050,7 +20070,6 @@ ${lanes.join("\n")}
20050
20070
  function createBasePrivateIdentifier(escapedText) {
20051
20071
  const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
20052
20072
  node.escapedText = escapedText;
20053
- node.autoGenerate = void 0;
20054
20073
  node.transformFlags |= 16777216 /* ContainsClassFields */;
20055
20074
  return node;
20056
20075
  }
@@ -20061,12 +20080,12 @@ ${lanes.join("\n")}
20061
20080
  }
20062
20081
  function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
20063
20082
  const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));
20064
- node.autoGenerate = {
20083
+ setIdentifierAutoGenerate(node, {
20065
20084
  flags: autoGenerateFlags,
20066
20085
  id: nextAutoGenerateId,
20067
20086
  prefix,
20068
20087
  suffix
20069
- };
20088
+ });
20070
20089
  nextAutoGenerateId++;
20071
20090
  return node;
20072
20091
  }
@@ -20228,7 +20247,6 @@ ${lanes.join("\n")}
20228
20247
  node.transformFlags = 1 /* ContainsTypeScript */;
20229
20248
  node.expression = void 0;
20230
20249
  node.jsDoc = void 0;
20231
- node.jsDocCache = void 0;
20232
20250
  return node;
20233
20251
  }
20234
20252
  function updateTypeParameterDeclaration2(node, modifiers, name, constraint, defaultType) {
@@ -20249,7 +20267,6 @@ ${lanes.join("\n")}
20249
20267
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (((_a2 = node.questionToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */) | (((_b = node.dotDotDotToken) != null ? _b : node.initializer) ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);
20250
20268
  }
20251
20269
  node.jsDoc = void 0;
20252
- node.jsDocCache = void 0;
20253
20270
  return node;
20254
20271
  }
20255
20272
  function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
@@ -20277,7 +20294,6 @@ ${lanes.join("\n")}
20277
20294
  node.transformFlags = 1 /* ContainsTypeScript */;
20278
20295
  node.initializer = void 0;
20279
20296
  node.jsDoc = void 0;
20280
- node.jsDocCache = void 0;
20281
20297
  return node;
20282
20298
  }
20283
20299
  function updatePropertySignature3(node, modifiers, name, questionToken, type) {
@@ -20300,7 +20316,6 @@ ${lanes.join("\n")}
20300
20316
  const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */;
20301
20317
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;
20302
20318
  node.jsDoc = void 0;
20303
- node.jsDocCache = void 0;
20304
20319
  return node;
20305
20320
  }
20306
20321
  function updatePropertyDeclaration2(node, modifiers, name, questionOrExclamationToken, type, initializer) {
@@ -20316,7 +20331,6 @@ ${lanes.join("\n")}
20316
20331
  node.type = type;
20317
20332
  node.transformFlags = 1 /* ContainsTypeScript */;
20318
20333
  node.jsDoc = void 0;
20319
- node.jsDocCache = void 0;
20320
20334
  node.locals = void 0;
20321
20335
  node.nextContainer = void 0;
20322
20336
  node.typeArguments = void 0;
@@ -20346,7 +20360,6 @@ ${lanes.join("\n")}
20346
20360
  }
20347
20361
  node.typeArguments = void 0;
20348
20362
  node.jsDoc = void 0;
20349
- node.jsDocCache = void 0;
20350
20363
  node.locals = void 0;
20351
20364
  node.nextContainer = void 0;
20352
20365
  node.flowNode = void 0;
@@ -20370,7 +20383,6 @@ ${lanes.join("\n")}
20370
20383
  node.illegalDecorators = void 0;
20371
20384
  node.modifiers = void 0;
20372
20385
  node.jsDoc = void 0;
20373
- node.jsDocCache = void 0;
20374
20386
  node.locals = void 0;
20375
20387
  node.nextContainer = void 0;
20376
20388
  node.endFlowNode = void 0;
@@ -20398,7 +20410,6 @@ ${lanes.join("\n")}
20398
20410
  node.type = void 0;
20399
20411
  node.typeArguments = void 0;
20400
20412
  node.jsDoc = void 0;
20401
- node.jsDocCache = void 0;
20402
20413
  node.locals = void 0;
20403
20414
  node.nextContainer = void 0;
20404
20415
  node.endFlowNode = void 0;
@@ -20431,7 +20442,6 @@ ${lanes.join("\n")}
20431
20442
  node.typeArguments = void 0;
20432
20443
  node.typeParameters = void 0;
20433
20444
  node.jsDoc = void 0;
20434
- node.jsDocCache = void 0;
20435
20445
  node.locals = void 0;
20436
20446
  node.nextContainer = void 0;
20437
20447
  node.flowNode = void 0;
@@ -20463,7 +20473,6 @@ ${lanes.join("\n")}
20463
20473
  node.typeParameters = void 0;
20464
20474
  node.type = void 0;
20465
20475
  node.jsDoc = void 0;
20466
- node.jsDocCache = void 0;
20467
20476
  node.locals = void 0;
20468
20477
  node.nextContainer = void 0;
20469
20478
  node.flowNode = void 0;
@@ -20488,7 +20497,6 @@ ${lanes.join("\n")}
20488
20497
  node.type = type;
20489
20498
  node.transformFlags = 1 /* ContainsTypeScript */;
20490
20499
  node.jsDoc = void 0;
20491
- node.jsDocCache = void 0;
20492
20500
  node.locals = void 0;
20493
20501
  node.nextContainer = void 0;
20494
20502
  node.typeArguments = void 0;
@@ -20504,7 +20512,6 @@ ${lanes.join("\n")}
20504
20512
  node.type = type;
20505
20513
  node.transformFlags = 1 /* ContainsTypeScript */;
20506
20514
  node.jsDoc = void 0;
20507
- node.jsDocCache = void 0;
20508
20515
  node.locals = void 0;
20509
20516
  node.nextContainer = void 0;
20510
20517
  node.typeArguments = void 0;
@@ -20521,7 +20528,6 @@ ${lanes.join("\n")}
20521
20528
  node.transformFlags = 1 /* ContainsTypeScript */;
20522
20529
  node.illegalDecorators = void 0;
20523
20530
  node.jsDoc = void 0;
20524
- node.jsDocCache = void 0;
20525
20531
  node.locals = void 0;
20526
20532
  node.nextContainer = void 0;
20527
20533
  node.typeArguments = void 0;
@@ -20572,7 +20578,6 @@ ${lanes.join("\n")}
20572
20578
  node.transformFlags = 1 /* ContainsTypeScript */;
20573
20579
  node.modifiers = void 0;
20574
20580
  node.jsDoc = void 0;
20575
- node.jsDocCache = void 0;
20576
20581
  node.locals = void 0;
20577
20582
  node.nextContainer = void 0;
20578
20583
  node.typeArguments = void 0;
@@ -20598,7 +20603,6 @@ ${lanes.join("\n")}
20598
20603
  node.type = type;
20599
20604
  node.transformFlags = 1 /* ContainsTypeScript */;
20600
20605
  node.jsDoc = void 0;
20601
- node.jsDocCache = void 0;
20602
20606
  node.locals = void 0;
20603
20607
  node.nextContainer = void 0;
20604
20608
  node.typeArguments = void 0;
@@ -20667,7 +20671,6 @@ ${lanes.join("\n")}
20667
20671
  node.type = type;
20668
20672
  node.transformFlags = 1 /* ContainsTypeScript */;
20669
20673
  node.jsDoc = void 0;
20670
- node.jsDocCache = void 0;
20671
20674
  return node;
20672
20675
  }
20673
20676
  function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {
@@ -20869,7 +20872,6 @@ ${lanes.join("\n")}
20869
20872
  node.multiLine = multiLine;
20870
20873
  node.transformFlags |= propagateChildrenFlags(node.properties);
20871
20874
  node.jsDoc = void 0;
20872
- node.jsDocCache = void 0;
20873
20875
  return node;
20874
20876
  }
20875
20877
  function updateObjectLiteralExpression(node, properties) {
@@ -20882,7 +20884,6 @@ ${lanes.join("\n")}
20882
20884
  node.name = name;
20883
20885
  node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
20884
20886
  node.jsDoc = void 0;
20885
- node.jsDocCache = void 0;
20886
20887
  node.flowNode = void 0;
20887
20888
  return node;
20888
20889
  }
@@ -20933,7 +20934,6 @@ ${lanes.join("\n")}
20933
20934
  node.argumentExpression = argumentExpression;
20934
20935
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression);
20935
20936
  node.jsDoc = void 0;
20936
- node.jsDocCache = void 0;
20937
20937
  node.flowNode = void 0;
20938
20938
  return node;
20939
20939
  }
@@ -21084,7 +21084,6 @@ ${lanes.join("\n")}
21084
21084
  node.expression = expression;
21085
21085
  node.transformFlags = propagateChildFlags(node.expression);
21086
21086
  node.jsDoc = void 0;
21087
- node.jsDocCache = void 0;
21088
21087
  return node;
21089
21088
  }
21090
21089
  function updateParenthesizedExpression(node, expression) {
@@ -21105,7 +21104,6 @@ ${lanes.join("\n")}
21105
21104
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
21106
21105
  node.typeArguments = void 0;
21107
21106
  node.jsDoc = void 0;
21108
- node.jsDocCache = void 0;
21109
21107
  node.locals = void 0;
21110
21108
  node.nextContainer = void 0;
21111
21109
  node.flowNode = void 0;
@@ -21128,7 +21126,6 @@ ${lanes.join("\n")}
21128
21126
  node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */;
21129
21127
  node.typeArguments = void 0;
21130
21128
  node.jsDoc = void 0;
21131
- node.jsDocCache = void 0;
21132
21129
  node.locals = void 0;
21133
21130
  node.nextContainer = void 0;
21134
21131
  node.flowNode = void 0;
@@ -21226,7 +21223,6 @@ ${lanes.join("\n")}
21226
21223
  node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */;
21227
21224
  }
21228
21225
  node.jsDoc = void 0;
21229
- node.jsDocCache = void 0;
21230
21226
  return node;
21231
21227
  }
21232
21228
  function propagateAssignmentPatternFlags(node) {
@@ -21368,7 +21364,6 @@ ${lanes.join("\n")}
21368
21364
  node.members = createNodeArray2(members);
21369
21365
  node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
21370
21366
  node.jsDoc = void 0;
21371
- node.jsDocCache = void 0;
21372
21367
  return node;
21373
21368
  }
21374
21369
  function updateClassExpression3(node, modifiers, name, typeParameters, heritageClauses, members) {
@@ -21484,7 +21479,6 @@ ${lanes.join("\n")}
21484
21479
  node.multiLine = multiLine;
21485
21480
  node.transformFlags |= propagateChildrenFlags(node.statements);
21486
21481
  node.jsDoc = void 0;
21487
- node.jsDocCache = void 0;
21488
21482
  node.locals = void 0;
21489
21483
  node.nextContainer = void 0;
21490
21484
  return node;
@@ -21502,7 +21496,6 @@ ${lanes.join("\n")}
21502
21496
  }
21503
21497
  node.illegalDecorators = void 0;
21504
21498
  node.jsDoc = void 0;
21505
- node.jsDocCache = void 0;
21506
21499
  node.flowNode = void 0;
21507
21500
  return node;
21508
21501
  }
@@ -21512,7 +21505,6 @@ ${lanes.join("\n")}
21512
21505
  function createEmptyStatement2() {
21513
21506
  const node = createBaseNode(239 /* EmptyStatement */);
21514
21507
  node.jsDoc = void 0;
21515
- node.jsDocCache = void 0;
21516
21508
  return node;
21517
21509
  }
21518
21510
  function createExpressionStatement2(expression) {
@@ -21520,7 +21512,6 @@ ${lanes.join("\n")}
21520
21512
  node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);
21521
21513
  node.transformFlags |= propagateChildFlags(node.expression);
21522
21514
  node.jsDoc = void 0;
21523
- node.jsDocCache = void 0;
21524
21515
  node.flowNode = void 0;
21525
21516
  return node;
21526
21517
  }
@@ -21534,7 +21525,6 @@ ${lanes.join("\n")}
21534
21525
  node.elseStatement = asEmbeddedStatement(elseStatement);
21535
21526
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement);
21536
21527
  node.jsDoc = void 0;
21537
- node.jsDocCache = void 0;
21538
21528
  node.flowNode = void 0;
21539
21529
  return node;
21540
21530
  }
@@ -21547,7 +21537,6 @@ ${lanes.join("\n")}
21547
21537
  node.expression = expression;
21548
21538
  node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression);
21549
21539
  node.jsDoc = void 0;
21550
- node.jsDocCache = void 0;
21551
21540
  node.flowNode = void 0;
21552
21541
  return node;
21553
21542
  }
@@ -21560,7 +21549,6 @@ ${lanes.join("\n")}
21560
21549
  node.statement = asEmbeddedStatement(statement);
21561
21550
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
21562
21551
  node.jsDoc = void 0;
21563
- node.jsDocCache = void 0;
21564
21552
  node.flowNode = void 0;
21565
21553
  return node;
21566
21554
  }
@@ -21575,7 +21563,6 @@ ${lanes.join("\n")}
21575
21563
  node.statement = asEmbeddedStatement(statement);
21576
21564
  node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement);
21577
21565
  node.jsDoc = void 0;
21578
- node.jsDocCache = void 0;
21579
21566
  node.locals = void 0;
21580
21567
  node.nextContainer = void 0;
21581
21568
  node.flowNode = void 0;
@@ -21591,7 +21578,6 @@ ${lanes.join("\n")}
21591
21578
  node.statement = asEmbeddedStatement(statement);
21592
21579
  node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
21593
21580
  node.jsDoc = void 0;
21594
- node.jsDocCache = void 0;
21595
21581
  node.locals = void 0;
21596
21582
  node.nextContainer = void 0;
21597
21583
  node.flowNode = void 0;
@@ -21610,7 +21596,6 @@ ${lanes.join("\n")}
21610
21596
  if (awaitModifier)
21611
21597
  node.transformFlags |= 128 /* ContainsES2018 */;
21612
21598
  node.jsDoc = void 0;
21613
- node.jsDocCache = void 0;
21614
21599
  node.locals = void 0;
21615
21600
  node.nextContainer = void 0;
21616
21601
  node.flowNode = void 0;
@@ -21624,7 +21609,6 @@ ${lanes.join("\n")}
21624
21609
  node.label = asName(label);
21625
21610
  node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
21626
21611
  node.jsDoc = void 0;
21627
- node.jsDocCache = void 0;
21628
21612
  node.flowNode = void 0;
21629
21613
  return node;
21630
21614
  }
@@ -21636,7 +21620,6 @@ ${lanes.join("\n")}
21636
21620
  node.label = asName(label);
21637
21621
  node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
21638
21622
  node.jsDoc = void 0;
21639
- node.jsDocCache = void 0;
21640
21623
  node.flowNode = void 0;
21641
21624
  return node;
21642
21625
  }
@@ -21648,7 +21631,6 @@ ${lanes.join("\n")}
21648
21631
  node.expression = expression;
21649
21632
  node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
21650
21633
  node.jsDoc = void 0;
21651
- node.jsDocCache = void 0;
21652
21634
  node.flowNode = void 0;
21653
21635
  return node;
21654
21636
  }
@@ -21661,7 +21643,6 @@ ${lanes.join("\n")}
21661
21643
  node.statement = asEmbeddedStatement(statement);
21662
21644
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
21663
21645
  node.jsDoc = void 0;
21664
- node.jsDocCache = void 0;
21665
21646
  node.flowNode = void 0;
21666
21647
  return node;
21667
21648
  }
@@ -21674,7 +21655,6 @@ ${lanes.join("\n")}
21674
21655
  node.caseBlock = caseBlock;
21675
21656
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock);
21676
21657
  node.jsDoc = void 0;
21677
- node.jsDocCache = void 0;
21678
21658
  node.flowNode = void 0;
21679
21659
  node.possiblyExhaustive = false;
21680
21660
  return node;
@@ -21688,7 +21668,6 @@ ${lanes.join("\n")}
21688
21668
  node.statement = asEmbeddedStatement(statement);
21689
21669
  node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement);
21690
21670
  node.jsDoc = void 0;
21691
- node.jsDocCache = void 0;
21692
21671
  node.flowNode = void 0;
21693
21672
  return node;
21694
21673
  }
@@ -21700,7 +21679,6 @@ ${lanes.join("\n")}
21700
21679
  node.expression = expression;
21701
21680
  node.transformFlags |= propagateChildFlags(node.expression);
21702
21681
  node.jsDoc = void 0;
21703
- node.jsDocCache = void 0;
21704
21682
  node.flowNode = void 0;
21705
21683
  return node;
21706
21684
  }
@@ -21714,7 +21692,6 @@ ${lanes.join("\n")}
21714
21692
  node.finallyBlock = finallyBlock;
21715
21693
  node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock);
21716
21694
  node.jsDoc = void 0;
21717
- node.jsDocCache = void 0;
21718
21695
  node.flowNode = void 0;
21719
21696
  return node;
21720
21697
  }
@@ -21724,7 +21701,6 @@ ${lanes.join("\n")}
21724
21701
  function createDebuggerStatement2() {
21725
21702
  const node = createBaseNode(256 /* DebuggerStatement */);
21726
21703
  node.jsDoc = void 0;
21727
- node.jsDocCache = void 0;
21728
21704
  node.flowNode = void 0;
21729
21705
  return node;
21730
21706
  }
@@ -21737,7 +21713,6 @@ ${lanes.join("\n")}
21737
21713
  node.initializer = asInitializer(initializer);
21738
21714
  node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (((_a2 = node.exclamationToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */);
21739
21715
  node.jsDoc = void 0;
21740
- node.jsDocCache = void 0;
21741
21716
  return node;
21742
21717
  }
21743
21718
  function updateVariableDeclaration3(node, name, exclamationToken, type, initializer) {
@@ -21776,7 +21751,6 @@ ${lanes.join("\n")}
21776
21751
  node.illegalDecorators = void 0;
21777
21752
  node.typeArguments = void 0;
21778
21753
  node.jsDoc = void 0;
21779
- node.jsDocCache = void 0;
21780
21754
  node.locals = void 0;
21781
21755
  node.nextContainer = void 0;
21782
21756
  node.endFlowNode = void 0;
@@ -21808,7 +21782,6 @@ ${lanes.join("\n")}
21808
21782
  }
21809
21783
  }
21810
21784
  node.jsDoc = void 0;
21811
- node.jsDocCache = void 0;
21812
21785
  return node;
21813
21786
  }
21814
21787
  function updateClassDeclaration2(node, modifiers, name, typeParameters, heritageClauses, members) {
@@ -21824,7 +21797,6 @@ ${lanes.join("\n")}
21824
21797
  node.transformFlags = 1 /* ContainsTypeScript */;
21825
21798
  node.illegalDecorators = void 0;
21826
21799
  node.jsDoc = void 0;
21827
- node.jsDocCache = void 0;
21828
21800
  return node;
21829
21801
  }
21830
21802
  function updateInterfaceDeclaration2(node, modifiers, name, typeParameters, heritageClauses, members) {
@@ -21845,7 +21817,6 @@ ${lanes.join("\n")}
21845
21817
  node.transformFlags = 1 /* ContainsTypeScript */;
21846
21818
  node.illegalDecorators = void 0;
21847
21819
  node.jsDoc = void 0;
21848
- node.jsDocCache = void 0;
21849
21820
  node.locals = void 0;
21850
21821
  node.nextContainer = void 0;
21851
21822
  return node;
@@ -21868,7 +21839,6 @@ ${lanes.join("\n")}
21868
21839
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
21869
21840
  node.illegalDecorators = void 0;
21870
21841
  node.jsDoc = void 0;
21871
- node.jsDocCache = void 0;
21872
21842
  return node;
21873
21843
  }
21874
21844
  function updateEnumDeclaration2(node, modifiers, name, members) {
@@ -21894,7 +21864,6 @@ ${lanes.join("\n")}
21894
21864
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
21895
21865
  node.illegalDecorators = void 0;
21896
21866
  node.jsDoc = void 0;
21897
- node.jsDocCache = void 0;
21898
21867
  node.locals = void 0;
21899
21868
  node.nextContainer = void 0;
21900
21869
  return node;
@@ -21913,7 +21882,6 @@ ${lanes.join("\n")}
21913
21882
  node.statements = createNodeArray2(statements);
21914
21883
  node.transformFlags |= propagateChildrenFlags(node.statements);
21915
21884
  node.jsDoc = void 0;
21916
- node.jsDocCache = void 0;
21917
21885
  return node;
21918
21886
  }
21919
21887
  function updateModuleBlock2(node, statements) {
@@ -21937,7 +21905,6 @@ ${lanes.join("\n")}
21937
21905
  node.illegalDecorators = void 0;
21938
21906
  node.modifiers = void 0;
21939
21907
  node.jsDoc = void 0;
21940
- node.jsDocCache = void 0;
21941
21908
  return node;
21942
21909
  }
21943
21910
  function updateNamespaceExportDeclaration2(node, name) {
@@ -21963,7 +21930,6 @@ ${lanes.join("\n")}
21963
21930
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
21964
21931
  node.illegalDecorators = void 0;
21965
21932
  node.jsDoc = void 0;
21966
- node.jsDocCache = void 0;
21967
21933
  return node;
21968
21934
  }
21969
21935
  function updateImportEqualsDeclaration2(node, modifiers, isTypeOnly, name, moduleReference) {
@@ -21985,7 +21951,6 @@ ${lanes.join("\n")}
21985
21951
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
21986
21952
  node.illegalDecorators = void 0;
21987
21953
  node.jsDoc = void 0;
21988
- node.jsDocCache = void 0;
21989
21954
  return node;
21990
21955
  }
21991
21956
  function updateImportDeclaration2(node, modifiers, importClause, moduleSpecifier, assertClause) {
@@ -22097,7 +22062,6 @@ ${lanes.join("\n")}
22097
22062
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
22098
22063
  node.illegalDecorators = void 0;
22099
22064
  node.jsDoc = void 0;
22100
- node.jsDocCache = void 0;
22101
22065
  return node;
22102
22066
  }
22103
22067
  function updateExportAssignment2(node, modifiers, expression) {
@@ -22120,7 +22084,6 @@ ${lanes.join("\n")}
22120
22084
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
22121
22085
  node.illegalDecorators = void 0;
22122
22086
  node.jsDoc = void 0;
22123
- node.jsDocCache = void 0;
22124
22087
  return node;
22125
22088
  }
22126
22089
  function updateExportDeclaration3(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
@@ -22150,7 +22113,6 @@ ${lanes.join("\n")}
22150
22113
  node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);
22151
22114
  node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
22152
22115
  node.jsDoc = void 0;
22153
- node.jsDocCache = void 0;
22154
22116
  return node;
22155
22117
  }
22156
22118
  function updateExportSpecifier2(node, isTypeOnly, propertyName, name) {
@@ -22159,7 +22121,6 @@ ${lanes.join("\n")}
22159
22121
  function createMissingDeclaration() {
22160
22122
  const node = createBaseDeclaration(279 /* MissingDeclaration */);
22161
22123
  node.jsDoc = void 0;
22162
- node.jsDocCache = void 0;
22163
22124
  return node;
22164
22125
  }
22165
22126
  function createExternalModuleReference2(expression) {
@@ -22200,7 +22161,6 @@ ${lanes.join("\n")}
22200
22161
  node.type = type;
22201
22162
  node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
22202
22163
  node.jsDoc = void 0;
22203
- node.jsDocCache = void 0;
22204
22164
  node.locals = void 0;
22205
22165
  node.nextContainer = void 0;
22206
22166
  node.typeArguments = void 0;
@@ -22232,7 +22192,6 @@ ${lanes.join("\n")}
22232
22192
  node.parameters = createNodeArray2(parameters);
22233
22193
  node.type = type;
22234
22194
  node.jsDoc = void 0;
22235
- node.jsDocCache = void 0;
22236
22195
  node.locals = void 0;
22237
22196
  node.nextContainer = void 0;
22238
22197
  return node;
@@ -22560,7 +22519,6 @@ ${lanes.join("\n")}
22560
22519
  node.statements = createNodeArray2(statements);
22561
22520
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements);
22562
22521
  node.jsDoc = void 0;
22563
- node.jsDocCache = void 0;
22564
22522
  return node;
22565
22523
  }
22566
22524
  function updateCaseClause2(node, expression, statements) {
@@ -22617,7 +22575,6 @@ ${lanes.join("\n")}
22617
22575
  node.questionToken = void 0;
22618
22576
  node.exclamationToken = void 0;
22619
22577
  node.jsDoc = void 0;
22620
- node.jsDocCache = void 0;
22621
22578
  return node;
22622
22579
  }
22623
22580
  function updatePropertyAssignment2(node, name, initializer) {
@@ -22643,7 +22600,6 @@ ${lanes.join("\n")}
22643
22600
  node.questionToken = void 0;
22644
22601
  node.exclamationToken = void 0;
22645
22602
  node.jsDoc = void 0;
22646
- node.jsDocCache = void 0;
22647
22603
  return node;
22648
22604
  }
22649
22605
  function updateShorthandPropertyAssignment2(node, name, objectAssignmentInitializer) {
@@ -22664,7 +22620,6 @@ ${lanes.join("\n")}
22664
22620
  node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
22665
22621
  node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;
22666
22622
  node.jsDoc = void 0;
22667
- node.jsDocCache = void 0;
22668
22623
  return node;
22669
22624
  }
22670
22625
  function updateSpreadAssignment2(node, expression) {
@@ -22676,7 +22631,6 @@ ${lanes.join("\n")}
22676
22631
  node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
22677
22632
  node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */;
22678
22633
  node.jsDoc = void 0;
22679
- node.jsDocCache = void 0;
22680
22634
  return node;
22681
22635
  }
22682
22636
  function updateEnumMember2(node, name, initializer) {
@@ -22922,36 +22876,32 @@ ${lanes.join("\n")}
22922
22876
  return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node;
22923
22877
  }
22924
22878
  function cloneGeneratedIdentifier(node) {
22925
- const clone2 = createBaseIdentifier(
22926
- node.escapedText,
22927
- /*originalKeywordKind*/
22928
- void 0
22929
- );
22879
+ const clone2 = createBaseIdentifier(node.escapedText);
22930
22880
  clone2.flags |= node.flags & ~8 /* Synthesized */;
22931
- clone2.autoGenerate = { ...node.autoGenerate };
22932
22881
  clone2.transformFlags = node.transformFlags;
22933
22882
  setOriginalNode(clone2, node);
22883
+ setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
22934
22884
  return clone2;
22935
22885
  }
22936
22886
  function cloneIdentifier(node) {
22937
- const clone2 = createBaseIdentifier(node.escapedText, node.originalKeywordKind);
22887
+ const clone2 = createBaseIdentifier(node.escapedText);
22938
22888
  clone2.flags |= node.flags & ~8 /* Synthesized */;
22939
- clone2.typeArguments = node.typeArguments;
22940
- clone2.hasExtendedUnicodeEscape = node.hasExtendedUnicodeEscape;
22941
22889
  clone2.jsDoc = node.jsDoc;
22942
- clone2.jsDocCache = node.jsDocCache;
22943
22890
  clone2.flowNode = node.flowNode;
22944
22891
  clone2.symbol = node.symbol;
22945
22892
  clone2.transformFlags = node.transformFlags;
22946
22893
  setOriginalNode(clone2, node);
22894
+ const typeArguments = getIdentifierTypeArguments(node);
22895
+ if (typeArguments)
22896
+ setIdentifierTypeArguments(clone2, typeArguments);
22947
22897
  return clone2;
22948
22898
  }
22949
22899
  function cloneGeneratedPrivateIdentifier(node) {
22950
22900
  const clone2 = createBasePrivateIdentifier(node.escapedText);
22951
22901
  clone2.flags |= node.flags & ~8 /* Synthesized */;
22952
- clone2.autoGenerate = { ...node.autoGenerate };
22953
22902
  clone2.transformFlags = node.transformFlags;
22954
22903
  setOriginalNode(clone2, node);
22904
+ setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
22955
22905
  return clone2;
22956
22906
  }
22957
22907
  function clonePrivateIdentifier(node) {
@@ -24220,6 +24170,30 @@ ${lanes.join("\n")}
24220
24170
  var _a2;
24221
24171
  return (_a2 = node.emitNode) == null ? void 0 : _a2.typeNode;
24222
24172
  }
24173
+ function setIdentifierTypeArguments(node, typeArguments) {
24174
+ getOrCreateEmitNode(node).identifierTypeArguments = typeArguments;
24175
+ return node;
24176
+ }
24177
+ function getIdentifierTypeArguments(node) {
24178
+ var _a2;
24179
+ return (_a2 = node.emitNode) == null ? void 0 : _a2.identifierTypeArguments;
24180
+ }
24181
+ function setIdentifierAutoGenerate(node, autoGenerate) {
24182
+ getOrCreateEmitNode(node).autoGenerate = autoGenerate;
24183
+ return node;
24184
+ }
24185
+ function getIdentifierAutoGenerate(node) {
24186
+ var _a2;
24187
+ return (_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate;
24188
+ }
24189
+ function setIdentifierGeneratedImportReference(node, value) {
24190
+ getOrCreateEmitNode(node).generatedImportReference = value;
24191
+ return node;
24192
+ }
24193
+ function getIdentifierGeneratedImportReference(node) {
24194
+ var _a2;
24195
+ return (_a2 = node.emitNode) == null ? void 0 : _a2.generatedImportReference;
24196
+ }
24223
24197
  var init_emitNode = __esm({
24224
24198
  "src/compiler/factory/emitNode.ts"() {
24225
24199
  "use strict";
@@ -26468,13 +26442,16 @@ ${lanes.join("\n")}
26468
26442
  return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes);
26469
26443
  }
26470
26444
  function getNodeForGeneratedName(name) {
26471
- if (name.autoGenerate.flags & 4 /* Node */) {
26472
- const autoGenerateId = name.autoGenerate.id;
26445
+ var _a2;
26446
+ const autoGenerate = name.emitNode.autoGenerate;
26447
+ if (autoGenerate.flags & 4 /* Node */) {
26448
+ const autoGenerateId = autoGenerate.id;
26473
26449
  let node = name;
26474
26450
  let original = node.original;
26475
26451
  while (original) {
26476
26452
  node = original;
26477
- if (isMemberName(node) && (node.autoGenerate === void 0 || !!(node.autoGenerate.flags & 4 /* Node */) && node.autoGenerate.id !== autoGenerateId)) {
26453
+ const autoGenerate2 = (_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate;
26454
+ if (isMemberName(node) && (autoGenerate2 === void 0 || !!(autoGenerate2.flags & 4 /* Node */) && autoGenerate2.id !== autoGenerateId)) {
26478
26455
  break;
26479
26456
  }
26480
26457
  original = node.original;
@@ -28428,8 +28405,6 @@ ${lanes.join("\n")}
28428
28405
  const pos = getNodePos();
28429
28406
  const result = kind === 79 /* Identifier */ ? factory2.createIdentifier(
28430
28407
  "",
28431
- /*typeArguments*/
28432
- void 0,
28433
28408
  /*originalKeywordKind*/
28434
28409
  void 0
28435
28410
  ) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(
@@ -28464,13 +28439,7 @@ ${lanes.join("\n")}
28464
28439
  const text = internIdentifier(scanner2.getTokenValue());
28465
28440
  const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();
28466
28441
  nextTokenWithoutCheck();
28467
- return finishNode(factory2.createIdentifier(
28468
- text,
28469
- /*typeArguments*/
28470
- void 0,
28471
- originalKeywordKind,
28472
- hasExtendedUnicodeEscape
28473
- ), pos);
28442
+ return finishNode(factory2.createIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape), pos);
28474
28443
  }
28475
28444
  if (token() === 80 /* PrivateIdentifier */) {
28476
28445
  parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
@@ -28812,6 +28781,7 @@ ${lanes.join("\n")}
28812
28781
  return parseElement();
28813
28782
  }
28814
28783
  function currentNode(parsingContext2, pos) {
28784
+ var _a2;
28815
28785
  if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) {
28816
28786
  return void 0;
28817
28787
  }
@@ -28826,8 +28796,8 @@ ${lanes.join("\n")}
28826
28796
  if (!canReuseNode(node, parsingContext2)) {
28827
28797
  return void 0;
28828
28798
  }
28829
- if (canHaveJSDoc(node) && node.jsDocCache) {
28830
- node.jsDocCache = void 0;
28799
+ if (canHaveJSDoc(node) && ((_a2 = node.jsDoc) == null ? void 0 : _a2.jsDocCache)) {
28800
+ node.jsDoc.jsDocCache = void 0;
28831
28801
  }
28832
28802
  return node;
28833
28803
  }
@@ -28886,7 +28856,7 @@ ${lanes.join("\n")}
28886
28856
  return true;
28887
28857
  case 171 /* MethodDeclaration */:
28888
28858
  const methodDeclaration = node;
28889
- const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.originalKeywordKind === 135 /* ConstructorKeyword */;
28859
+ const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor";
28890
28860
  return !nameIsConstructor;
28891
28861
  }
28892
28862
  }
@@ -29108,13 +29078,10 @@ ${lanes.join("\n")}
29108
29078
  function parseEntityName(allowReservedWords, diagnosticMessage) {
29109
29079
  const pos = getNodePos();
29110
29080
  let entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);
29111
- let dotPos = getNodePos();
29112
29081
  while (parseOptional(24 /* DotToken */)) {
29113
29082
  if (token() === 29 /* LessThanToken */) {
29114
- entity.jsdocDotPos = dotPos;
29115
29083
  break;
29116
29084
  }
29117
- dotPos = getNodePos();
29118
29085
  entity = finishNode(
29119
29086
  factory2.createQualifiedName(
29120
29087
  entity,
@@ -33894,7 +33861,7 @@ ${lanes.join("\n")}
33894
33861
  return finishNode(jsDocNamespaceNode, pos);
33895
33862
  }
33896
33863
  if (nested) {
33897
- typeNameOrNamespaceName.isInJSDocNamespace = true;
33864
+ typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */;
33898
33865
  }
33899
33866
  return typeNameOrNamespaceName;
33900
33867
  }
@@ -34098,12 +34065,7 @@ ${lanes.join("\n")}
34098
34065
  const end2 = scanner2.getTextPos();
34099
34066
  const originalKeywordKind = token();
34100
34067
  const text = internIdentifier(scanner2.getTokenValue());
34101
- const result = finishNode(factory2.createIdentifier(
34102
- text,
34103
- /*typeArguments*/
34104
- void 0,
34105
- originalKeywordKind
34106
- ), pos, end2);
34068
+ const result = finishNode(factory2.createIdentifier(text, originalKeywordKind), pos, end2);
34107
34069
  nextTokenJSDoc();
34108
34070
  return result;
34109
34071
  }
@@ -36290,6 +36252,7 @@ ${lanes.join("\n")}
36290
36252
  ["es2020", "lib.es2020.d.ts"],
36291
36253
  ["es2021", "lib.es2021.d.ts"],
36292
36254
  ["es2022", "lib.es2022.d.ts"],
36255
+ ["es2023", "lib.es2023.d.ts"],
36293
36256
  ["esnext", "lib.esnext.d.ts"],
36294
36257
  // Host only
36295
36258
  ["dom", "lib.dom.d.ts"],
@@ -36343,7 +36306,8 @@ ${lanes.join("\n")}
36343
36306
  ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
36344
36307
  ["es2022.string", "lib.es2022.string.d.ts"],
36345
36308
  ["es2022.regexp", "lib.es2022.regexp.d.ts"],
36346
- ["esnext.array", "lib.es2022.array.d.ts"],
36309
+ ["es2023.array", "lib.es2023.array.d.ts"],
36310
+ ["esnext.array", "lib.es2023.array.d.ts"],
36347
36311
  ["esnext.symbol", "lib.es2019.symbol.d.ts"],
36348
36312
  ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
36349
36313
  ["esnext.intl", "lib.esnext.intl.d.ts"],
@@ -37822,7 +37786,7 @@ ${lanes.join("\n")}
37822
37786
  Debug.assert(extensionIsTS(resolved.extension));
37823
37787
  return { fileName: resolved.path, packageId: resolved.packageId };
37824
37788
  }
37825
- function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
37789
+ function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) {
37826
37790
  if (resultFromCache) {
37827
37791
  resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
37828
37792
  resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
@@ -37840,7 +37804,8 @@ ${lanes.join("\n")}
37840
37804
  },
37841
37805
  failedLookupLocations: initializeResolutionField(failedLookupLocations),
37842
37806
  affectingLocations: initializeResolutionField(affectingLocations),
37843
- resolutionDiagnostics: initializeResolutionField(diagnostics)
37807
+ resolutionDiagnostics: initializeResolutionField(diagnostics),
37808
+ node10Result: legacyResult
37844
37809
  };
37845
37810
  }
37846
37811
  function initializeResolutionField(value) {
@@ -38880,7 +38845,7 @@ ${lanes.join("\n")}
38880
38845
  );
38881
38846
  }
38882
38847
  function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
38883
- var _a2, _b;
38848
+ var _a2, _b, _c, _d;
38884
38849
  const traceEnabled = isTraceEnabled(compilerOptions, host);
38885
38850
  const failedLookupLocations = [];
38886
38851
  const affectingLocations = [];
@@ -38907,44 +38872,60 @@ ${lanes.join("\n")}
38907
38872
  if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
38908
38873
  const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
38909
38874
  const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
38910
- result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
38875
+ result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
38911
38876
  } else {
38912
- result = tryResolve(extensions);
38877
+ result = tryResolve(extensions, state);
38878
+ }
38879
+ let legacyResult;
38880
+ if (((_a2 = result == null ? void 0 : result.value) == null ? void 0 : _a2.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) {
38881
+ traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
38882
+ const diagnosticState = {
38883
+ ...state,
38884
+ features: state.features & ~8 /* Exports */,
38885
+ failedLookupLocations: [],
38886
+ affectingLocations: [],
38887
+ reportDiagnostic: noop
38888
+ };
38889
+ const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
38890
+ if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {
38891
+ legacyResult = diagnosticResult.value.resolved.path;
38892
+ }
38913
38893
  }
38914
38894
  return createResolvedModuleWithFailedLookupLocations(
38915
- (_a2 = result == null ? void 0 : result.value) == null ? void 0 : _a2.resolved,
38916
- (_b = result == null ? void 0 : result.value) == null ? void 0 : _b.isExternalLibraryImport,
38895
+ (_c = result == null ? void 0 : result.value) == null ? void 0 : _c.resolved,
38896
+ (_d = result == null ? void 0 : result.value) == null ? void 0 : _d.isExternalLibraryImport,
38917
38897
  failedLookupLocations,
38918
38898
  affectingLocations,
38919
38899
  diagnostics,
38920
- state.resultFromCache
38900
+ state.resultFromCache,
38901
+ legacyResult
38921
38902
  );
38922
- function tryResolve(extensions2) {
38923
- const loader = (extensions3, candidate, onlyRecordFailures, state2) => nodeLoadModuleByRelativeName(
38903
+ function tryResolve(extensions2, state2) {
38904
+ const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(
38924
38905
  extensions3,
38925
38906
  candidate,
38926
38907
  onlyRecordFailures,
38927
- state2,
38908
+ state3,
38928
38909
  /*considerPackageJson*/
38929
38910
  true
38930
38911
  );
38931
- const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state);
38912
+ const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2);
38932
38913
  if (resolved) {
38933
38914
  return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
38934
38915
  }
38935
38916
  if (!isExternalModuleNameRelative(moduleName)) {
38936
38917
  let resolved2;
38937
38918
  if (features & 2 /* Imports */ && startsWith(moduleName, "#")) {
38938
- resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state, cache, redirectedReference);
38919
+ resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
38939
38920
  }
38940
38921
  if (!resolved2 && features & 4 /* SelfName */) {
38941
- resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state, cache, redirectedReference);
38922
+ resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
38942
38923
  }
38943
38924
  if (!resolved2) {
38944
38925
  if (traceEnabled) {
38945
38926
  trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
38946
38927
  }
38947
- resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state, cache, redirectedReference);
38928
+ resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
38948
38929
  }
38949
38930
  if (!resolved2)
38950
38931
  return void 0;
@@ -38963,7 +38944,7 @@ ${lanes.join("\n")}
38963
38944
  candidate,
38964
38945
  /*onlyRecordFailures*/
38965
38946
  false,
38966
- state,
38947
+ state2,
38967
38948
  /*considerPackageJson*/
38968
38949
  true
38969
38950
  );
@@ -40318,7 +40299,7 @@ ${lanes.join("\n")}
40318
40299
  case 264 /* ModuleDeclaration */:
40319
40300
  return getModuleInstanceState(node, visited);
40320
40301
  case 79 /* Identifier */:
40321
- if (node.isInJSDocNamespace) {
40302
+ if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
40322
40303
  return 0 /* NonInstantiated */;
40323
40304
  }
40324
40305
  }
@@ -40754,6 +40735,7 @@ ${lanes.join("\n")}
40754
40735
  } else if (containerFlags & 64 /* IsInterface */) {
40755
40736
  seenThisKeyword = false;
40756
40737
  bindChildren(node);
40738
+ Debug.assertNotNode(node, isIdentifier);
40757
40739
  node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */;
40758
40740
  } else {
40759
40741
  bindChildren(node);
@@ -41913,13 +41895,14 @@ ${lanes.join("\n")}
41913
41895
  }
41914
41896
  function checkContextualIdentifier(node) {
41915
41897
  if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
41916
- if (inStrictMode && node.originalKeywordKind >= 117 /* FirstFutureReservedWord */ && node.originalKeywordKind <= 125 /* LastFutureReservedWord */) {
41898
+ const originalKeywordKind = identifierToKeywordKind(node);
41899
+ if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
41917
41900
  file.bindDiagnostics.push(createDiagnosticForNode2(
41918
41901
  node,
41919
41902
  getStrictModeIdentifierMessage(node),
41920
41903
  declarationNameToString(node)
41921
41904
  ));
41922
- } else if (node.originalKeywordKind === 133 /* AwaitKeyword */) {
41905
+ } else if (originalKeywordKind === 133 /* AwaitKeyword */) {
41923
41906
  if (isExternalModule(file) && isInTopLevelContext(node)) {
41924
41907
  file.bindDiagnostics.push(createDiagnosticForNode2(
41925
41908
  node,
@@ -41933,7 +41916,7 @@ ${lanes.join("\n")}
41933
41916
  declarationNameToString(node)
41934
41917
  ));
41935
41918
  }
41936
- } else if (node.originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) {
41919
+ } else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) {
41937
41920
  file.bindDiagnostics.push(createDiagnosticForNode2(
41938
41921
  node,
41939
41922
  Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,
@@ -42145,7 +42128,7 @@ ${lanes.join("\n")}
42145
42128
  function bindWorker(node) {
42146
42129
  switch (node.kind) {
42147
42130
  case 79 /* Identifier */:
42148
- if (node.isInJSDocNamespace) {
42131
+ if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
42149
42132
  let parentNode = node.parent;
42150
42133
  while (parentNode && !isJSDocTypeAlias(parentNode)) {
42151
42134
  parentNode = parentNode.parent;
@@ -47116,6 +47099,8 @@ ${lanes.join("\n")}
47116
47099
  /*isError*/
47117
47100
  false,
47118
47101
  errorNode,
47102
+ currentSourceFile,
47103
+ mode,
47119
47104
  resolvedModule,
47120
47105
  moduleReference
47121
47106
  );
@@ -47201,6 +47186,8 @@ ${lanes.join("\n")}
47201
47186
  /*isError*/
47202
47187
  noImplicitAny && !!moduleNotFoundError,
47203
47188
  errorNode,
47189
+ currentSourceFile,
47190
+ mode,
47204
47191
  resolvedModule,
47205
47192
  moduleReference
47206
47193
  );
@@ -47255,26 +47242,37 @@ ${lanes.join("\n")}
47255
47242
  return importSourceWithoutExtension;
47256
47243
  }
47257
47244
  }
47258
- function errorOnImplicitAnyModule(isError, errorNode, { packageId, resolvedFileName }, moduleReference) {
47259
- const errorInfo = !isExternalModuleNameRelative(moduleReference) && packageId ? typesPackageExists(packageId.name) ? chainDiagnosticMessages(
47260
- /*details*/
47261
- void 0,
47262
- Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,
47263
- packageId.name,
47264
- mangleScopedPackageName(packageId.name)
47265
- ) : packageBundlesTypes(packageId.name) ? chainDiagnosticMessages(
47266
- /*details*/
47267
- void 0,
47268
- Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,
47269
- packageId.name,
47270
- moduleReference
47271
- ) : chainDiagnosticMessages(
47272
- /*details*/
47273
- void 0,
47274
- Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
47275
- moduleReference,
47276
- mangleScopedPackageName(packageId.name)
47277
- ) : void 0;
47245
+ function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) {
47246
+ var _a2, _b;
47247
+ let errorInfo;
47248
+ if (!isExternalModuleNameRelative(moduleReference) && packageId) {
47249
+ const node10Result = (_b = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleReference, mode)) == null ? void 0 : _b.node10Result;
47250
+ errorInfo = node10Result ? chainDiagnosticMessages(
47251
+ /*details*/
47252
+ void 0,
47253
+ Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,
47254
+ node10Result,
47255
+ node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageId.name)}` : packageId.name
47256
+ ) : typesPackageExists(packageId.name) ? chainDiagnosticMessages(
47257
+ /*details*/
47258
+ void 0,
47259
+ Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,
47260
+ packageId.name,
47261
+ mangleScopedPackageName(packageId.name)
47262
+ ) : packageBundlesTypes(packageId.name) ? chainDiagnosticMessages(
47263
+ /*details*/
47264
+ void 0,
47265
+ Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,
47266
+ packageId.name,
47267
+ moduleReference
47268
+ ) : chainDiagnosticMessages(
47269
+ /*details*/
47270
+ void 0,
47271
+ Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
47272
+ moduleReference,
47273
+ mangleScopedPackageName(packageId.name)
47274
+ );
47275
+ }
47278
47276
  errorOrSuggestion(isError, errorNode, chainDiagnosticMessages(
47279
47277
  errorInfo,
47280
47278
  Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
@@ -48931,13 +48929,17 @@ ${lanes.join("\n")}
48931
48929
  let qualifier = root.qualifier;
48932
48930
  if (qualifier) {
48933
48931
  if (isIdentifier(qualifier)) {
48934
- qualifier = factory.updateIdentifier(qualifier, typeArguments);
48932
+ if (typeArguments !== getIdentifierTypeArguments(qualifier)) {
48933
+ qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments);
48934
+ }
48935
48935
  } else {
48936
- qualifier = factory.updateQualifiedName(
48937
- qualifier,
48938
- qualifier.left,
48939
- factory.updateIdentifier(qualifier.right, typeArguments)
48940
- );
48936
+ if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) {
48937
+ qualifier = factory.updateQualifiedName(
48938
+ qualifier,
48939
+ qualifier.left,
48940
+ setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)
48941
+ );
48942
+ }
48941
48943
  }
48942
48944
  }
48943
48945
  typeArguments = ref.typeArguments;
@@ -48957,13 +48959,17 @@ ${lanes.join("\n")}
48957
48959
  let typeArguments = root.typeArguments;
48958
48960
  let typeName = root.typeName;
48959
48961
  if (isIdentifier(typeName)) {
48960
- typeName = factory.updateIdentifier(typeName, typeArguments);
48962
+ if (typeArguments !== getIdentifierTypeArguments(typeName)) {
48963
+ typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments);
48964
+ }
48961
48965
  } else {
48962
- typeName = factory.updateQualifiedName(
48963
- typeName,
48964
- typeName.left,
48965
- factory.updateIdentifier(typeName.right, typeArguments)
48966
- );
48966
+ if (typeArguments !== getIdentifierTypeArguments(typeName.right)) {
48967
+ typeName = factory.updateQualifiedName(
48968
+ typeName,
48969
+ typeName.left,
48970
+ setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)
48971
+ );
48972
+ }
48967
48973
  }
48968
48974
  typeArguments = ref.typeArguments;
48969
48975
  const ids = getAccessStack(ref);
@@ -49677,7 +49683,11 @@ ${lanes.join("\n")}
49677
49683
  if (!nonRootParts || isEntityName(nonRootParts)) {
49678
49684
  if (nonRootParts) {
49679
49685
  const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
49680
- lastId.typeArguments = void 0;
49686
+ setIdentifierTypeArguments(
49687
+ lastId,
49688
+ /*typeArguments*/
49689
+ void 0
49690
+ );
49681
49691
  }
49682
49692
  return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
49683
49693
  } else {
@@ -49694,8 +49704,12 @@ ${lanes.join("\n")}
49694
49704
  return factory.createTypeQueryNode(entityName);
49695
49705
  } else {
49696
49706
  const lastId = isIdentifier(entityName) ? entityName : entityName.right;
49697
- const lastTypeArgs = lastId.typeArguments;
49698
- lastId.typeArguments = void 0;
49707
+ const lastTypeArgs = getIdentifierTypeArguments(lastId);
49708
+ setIdentifierTypeArguments(
49709
+ lastId,
49710
+ /*typeArguments*/
49711
+ void 0
49712
+ );
49699
49713
  return factory.createTypeReferenceNode(entityName, lastTypeArgs);
49700
49714
  }
49701
49715
  function createAccessFromSymbolChain(chain2, index, stopper) {
@@ -49739,7 +49753,9 @@ ${lanes.join("\n")}
49739
49753
  return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));
49740
49754
  }
49741
49755
  }
49742
- const identifier = setEmitFlags(factory.createIdentifier(symbolName2, typeParameterNodes), 33554432 /* NoAsciiEscaping */);
49756
+ const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
49757
+ if (typeParameterNodes)
49758
+ setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
49743
49759
  identifier.symbol = symbol2;
49744
49760
  if (index > stopper) {
49745
49761
  const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);
@@ -49797,7 +49813,9 @@ ${lanes.join("\n")}
49797
49813
  text = `${rawtext}_${i}`;
49798
49814
  }
49799
49815
  if (text !== rawtext) {
49800
- result = factory.createIdentifier(text, result.typeArguments);
49816
+ const typeArguments = getIdentifierTypeArguments(result);
49817
+ result = factory.createIdentifier(text);
49818
+ setIdentifierTypeArguments(result, typeArguments);
49801
49819
  }
49802
49820
  (context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
49803
49821
  (context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
@@ -49821,7 +49839,9 @@ ${lanes.join("\n")}
49821
49839
  if (index === 0) {
49822
49840
  context.flags ^= 16777216 /* InInitialEntityName */;
49823
49841
  }
49824
- const identifier = setEmitFlags(factory.createIdentifier(symbolName2, typeParameterNodes), 33554432 /* NoAsciiEscaping */);
49842
+ const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
49843
+ if (typeParameterNodes)
49844
+ setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
49825
49845
  identifier.symbol = symbol2;
49826
49846
  return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier;
49827
49847
  }
@@ -49844,7 +49864,9 @@ ${lanes.join("\n")}
49844
49864
  return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
49845
49865
  }
49846
49866
  if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
49847
- const identifier = setEmitFlags(factory.createIdentifier(symbolName2, typeParameterNodes), 33554432 /* NoAsciiEscaping */);
49867
+ const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
49868
+ if (typeParameterNodes)
49869
+ setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
49848
49870
  identifier.symbol = symbol2;
49849
49871
  return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
49850
49872
  } else {
@@ -49859,8 +49881,11 @@ ${lanes.join("\n")}
49859
49881
  expression = factory.createNumericLiteral(+symbolName2);
49860
49882
  }
49861
49883
  if (!expression) {
49862
- expression = setEmitFlags(factory.createIdentifier(symbolName2, typeParameterNodes), 33554432 /* NoAsciiEscaping */);
49863
- expression.symbol = symbol2;
49884
+ const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
49885
+ if (typeParameterNodes)
49886
+ setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
49887
+ identifier.symbol = symbol2;
49888
+ expression = identifier;
49864
49889
  }
49865
49890
  return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression);
49866
49891
  }
@@ -54690,7 +54715,7 @@ ${lanes.join("\n")}
54690
54715
  }
54691
54716
  function isConstTypeVariable(type) {
54692
54717
  var _a2;
54693
- return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
54718
+ return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
54694
54719
  }
54695
54720
  function getConstraintOfIndexedAccess(type) {
54696
54721
  return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
@@ -63375,19 +63400,22 @@ ${lanes.join("\n")}
63375
63400
  break;
63376
63401
  case 166 /* Parameter */:
63377
63402
  const param = declaration;
63378
- if (isIdentifier(param.name) && (isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
63379
- param,
63380
- param.name.escapedText,
63381
- 788968 /* Type */,
63382
- void 0,
63383
- param.name.escapedText,
63384
- /*isUse*/
63385
- true
63386
- ) || param.name.originalKeywordKind && isTypeNodeKind(param.name.originalKeywordKind))) {
63387
- const newName = "arg" + param.parent.parameters.indexOf(param);
63388
- const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
63389
- errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
63390
- return;
63403
+ if (isIdentifier(param.name)) {
63404
+ const originalKeywordKind = identifierToKeywordKind(param.name);
63405
+ if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
63406
+ param,
63407
+ param.name.escapedText,
63408
+ 788968 /* Type */,
63409
+ void 0,
63410
+ param.name.escapedText,
63411
+ /*isUse*/
63412
+ true
63413
+ ) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) {
63414
+ const newName = "arg" + param.parent.parameters.indexOf(param);
63415
+ const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
63416
+ errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
63417
+ return;
63418
+ }
63391
63419
  }
63392
63420
  diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;
63393
63421
  break;
@@ -63575,6 +63603,10 @@ ${lanes.join("\n")}
63575
63603
  function isTypeParameterAtTopLevel(type, typeParameter) {
63576
63604
  return !!(type === typeParameter || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isTypeParameterAtTopLevel(t, typeParameter)) || type.flags & 16777216 /* Conditional */ && (getTrueTypeFromConditionalType(type) === typeParameter || getFalseTypeFromConditionalType(type) === typeParameter));
63577
63605
  }
63606
+ function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) {
63607
+ const typePredicate = getTypePredicateOfSignature(signature);
63608
+ return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter);
63609
+ }
63578
63610
  function createEmptyObjectTypeFromStringLiteral(type) {
63579
63611
  const members = createSymbolTable();
63580
63612
  forEachType(type, (t) => {
@@ -64446,7 +64478,7 @@ ${lanes.join("\n")}
64446
64478
  function getCovariantInference(inference, signature) {
64447
64479
  const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
64448
64480
  const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
64449
- const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), inference.typeParameter));
64481
+ const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
64450
64482
  const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
64451
64483
  const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
64452
64484
  return getWidenedType(unwidenedType);
@@ -66599,6 +66631,7 @@ ${lanes.join("\n")}
66599
66631
  }
66600
66632
  }
66601
66633
  function getNarrowedTypeOfSymbol(symbol, location) {
66634
+ var _a2;
66602
66635
  const type = getTypeOfSymbol(symbol);
66603
66636
  const declaration = symbol.valueDeclaration;
66604
66637
  if (declaration) {
@@ -66634,7 +66667,7 @@ ${lanes.join("\n")}
66634
66667
  if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
66635
66668
  const contextualSignature = getContextualSignature(func);
66636
66669
  if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
66637
- const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
66670
+ const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
66638
66671
  if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
66639
66672
  const narrowedType = getFlowTypeOfReference(
66640
66673
  func,
@@ -67855,7 +67888,9 @@ ${lanes.join("\n")}
67855
67888
  }
67856
67889
  const index = findContextualNode(node);
67857
67890
  if (index >= 0) {
67858
- return contextualTypes[index];
67891
+ const cached = contextualTypes[index];
67892
+ if (cached || !contextFlags)
67893
+ return cached;
67859
67894
  }
67860
67895
  const { parent: parent2 } = node;
67861
67896
  switch (parent2.kind) {
@@ -75175,8 +75210,11 @@ ${lanes.join("\n")}
75175
75210
  }
75176
75211
  function checkTypeReferenceNode(node) {
75177
75212
  checkGrammarTypeArguments(node, node.typeArguments);
75178
- if (node.kind === 180 /* TypeReference */ && node.typeName.jsdocDotPos !== void 0 && !isInJSFile(node) && !isInJSDoc(node)) {
75179
- grammarErrorAtPos(node, node.typeName.jsdocDotPos, 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
75213
+ if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
75214
+ const sourceFile = getSourceFileOfNode(node);
75215
+ if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) {
75216
+ grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
75217
+ }
75180
75218
  }
75181
75219
  forEach(node.typeArguments, checkSourceElement);
75182
75220
  const type = getTypeFromTypeReference(node);
@@ -80785,8 +80823,9 @@ ${lanes.join("\n")}
80785
80823
  }
80786
80824
  }
80787
80825
  function getReferencedImportDeclaration(nodeIn) {
80788
- if (nodeIn.generatedImportReference) {
80789
- return nodeIn.generatedImportReference;
80826
+ const specifier = getIdentifierGeneratedImportReference(nodeIn);
80827
+ if (specifier) {
80828
+ return specifier;
80790
80829
  }
80791
80830
  const node = getParseTreeNode(nodeIn, isIdentifier);
80792
80831
  if (node) {
@@ -82764,7 +82803,7 @@ ${lanes.join("\n")}
82764
82803
  }
82765
82804
  function checkGrammarNameInLetOrConstDeclarations(name) {
82766
82805
  if (name.kind === 79 /* Identifier */) {
82767
- if (name.originalKeywordKind === 119 /* LetKeyword */) {
82806
+ if (name.escapedText === "let") {
82768
82807
  return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
82769
82808
  }
82770
82809
  } else {
@@ -83710,12 +83749,6 @@ ${lanes.join("\n")}
83710
83749
  "use strict";
83711
83750
  init_ts2();
83712
83751
  visitEachChildTable = {
83713
- [79 /* Identifier */]: function visitEachChildOfIdentifier(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
83714
- return context.factory.updateIdentifier(
83715
- node,
83716
- nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration)
83717
- );
83718
- },
83719
83752
  [163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
83720
83753
  return context.factory.updateQualifiedName(
83721
83754
  node,
@@ -88955,7 +88988,7 @@ ${lanes.join("\n")}
88955
88988
  if (isClassWithConstructorReference) {
88956
88989
  enableSubstitutionForClassAliases();
88957
88990
  const alias = factory2.cloneNode(temp);
88958
- alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
88991
+ alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
88959
88992
  classAliases[getOriginalNodeId(node)] = alias;
88960
88993
  }
88961
88994
  setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
@@ -93152,7 +93185,7 @@ ${lanes.join("\n")}
93152
93185
  factory2.createIdentifier(name),
93153
93186
  generatedName
93154
93187
  );
93155
- generatedName.generatedImportReference = specifier;
93188
+ setIdentifierGeneratedImportReference(generatedName, specifier);
93156
93189
  specifierSourceImports.set(name, specifier);
93157
93190
  return generatedName;
93158
93191
  }
@@ -94308,7 +94341,7 @@ ${lanes.join("\n")}
94308
94341
  return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments"));
94309
94342
  }
94310
94343
  }
94311
- if (node.hasExtendedUnicodeEscape) {
94344
+ if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
94312
94345
  return setOriginalNode(setTextRange(
94313
94346
  factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)),
94314
94347
  node
@@ -97195,7 +97228,7 @@ ${lanes.join("\n")}
97195
97228
  return node;
97196
97229
  }
97197
97230
  function trySubstituteReservedName(name) {
97198
- const token = name.originalKeywordKind || (nodeIsSynthesized(name) ? stringToToken(idText(name)) : void 0);
97231
+ const token = identifierToKeywordKind(name);
97199
97232
  if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) {
97200
97233
  return setTextRange(factory2.createStringLiteralFromNode(name), name);
97201
97234
  }
@@ -100875,7 +100908,7 @@ ${lanes.join("\n")}
100875
100908
  return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
100876
100909
  }
100877
100910
  return node;
100878
- } else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
100911
+ } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
100879
100912
  const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
100880
100913
  if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
100881
100914
  return setTextRange(
@@ -106842,7 +106875,7 @@ ${lanes.join("\n")}
106842
106875
  /*includeTrivia*/
106843
106876
  false
106844
106877
  ), node.symbol);
106845
- emitList(node, node.typeArguments, 53776 /* TypeParameters */);
106878
+ emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */);
106846
106879
  }
106847
106880
  function emitPrivateIdentifier(node) {
106848
106881
  write(getTextOfNode2(
@@ -109560,10 +109593,11 @@ ${lanes.join("\n")}
109560
109593
  }
109561
109594
  }
109562
109595
  function generateName(name) {
109563
- if ((name.autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
109564
- return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), name.autoGenerate.flags, name.autoGenerate.prefix, name.autoGenerate.suffix);
109596
+ const autoGenerate = name.emitNode.autoGenerate;
109597
+ if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
109598
+ return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix);
109565
109599
  } else {
109566
- const autoGenerateId = name.autoGenerate.id;
109600
+ const autoGenerateId = autoGenerate.id;
109567
109601
  return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
109568
109602
  }
109569
109603
  }
@@ -109843,16 +109877,17 @@ ${lanes.join("\n")}
109843
109877
  }
109844
109878
  }
109845
109879
  function makeName(name) {
109846
- const prefix = formatGeneratedNamePart(name.autoGenerate.prefix, generateName);
109847
- const suffix = formatGeneratedNamePart(name.autoGenerate.suffix);
109848
- switch (name.autoGenerate.flags & 7 /* KindMask */) {
109880
+ const autoGenerate = name.emitNode.autoGenerate;
109881
+ const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName);
109882
+ const suffix = formatGeneratedNamePart(autoGenerate.suffix);
109883
+ switch (autoGenerate.flags & 7 /* KindMask */) {
109849
109884
  case 1 /* Auto */:
109850
- return makeTempVariableName(TempFlags.Auto, !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
109885
+ return makeTempVariableName(TempFlags.Auto, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
109851
109886
  case 2 /* Loop */:
109852
109887
  Debug.assertNode(name, isIdentifier);
109853
109888
  return makeTempVariableName(
109854
109889
  TempFlags._i,
109855
- !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */),
109890
+ !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
109856
109891
  /*privateName*/
109857
109892
  false,
109858
109893
  prefix,
@@ -109861,16 +109896,16 @@ ${lanes.join("\n")}
109861
109896
  case 3 /* Unique */:
109862
109897
  return makeUniqueName2(
109863
109898
  idText(name),
109864
- name.autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
109865
- !!(name.autoGenerate.flags & 16 /* Optimistic */),
109866
- !!(name.autoGenerate.flags & 8 /* ReservedInNestedScopes */),
109899
+ autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
109900
+ !!(autoGenerate.flags & 16 /* Optimistic */),
109901
+ !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
109867
109902
  isPrivateIdentifier(name),
109868
109903
  prefix,
109869
109904
  suffix
109870
109905
  );
109871
109906
  }
109872
109907
  return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(
109873
- name.autoGenerate.flags & 7 /* KindMask */,
109908
+ autoGenerate.flags & 7 /* KindMask */,
109874
109909
  GeneratedIdentifierFlags,
109875
109910
  /*isFlags*/
109876
109911
  true
@@ -134638,8 +134673,8 @@ ${lanes.join("\n")}
134638
134673
  function collectExportRenames(sourceFile, checker, identifiers) {
134639
134674
  const res = /* @__PURE__ */ new Map();
134640
134675
  forEachExportReference(sourceFile, (node) => {
134641
- const { text, originalKeywordKind } = node.name;
134642
- if (!res.has(text) && (originalKeywordKind !== void 0 && isNonContextualKeyword(originalKeywordKind) || checker.resolveName(
134676
+ const { text } = node.name;
134677
+ if (!res.has(text) && (isIdentifierANonContextualKeyword(node.name) || checker.resolveName(
134643
134678
  text,
134644
134679
  node,
134645
134680
  111551 /* Value */,
@@ -143761,8 +143796,11 @@ ${lanes.join("\n")}
143761
143796
  if (isModifier(node)) {
143762
143797
  return node.kind;
143763
143798
  }
143764
- if (isIdentifier(node) && node.originalKeywordKind && isModifierKind(node.originalKeywordKind)) {
143765
- return node.originalKeywordKind;
143799
+ if (isIdentifier(node)) {
143800
+ const originalKeywordKind = identifierToKeywordKind(node);
143801
+ if (originalKeywordKind && isModifierKind(originalKeywordKind)) {
143802
+ return originalKeywordKind;
143803
+ }
143766
143804
  }
143767
143805
  return void 0;
143768
143806
  }
@@ -145931,7 +145969,8 @@ ${lanes.join("\n")}
145931
145969
  return kind === 132 /* AsyncKeyword */ || kind === 133 /* AwaitKeyword */ || kind === 128 /* AsKeyword */ || kind === 150 /* SatisfiesKeyword */ || kind === 154 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
145932
145970
  }
145933
145971
  function keywordForNode(node) {
145934
- return isIdentifier(node) ? node.originalKeywordKind || 0 /* Unknown */ : node.kind;
145972
+ var _a2;
145973
+ return isIdentifier(node) ? (_a2 = identifierToKeywordKind(node)) != null ? _a2 : 0 /* Unknown */ : node.kind;
145935
145974
  }
145936
145975
  function getContextualKeywords(contextToken, position) {
145937
145976
  const entries = [];
@@ -145977,6 +146016,7 @@ ${lanes.join("\n")}
145977
146016
  return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined");
145978
146017
  }
145979
146018
  function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
146019
+ var _a2;
145980
146020
  switch (location.kind) {
145981
146021
  case 353 /* SyntaxList */:
145982
146022
  return tryCast(location.parent, isObjectTypeDeclaration);
@@ -145987,8 +146027,8 @@ ${lanes.join("\n")}
145987
146027
  }
145988
146028
  break;
145989
146029
  case 79 /* Identifier */: {
145990
- const originalKeywordKind = location.originalKeywordKind;
145991
- if (originalKeywordKind && isKeyword(originalKeywordKind)) {
146030
+ const originalKeywordKind = identifierToKeywordKind(location);
146031
+ if (originalKeywordKind) {
145992
146032
  return void 0;
145993
146033
  }
145994
146034
  if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) {
@@ -146014,14 +146054,14 @@ ${lanes.join("\n")}
146014
146054
  case 27 /* CommaToken */:
146015
146055
  return tryCast(contextToken.parent, isObjectTypeDeclaration);
146016
146056
  default:
146017
- if (!isFromObjectTypeDeclaration(contextToken)) {
146018
- if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line && isObjectTypeDeclaration(location)) {
146057
+ if (isObjectTypeDeclaration(location)) {
146058
+ if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {
146019
146059
  return location;
146020
146060
  }
146021
- return void 0;
146061
+ const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
146062
+ return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
146022
146063
  }
146023
- const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
146024
- return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword(stringToToken(contextToken.text)) ? contextToken.parent.parent : void 0;
146064
+ return void 0;
146025
146065
  }
146026
146066
  }
146027
146067
  function tryGetTypeLiteralNode(node) {
@@ -149066,7 +149106,7 @@ ${lanes.join("\n")}
149066
149106
  }
149067
149107
  }
149068
149108
  if (!isForRenameWithPrefixAndSuffixText(state.options) || alwaysGetReferences) {
149069
- const isDefaultExport = referenceLocation.originalKeywordKind === 88 /* DefaultKeyword */ || exportSpecifier.name.originalKeywordKind === 88 /* DefaultKeyword */;
149109
+ const isDefaultExport = referenceLocation.escapedText === "default" || exportSpecifier.name.escapedText === "default";
149070
149110
  const exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */;
149071
149111
  const exportSymbol = Debug.checkDefined(exportSpecifier.symbol);
149072
149112
  const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker);
@@ -155945,7 +155985,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155945
155985
  111551 /* Value */,
155946
155986
  /*excludeGlobals*/
155947
155987
  false
155948
- ) && !isPrivateIdentifier(node.name) && !isKeyword(node.name.originalKeywordKind) ? node.name.text : getUniqueName(isClassLike(scope) ? "newProperty" : "newLocal", file);
155988
+ ) && !isPrivateIdentifier(node.name) && !identifierToKeywordKind(node.name) ? node.name.text : getUniqueName(isClassLike(scope) ? "newProperty" : "newLocal", file);
155949
155989
  const isJS = isInJSFile(scope);
155950
155990
  let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */);
155951
155991
  let initializer = transformConstantInitializer(skipParentheses(node), substitutions);
@@ -156960,7 +157000,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156960
157000
  if (declarations.some((declaration) => isDefinedInLibraryFile(program, declaration))) {
156961
157001
  return getRenameInfoError(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
156962
157002
  }
156963
- if (isIdentifier(node) && node.originalKeywordKind === 88 /* DefaultKeyword */ && symbol.parent && symbol.parent.flags & 1536 /* Module */) {
157003
+ if (isIdentifier(node) && node.escapedText === "default" && symbol.parent && symbol.parent.flags & 1536 /* Module */) {
156964
157004
  return void 0;
156965
157005
  }
156966
157006
  if (isStringLiteralLike(node) && tryGetImportFromModuleSpecifier(node)) {
@@ -158665,7 +158705,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158665
158705
  }
158666
158706
  const jsDocNode = parent2.parent.kind === 169 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent;
158667
158707
  jsDocNode.jsDoc = parent2.jsDoc;
158668
- jsDocNode.jsDocCache = parent2.jsDocCache;
158669
158708
  return jsDocNode;
158670
158709
  }
158671
158710
  function tryMergeJsdocTags(oldTag, newTag) {
@@ -162717,7 +162756,7 @@ ${options.prefix}` : "\n" : options.prefix
162717
162756
  const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
162718
162757
  const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
162719
162758
  const since = typeof options.since === "string" ? new Version(options.since) : (_b = options.since) != null ? _b : warnAfter;
162720
- const error = options.error || errorAfter && version2.compareTo(errorAfter) <= 0;
162759
+ const error = options.error || errorAfter && version2.compareTo(errorAfter) >= 0;
162721
162760
  const warn = !warnAfter || version2.compareTo(warnAfter) >= 0;
162722
162761
  return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
162723
162762
  }
@@ -163115,8 +163154,6 @@ ${options.prefix}` : "\n" : options.prefix
163115
163154
  createIdentifier = deprecate(function createIdentifier2(text) {
163116
163155
  return factory.createIdentifier(
163117
163156
  text,
163118
- /*typeArguments*/
163119
- void 0,
163120
163157
  /*originalKeywordKind*/
163121
163158
  void 0
163122
163159
  );
@@ -164112,6 +164149,44 @@ ${options.prefix}` : "\n" : options.prefix
164112
164149
  }
164113
164150
  });
164114
164151
 
164152
+ // src/deprecatedCompat/5.0/identifierProperties.ts
164153
+ var init_identifierProperties = __esm({
164154
+ "src/deprecatedCompat/5.0/identifierProperties.ts"() {
164155
+ "use strict";
164156
+ init_ts5();
164157
+ init_deprecate();
164158
+ addObjectAllocatorPatcher((objectAllocator2) => {
164159
+ const Identifier75 = objectAllocator2.getIdentifierConstructor();
164160
+ if (!hasProperty(Identifier75.prototype, "originalKeywordKind")) {
164161
+ Object.defineProperty(Identifier75.prototype, "originalKeywordKind", {
164162
+ get: deprecate(function() {
164163
+ return identifierToKeywordKind(this);
164164
+ }, {
164165
+ name: "originalKeywordKind",
164166
+ since: "5.0",
164167
+ warnAfter: "5.1",
164168
+ errorAfter: "5.2",
164169
+ message: "Use 'identifierToKeywordKind(identifier)' instead."
164170
+ })
164171
+ });
164172
+ }
164173
+ if (!hasProperty(Identifier75.prototype, "isInJSDocNamespace")) {
164174
+ Object.defineProperty(Identifier75.prototype, "isInJSDocNamespace", {
164175
+ get: deprecate(function() {
164176
+ return this.flags & 2048 /* IdentifierIsInJSDocNamespace */ ? true : void 0;
164177
+ }, {
164178
+ name: "isInJSDocNamespace",
164179
+ since: "5.0",
164180
+ warnAfter: "5.1",
164181
+ errorAfter: "5.2",
164182
+ message: "Use '.parent' or the surrounding context to determine this instead."
164183
+ })
164184
+ });
164185
+ }
164186
+ });
164187
+ }
164188
+ });
164189
+
164115
164190
  // src/deprecatedCompat/_namespaces/ts.ts
164116
164191
  var init_ts5 = __esm({
164117
164192
  "src/deprecatedCompat/_namespaces/ts.ts"() {
@@ -164125,6 +164200,7 @@ ${options.prefix}` : "\n" : options.prefix
164125
164200
  init_importTypeAssertions();
164126
164201
  init_typeParameterModifiers();
164127
164202
  init_mergeDecoratorsAndModifiers();
164203
+ init_identifierProperties();
164128
164204
  }
164129
164205
  });
164130
164206
 
@@ -164289,6 +164365,7 @@ ${options.prefix}` : "\n" : options.prefix
164289
164365
  addEmitHelper: () => addEmitHelper,
164290
164366
  addEmitHelpers: () => addEmitHelpers,
164291
164367
  addNodeFactoryPatcher: () => addNodeFactoryPatcher,
164368
+ addObjectAllocatorPatcher: () => addObjectAllocatorPatcher,
164292
164369
  addRange: () => addRange,
164293
164370
  addRelatedInfo: () => addRelatedInfo,
164294
164371
  addSyntheticLeadingComment: () => addSyntheticLeadingComment,
@@ -165057,6 +165134,9 @@ ${options.prefix}` : "\n" : options.prefix
165057
165134
  getGeneratedNameForNode: () => getGeneratedNameForNode,
165058
165135
  getHeritageClause: () => getHeritageClause,
165059
165136
  getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc,
165137
+ getIdentifierAutoGenerate: () => getIdentifierAutoGenerate,
165138
+ getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference,
165139
+ getIdentifierTypeArguments: () => getIdentifierTypeArguments,
165060
165140
  getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression,
165061
165141
  getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile,
165062
165142
  getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker,
@@ -165390,6 +165470,7 @@ ${options.prefix}` : "\n" : options.prefix
165390
165470
  hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames,
165391
165471
  idText: () => idText,
165392
165472
  identifierIsThisKeyword: () => identifierIsThisKeyword,
165473
+ identifierToKeywordKind: () => identifierToKeywordKind,
165393
165474
  identity: () => identity,
165394
165475
  identitySourceMapConsumer: () => identitySourceMapConsumer,
165395
165476
  ignoreSourceNewlines: () => ignoreSourceNewlines,
@@ -166279,6 +166360,7 @@ ${options.prefix}` : "\n" : options.prefix
166279
166360
  sameMap: () => sameMap,
166280
166361
  sameMapping: () => sameMapping,
166281
166362
  scanShebangTrivia: () => scanShebangTrivia,
166363
+ scanTokenAtPosition: () => scanTokenAtPosition,
166282
166364
  scanner: () => scanner,
166283
166365
  screenStartingMessageCodes: () => screenStartingMessageCodes,
166284
166366
  semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations,
@@ -166291,6 +166373,9 @@ ${options.prefix}` : "\n" : options.prefix
166291
166373
  setEachParent: () => setEachParent,
166292
166374
  setEmitFlags: () => setEmitFlags,
166293
166375
  setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned,
166376
+ setIdentifierAutoGenerate: () => setIdentifierAutoGenerate,
166377
+ setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference,
166378
+ setIdentifierTypeArguments: () => setIdentifierTypeArguments,
166294
166379
  setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages,
166295
166380
  setModuleDefaultHelper: () => setModuleDefaultHelper,
166296
166381
  setNodeFlags: () => setNodeFlags,