@typescript-deploys/pr-build 5.3.0-pr-55547-8 → 5.3.0-pr-55739-8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-insiders.20230913`;
38
+ version = `${versionMajorMinor}.0-insiders.20230915`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3497,7 +3497,7 @@ ${lanes.join("\n")}
3497
3497
  const name = DiagnosticCategory[d.category];
3498
3498
  return lowerCase ? name.toLowerCase() : name;
3499
3499
  }
3500
- var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
3500
+ var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, JSDocParsingMode;
3501
3501
  var init_types = __esm({
3502
3502
  "src/compiler/types.ts"() {
3503
3503
  "use strict";
@@ -5183,6 +5183,12 @@ ${lanes.join("\n")}
5183
5183
  kind: 4 /* MultiLine */
5184
5184
  }
5185
5185
  };
5186
+ JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode8) => {
5187
+ JSDocParsingMode8[JSDocParsingMode8["KeepAll"] = 0] = "KeepAll";
5188
+ JSDocParsingMode8[JSDocParsingMode8["KeepSemanticOnly"] = 1] = "KeepSemanticOnly";
5189
+ JSDocParsingMode8[JSDocParsingMode8["SkipAll"] = 2] = "SkipAll";
5190
+ return JSDocParsingMode8;
5191
+ })(JSDocParsingMode || {});
5186
5192
  }
5187
5193
  });
5188
5194
 
@@ -9582,6 +9588,8 @@ ${lanes.join("\n")}
9582
9588
  var tokenFlags;
9583
9589
  var commentDirectives;
9584
9590
  var inJSDocType = 0;
9591
+ var scriptKind = 0 /* Unknown */;
9592
+ var jsDocParsingMode = 0 /* KeepAll */;
9585
9593
  setText(text, start, length2);
9586
9594
  var scanner2 = {
9587
9595
  getTokenFullStart: () => fullStartPos,
@@ -9625,6 +9633,8 @@ ${lanes.join("\n")}
9625
9633
  setText,
9626
9634
  setScriptTarget,
9627
9635
  setLanguageVariant,
9636
+ setScriptKind,
9637
+ setJSDocParsingMode,
9628
9638
  setOnError,
9629
9639
  resetTokenState,
9630
9640
  setTextPos: resetTokenState,
@@ -9878,7 +9888,7 @@ ${lanes.join("\n")}
9878
9888
  start2 = pos;
9879
9889
  continue;
9880
9890
  }
9881
- if (isLineBreak(ch) && !jsxAttributeString) {
9891
+ if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {
9882
9892
  result += text.substring(start2, pos);
9883
9893
  tokenFlags |= 4 /* Unterminated */;
9884
9894
  error2(Diagnostics.Unterminated_string_literal);
@@ -10403,9 +10413,7 @@ ${lanes.join("\n")}
10403
10413
  }
10404
10414
  if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
10405
10415
  pos += 2;
10406
- if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */) {
10407
- tokenFlags |= 2 /* PrecedingJSDocComment */;
10408
- }
10416
+ const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */;
10409
10417
  let commentClosed = false;
10410
10418
  let lastLineStart = tokenStart;
10411
10419
  while (pos < end) {
@@ -10421,6 +10429,12 @@ ${lanes.join("\n")}
10421
10429
  tokenFlags |= 1 /* PrecedingLineBreak */;
10422
10430
  }
10423
10431
  }
10432
+ if (isJSDoc2) {
10433
+ const shouldParseJSDoc = jsDocParsingMode === 2 /* SkipAll */ ? false : jsDocParsingMode === 1 /* KeepSemanticOnly */ ? scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */ || semanticJSDocTagRegEx.test(text.slice(fullStartPos, pos)) : true;
10434
+ if (shouldParseJSDoc) {
10435
+ tokenFlags |= 2 /* PrecedingJSDocComment */;
10436
+ }
10437
+ }
10424
10438
  commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
10425
10439
  if (!commentClosed) {
10426
10440
  error2(Diagnostics.Asterisk_Slash_expected);
@@ -11091,6 +11105,12 @@ ${lanes.join("\n")}
11091
11105
  function setLanguageVariant(variant) {
11092
11106
  languageVariant = variant;
11093
11107
  }
11108
+ function setScriptKind(kind) {
11109
+ scriptKind = kind;
11110
+ }
11111
+ function setJSDocParsingMode(kind) {
11112
+ jsDocParsingMode = kind;
11113
+ }
11094
11114
  function resetTokenState(position) {
11095
11115
  Debug.assert(position >= 0);
11096
11116
  pos = position;
@@ -11125,7 +11145,7 @@ ${lanes.join("\n")}
11125
11145
  function utf16EncodeAsString(codePoint) {
11126
11146
  return utf16EncodeAsStringWorker(codePoint);
11127
11147
  }
11128
- var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
11148
+ var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, semanticJSDocTagRegEx, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
11129
11149
  var init_scanner = __esm({
11130
11150
  "src/compiler/scanner.ts"() {
11131
11151
  "use strict";
@@ -11288,6 +11308,7 @@ ${lanes.join("\n")}
11288
11308
  unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999];
11289
11309
  commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
11290
11310
  commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
11311
+ semanticJSDocTagRegEx = /@(?:see|link)/i;
11291
11312
  tokenStrings = makeReverseMap(textToToken);
11292
11313
  mergeConflictMarkerLength = "<<<<<<<".length;
11293
11314
  shebangTriviaRegex = /^#!.*/;
@@ -16846,7 +16867,7 @@ ${lanes.join("\n")}
16846
16867
  return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node;
16847
16868
  }
16848
16869
  function isRightSideOfAccessExpression(node) {
16849
- return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node;
16870
+ return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node);
16850
16871
  }
16851
16872
  function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {
16852
16873
  return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node;
@@ -18701,8 +18722,9 @@ ${lanes.join("\n")}
18701
18722
  function isNumericLiteralName(name) {
18702
18723
  return (+name).toString() === name;
18703
18724
  }
18704
- function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed) {
18705
- return isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote);
18725
+ function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed, isMethod) {
18726
+ const isMethodNamedNew = isMethod && name === "new";
18727
+ return !isMethodNamedNew && isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && !isMethodNamedNew && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote);
18706
18728
  }
18707
18729
  function isThisTypeParameter(type) {
18708
18730
  return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
@@ -28082,7 +28104,7 @@ ${lanes.join("\n")}
28082
28104
  function setExternalModuleIndicator(sourceFile) {
28083
28105
  sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
28084
28106
  }
28085
- function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
28107
+ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind, jsDocParsingMode) {
28086
28108
  var _a, _b, _c, _d;
28087
28109
  (_a = tracing) == null ? void 0 : _a.push(
28088
28110
  tracing.Phase.Parse,
@@ -28108,7 +28130,8 @@ ${lanes.join("\n")}
28108
28130
  void 0,
28109
28131
  setParentNodes,
28110
28132
  6 /* JSON */,
28111
- noop
28133
+ noop,
28134
+ jsDocParsingMode
28112
28135
  );
28113
28136
  } else {
28114
28137
  const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
@@ -28123,7 +28146,8 @@ ${lanes.join("\n")}
28123
28146
  void 0,
28124
28147
  setParentNodes,
28125
28148
  scriptKind,
28126
- setIndicator
28149
+ setIndicator,
28150
+ jsDocParsingMode
28127
28151
  );
28128
28152
  }
28129
28153
  (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
@@ -28907,7 +28931,7 @@ ${lanes.join("\n")}
28907
28931
  var contextFlags;
28908
28932
  var topLevel = true;
28909
28933
  var parseErrorBeforeNextFinishedNode = false;
28910
- function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) {
28934
+ function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* KeepAll */) {
28911
28935
  var _a;
28912
28936
  scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
28913
28937
  if (scriptKind2 === 6 /* JSON */) {
@@ -28929,8 +28953,8 @@ ${lanes.join("\n")}
28929
28953
  result2.pragmas = emptyMap;
28930
28954
  return result2;
28931
28955
  }
28932
- initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2);
28933
- const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator);
28956
+ initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);
28957
+ const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);
28934
28958
  clearState();
28935
28959
  return result;
28936
28960
  }
@@ -28942,7 +28966,8 @@ ${lanes.join("\n")}
28942
28966
  languageVersion2,
28943
28967
  /*syntaxCursor*/
28944
28968
  void 0,
28945
- 1 /* JS */
28969
+ 1 /* JS */,
28970
+ 0 /* KeepAll */
28946
28971
  );
28947
28972
  nextToken();
28948
28973
  const entityName = parseEntityName(
@@ -28955,7 +28980,7 @@ ${lanes.join("\n")}
28955
28980
  }
28956
28981
  Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
28957
28982
  function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
28958
- initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */);
28983
+ initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* KeepAll */);
28959
28984
  sourceFlags = contextFlags;
28960
28985
  nextToken();
28961
28986
  const pos = getNodePos();
@@ -29036,7 +29061,7 @@ ${lanes.join("\n")}
29036
29061
  return result;
29037
29062
  }
29038
29063
  Parser2.parseJsonText = parseJsonText2;
29039
- function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) {
29064
+ function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
29040
29065
  NodeConstructor2 = objectAllocator.getNodeConstructor();
29041
29066
  TokenConstructor2 = objectAllocator.getTokenConstructor();
29042
29067
  IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
@@ -29072,11 +29097,15 @@ ${lanes.join("\n")}
29072
29097
  scanner2.setOnError(scanError);
29073
29098
  scanner2.setScriptTarget(languageVersion);
29074
29099
  scanner2.setLanguageVariant(languageVariant);
29100
+ scanner2.setScriptKind(scriptKind);
29101
+ scanner2.setJSDocParsingMode(_jsDocParsingMode);
29075
29102
  }
29076
29103
  function clearState() {
29077
29104
  scanner2.clearCommentDirectives();
29078
29105
  scanner2.setText("");
29079
29106
  scanner2.setOnError(void 0);
29107
+ scanner2.setScriptKind(0 /* Unknown */);
29108
+ scanner2.setJSDocParsingMode(0 /* KeepAll */);
29080
29109
  sourceText = void 0;
29081
29110
  languageVersion = void 0;
29082
29111
  syntaxCursor = void 0;
@@ -29090,7 +29119,7 @@ ${lanes.join("\n")}
29090
29119
  notParenthesizedArrow = void 0;
29091
29120
  topLevel = true;
29092
29121
  }
29093
- function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) {
29122
+ function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
29094
29123
  const isDeclarationFile = isDeclarationFileName(fileName);
29095
29124
  if (isDeclarationFile) {
29096
29125
  contextFlags |= 33554432 /* Ambient */;
@@ -29109,6 +29138,7 @@ ${lanes.join("\n")}
29109
29138
  sourceFile.identifierCount = identifierCount;
29110
29139
  sourceFile.identifiers = identifiers;
29111
29140
  sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
29141
+ sourceFile.jsDocParsingMode = jsDocParsingMode;
29112
29142
  if (jsDocDiagnostics) {
29113
29143
  sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
29114
29144
  }
@@ -34542,7 +34572,8 @@ ${lanes.join("\n")}
34542
34572
  99 /* Latest */,
34543
34573
  /*syntaxCursor*/
34544
34574
  void 0,
34545
- 1 /* JS */
34575
+ 1 /* JS */,
34576
+ 0 /* KeepAll */
34546
34577
  );
34547
34578
  scanner2.setText(content, start, length2);
34548
34579
  currentToken = scanner2.scan();
@@ -34606,7 +34637,8 @@ ${lanes.join("\n")}
34606
34637
  99 /* Latest */,
34607
34638
  /*syntaxCursor*/
34608
34639
  void 0,
34609
- 1 /* JS */
34640
+ 1 /* JS */,
34641
+ 0 /* KeepAll */
34610
34642
  );
34611
34643
  const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
34612
34644
  const sourceFile = { languageVariant: 0 /* Standard */, text: content };
@@ -35561,7 +35593,8 @@ ${lanes.join("\n")}
35561
35593
  /*setParentNodes*/
35562
35594
  true,
35563
35595
  sourceFile.scriptKind,
35564
- sourceFile.setExternalModuleIndicator
35596
+ sourceFile.setExternalModuleIndicator,
35597
+ sourceFile.jsDocParsingMode
35565
35598
  );
35566
35599
  }
35567
35600
  const incrementalSourceFile = sourceFile;
@@ -35585,7 +35618,8 @@ ${lanes.join("\n")}
35585
35618
  /*setParentNodes*/
35586
35619
  true,
35587
35620
  sourceFile.scriptKind,
35588
- sourceFile.setExternalModuleIndicator
35621
+ sourceFile.setExternalModuleIndicator,
35622
+ sourceFile.jsDocParsingMode
35589
35623
  );
35590
35624
  result.commentDirectives = getNewCommentDirectives(
35591
35625
  sourceFile.commentDirectives,
@@ -45936,20 +45970,30 @@ ${lanes.join("\n")}
45936
45970
  typeHasCallOrConstructSignatures
45937
45971
  };
45938
45972
  function runWithoutResolvedSignatureCaching(node, fn) {
45939
- const cachedSignatures = [];
45973
+ const cachedResolvedSignatures = [];
45974
+ const cachedTypes2 = [];
45940
45975
  while (node) {
45941
- if (isCallLikeExpression(node)) {
45976
+ if (isCallLikeExpression(node) || isFunctionLike(node)) {
45942
45977
  const nodeLinks2 = getNodeLinks(node);
45943
45978
  const resolvedSignature = nodeLinks2.resolvedSignature;
45944
- cachedSignatures.push([nodeLinks2, resolvedSignature]);
45979
+ cachedResolvedSignatures.push([nodeLinks2, resolvedSignature]);
45945
45980
  nodeLinks2.resolvedSignature = void 0;
45946
45981
  }
45982
+ if (isFunctionLike(node)) {
45983
+ const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
45984
+ const type = symbolLinks2.type;
45985
+ cachedTypes2.push([symbolLinks2, type]);
45986
+ symbolLinks2.type = void 0;
45987
+ }
45947
45988
  node = node.parent;
45948
45989
  }
45949
45990
  const result = fn();
45950
- for (const [nodeLinks2, resolvedSignature] of cachedSignatures) {
45991
+ for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
45951
45992
  nodeLinks2.resolvedSignature = resolvedSignature;
45952
45993
  }
45994
+ for (const [symbolLinks2, type] of cachedTypes2) {
45995
+ symbolLinks2.type = type;
45996
+ }
45953
45997
  return result;
45954
45998
  }
45955
45999
  function runWithInferenceBlockedFromSourceNode(node, fn) {
@@ -51683,14 +51727,15 @@ ${lanes.join("\n")}
51683
51727
  function getPropertyNameNodeForSymbol(symbol, context) {
51684
51728
  const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
51685
51729
  const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
51686
- const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed);
51730
+ const isMethod = !!(symbol.flags & 8192 /* Method */);
51731
+ const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod);
51687
51732
  if (fromNameType) {
51688
51733
  return fromNameType;
51689
51734
  }
51690
51735
  const rawName = unescapeLeadingUnderscores(symbol.escapedName);
51691
- return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed);
51736
+ return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
51692
51737
  }
51693
- function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed) {
51738
+ function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod) {
51694
51739
  const nameType = getSymbolLinks(symbol).nameType;
51695
51740
  if (nameType) {
51696
51741
  if (nameType.flags & 384 /* StringOrNumberLiteral */) {
@@ -51701,7 +51746,7 @@ ${lanes.join("\n")}
51701
51746
  if (isNumericLiteralName(name) && startsWith(name, "-")) {
51702
51747
  return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(Math.abs(+name))));
51703
51748
  }
51704
- return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions));
51749
+ return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
51705
51750
  }
51706
51751
  if (nameType.flags & 8192 /* UniqueESSymbol */) {
51707
51752
  return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */));
@@ -53804,10 +53849,6 @@ ${lanes.join("\n")}
53804
53849
  const prop = getPropertyOfType(type, name);
53805
53850
  return prop ? getTypeOfSymbol(prop) : void 0;
53806
53851
  }
53807
- function getTypeOfPropertyOrIndexSignature(type, name) {
53808
- var _a;
53809
- return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
53810
- }
53811
53852
  function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
53812
53853
  var _a;
53813
53854
  let propType;
@@ -53946,9 +53987,14 @@ ${lanes.join("\n")}
53946
53987
  function getTypeForBindingElement(declaration) {
53947
53988
  const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
53948
53989
  const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
53949
- return parentType && getBindingElementTypeFromParentType(declaration, parentType);
53990
+ return parentType && getBindingElementTypeFromParentType(
53991
+ declaration,
53992
+ parentType,
53993
+ /*noTupleBoundsCheck*/
53994
+ false
53995
+ );
53950
53996
  }
53951
- function getBindingElementTypeFromParentType(declaration, parentType) {
53997
+ function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) {
53952
53998
  if (isTypeAny(parentType)) {
53953
53999
  return parentType;
53954
54000
  }
@@ -53987,7 +54033,7 @@ ${lanes.join("\n")}
53987
54033
  type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
53988
54034
  } else if (isArrayLikeType(parentType)) {
53989
54035
  const indexType = getNumberLiteralType(index);
53990
- const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
54036
+ const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
53991
54037
  const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
53992
54038
  type = getFlowTypeOfDestructuring(declaration, declaredType);
53993
54039
  } else {
@@ -59860,7 +59906,7 @@ ${lanes.join("\n")}
59860
59906
  return autoType;
59861
59907
  }
59862
59908
  }
59863
- const propType = getTypeOfSymbol(prop);
59909
+ const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
59864
59910
  return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType;
59865
59911
  }
59866
59912
  if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) {
@@ -65790,7 +65836,7 @@ ${lanes.join("\n")}
65790
65836
  }
65791
65837
  const name = escapeLeadingUnderscores(t.value);
65792
65838
  const literalProp = createSymbol(4 /* Property */, name);
65793
- literalProp.links.type = unknownType;
65839
+ literalProp.links.type = anyType;
65794
65840
  if (t.symbol) {
65795
65841
  literalProp.declarations = t.symbol.declarations;
65796
65842
  literalProp.valueDeclaration = t.symbol.valueDeclaration;
@@ -68158,7 +68204,7 @@ ${lanes.join("\n")}
68158
68204
  propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
68159
68205
  const narrowedPropType = narrowType2(propType);
68160
68206
  return filterType(type, (t) => {
68161
- const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName);
68207
+ const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType;
68162
68208
  return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
68163
68209
  });
68164
68210
  }
@@ -68731,7 +68777,7 @@ ${lanes.join("\n")}
68731
68777
  if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) {
68732
68778
  return getWriteTypeOfAccessors(location.parent.symbol);
68733
68779
  }
68734
- return getNonMissingTypeOfSymbol(symbol);
68780
+ return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol);
68735
68781
  }
68736
68782
  function getControlFlowContainer(node) {
68737
68783
  return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
@@ -68875,7 +68921,12 @@ ${lanes.join("\n")}
68875
68921
  if (narrowedType.flags & 131072 /* Never */) {
68876
68922
  return neverType;
68877
68923
  }
68878
- return getBindingElementTypeFromParentType(declaration, narrowedType);
68924
+ return getBindingElementTypeFromParentType(
68925
+ declaration,
68926
+ narrowedType,
68927
+ /*noTupleBoundsCheck*/
68928
+ true
68929
+ );
68879
68930
  }
68880
68931
  }
68881
68932
  }
@@ -69399,6 +69450,9 @@ ${lanes.join("\n")}
69399
69450
  error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class);
69400
69451
  return errorType;
69401
69452
  }
69453
+ if (classDeclarationExtendsNull(classLikeDeclaration)) {
69454
+ return isCallExpression2 ? errorType : nullWideningType;
69455
+ }
69402
69456
  const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration));
69403
69457
  const baseClassType = classType && getBaseTypes(classType)[0];
69404
69458
  if (!baseClassType) {
@@ -74929,7 +74983,12 @@ ${lanes.join("\n")}
74929
74983
  function assignBindingElementTypes(pattern, parentType) {
74930
74984
  for (const element of pattern.elements) {
74931
74985
  if (!isOmittedExpression(element)) {
74932
- const type = getBindingElementTypeFromParentType(element, parentType);
74986
+ const type = getBindingElementTypeFromParentType(
74987
+ element,
74988
+ parentType,
74989
+ /*noTupleBoundsCheck*/
74990
+ false
74991
+ );
74933
74992
  if (element.name.kind === 80 /* Identifier */) {
74934
74993
  getSymbolLinks(getSymbolOfDeclaration(element)).type = type;
74935
74994
  } else {
@@ -115859,6 +115918,16 @@ ${lanes.join("\n")}
115859
115918
  increaseIndent();
115860
115919
  shouldDecreaseIndentAfterEmit = true;
115861
115920
  }
115921
+ if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) {
115922
+ const commentRange = getCommentRange(child);
115923
+ emitTrailingCommentsOfPosition(
115924
+ commentRange.pos,
115925
+ /*prefixSpace*/
115926
+ !!(format & 512 /* SpaceBetweenSiblings */),
115927
+ /*forceNoNewline*/
115928
+ true
115929
+ );
115930
+ }
115862
115931
  writeLine(separatingLineTerminatorCount);
115863
115932
  shouldEmitInterveningComments = false;
115864
115933
  } else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) {
@@ -117792,10 +117861,16 @@ ${lanes.join("\n")}
117792
117861
  }
117793
117862
  return getPathFromPathComponents(commonPathComponents);
117794
117863
  }
117795
- function createCompilerHost(options, setParentNodes) {
117796
- return createCompilerHostWorker(options, setParentNodes);
117864
+ function createCompilerHost(options, setParentNodes, jsDocParsingMode) {
117865
+ return createCompilerHostWorker(
117866
+ options,
117867
+ setParentNodes,
117868
+ /*system*/
117869
+ void 0,
117870
+ jsDocParsingMode
117871
+ );
117797
117872
  }
117798
- function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
117873
+ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, jsDocParsingMode) {
117799
117874
  return (fileName, languageVersionOrOptions, onError) => {
117800
117875
  let text;
117801
117876
  try {
@@ -117809,7 +117884,15 @@ ${lanes.join("\n")}
117809
117884
  }
117810
117885
  text = "";
117811
117886
  }
117812
- return text !== void 0 ? createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : void 0;
117887
+ return text !== void 0 ? createSourceFile(
117888
+ fileName,
117889
+ text,
117890
+ languageVersionOrOptions,
117891
+ setParentNodes,
117892
+ /*scriptKind*/
117893
+ void 0,
117894
+ jsDocParsingMode
117895
+ ) : void 0;
117813
117896
  };
117814
117897
  }
117815
117898
  function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {
@@ -117833,7 +117916,7 @@ ${lanes.join("\n")}
117833
117916
  }
117834
117917
  };
117835
117918
  }
117836
- function createCompilerHostWorker(options, setParentNodes, system = sys) {
117919
+ function createCompilerHostWorker(options, setParentNodes, system = sys, jsDocParsingMode) {
117837
117920
  const existingDirectories = /* @__PURE__ */ new Map();
117838
117921
  const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
117839
117922
  function directoryExists(directoryPath) {
@@ -117852,7 +117935,7 @@ ${lanes.join("\n")}
117852
117935
  const newLine = getNewLineCharacter(options);
117853
117936
  const realpath = system.realpath && ((path) => system.realpath(path));
117854
117937
  const compilerHost = {
117855
- getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes),
117938
+ getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, jsDocParsingMode),
117856
117939
  getDefaultLibLocation,
117857
117940
  getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
117858
117941
  writeFile: createWriteFileMeasuringIO(
@@ -123573,19 +123656,22 @@ ${lanes.join("\n")}
123573
123656
  function perceivedOsRootLengthForWatching(pathComponents2, length2) {
123574
123657
  if (length2 <= 1)
123575
123658
  return 1;
123576
- let userCheckIndex = 1;
123659
+ let indexAfterOsRoot = 1;
123577
123660
  let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0;
123578
123661
  if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths
123579
123662
  pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) {
123580
123663
  if (length2 === 2)
123581
123664
  return 2;
123582
- userCheckIndex = 2;
123665
+ indexAfterOsRoot = 2;
123583
123666
  isDosStyle = true;
123584
123667
  }
123585
- if (isDosStyle && !pathComponents2[userCheckIndex].match(/^users$/i)) {
123586
- return userCheckIndex;
123668
+ if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) {
123669
+ return indexAfterOsRoot;
123670
+ }
123671
+ if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) {
123672
+ return indexAfterOsRoot + 1;
123587
123673
  }
123588
- return userCheckIndex + 2;
123674
+ return indexAfterOsRoot + 2;
123589
123675
  }
123590
123676
  function canWatchDirectoryOrFile(pathComponents2, length2) {
123591
123677
  if (length2 === void 0)
@@ -124995,7 +125081,8 @@ ${lanes.join("\n")}
124995
125081
  (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
124996
125082
  getCompilerOptions,
124997
125083
  /*setParentNodes*/
124998
- void 0
125084
+ void 0,
125085
+ host.jsDocParsingMode
124999
125086
  ),
125000
125087
  getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
125001
125088
  getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
@@ -125222,12 +125309,13 @@ ${lanes.join("\n")}
125222
125309
  return void 0;
125223
125310
  return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
125224
125311
  }
125225
- function createIncrementalCompilerHost(options, system = sys) {
125312
+ function createIncrementalCompilerHost(options, system = sys, jsDocParsingMode) {
125226
125313
  const host = createCompilerHostWorker(
125227
125314
  options,
125228
125315
  /*setParentNodes*/
125229
125316
  void 0,
125230
- system
125317
+ system,
125318
+ jsDocParsingMode
125231
125319
  );
125232
125320
  host.createHash = maybeBind(system, system.createHash);
125233
125321
  host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
@@ -133328,10 +133416,10 @@ ${lanes.join("\n")}
133328
133416
  function isDocumentRegistryEntry(entry) {
133329
133417
  return !!entry.sourceFile;
133330
133418
  }
133331
- function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
133332
- return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
133419
+ function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) {
133420
+ return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode);
133333
133421
  }
133334
- function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
133422
+ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) {
133335
133423
  const buckets = /* @__PURE__ */ new Map();
133336
133424
  const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
133337
133425
  function reportStats() {
@@ -133451,7 +133539,8 @@ ${lanes.join("\n")}
133451
133539
  version2,
133452
133540
  /*setNodeParents*/
133453
133541
  false,
133454
- scriptKind
133542
+ scriptKind,
133543
+ jsDocParsingMode
133455
133544
  );
133456
133545
  if (externalCache) {
133457
133546
  externalCache.setDocument(keyWithMode, path, sourceFile);
@@ -134872,7 +134961,12 @@ ${lanes.join("\n")}
134872
134961
  options
134873
134962
  ),
134874
134963
  setExternalModuleIndicator: getSetExternalModuleIndicator(options)
134875
- }
134964
+ },
134965
+ /*setParentNodes*/
134966
+ void 0,
134967
+ /*scriptKind*/
134968
+ void 0,
134969
+ 2 /* SkipAll */
134876
134970
  );
134877
134971
  if (transpileOptions.moduleName) {
134878
134972
  sourceFile.moduleName = transpileOptions.moduleName;
@@ -141750,8 +141844,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141750
141844
  sourceFile.version = version2;
141751
141845
  sourceFile.scriptSnapshot = scriptSnapshot;
141752
141846
  }
141753
- function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind) {
141754
- const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind);
141847
+ function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind, jsDocParsingMode) {
141848
+ const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind, jsDocParsingMode);
141755
141849
  setSourceFileFields(sourceFile, scriptSnapshot, version2);
141756
141850
  return sourceFile;
141757
141851
  }
@@ -141791,7 +141885,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141791
141885
  version2,
141792
141886
  /*setNodeParents*/
141793
141887
  true,
141794
- sourceFile.scriptKind
141888
+ sourceFile.scriptKind,
141889
+ sourceFile.jsDocParsingMode
141795
141890
  );
141796
141891
  }
141797
141892
  function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()), syntaxOnlyOrLanguageServiceMode) {
@@ -143638,7 +143733,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
143638
143733
  version2,
143639
143734
  /*setNodeParents*/
143640
143735
  true,
143641
- scriptKind
143736
+ scriptKind,
143737
+ this.host.jsDocParsingMode
143642
143738
  );
143643
143739
  } else if (this.currentFileVersion !== version2) {
143644
143740
  const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);
@@ -151643,7 +151739,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
151643
151739
  if (prop && isComputedPropertyName(prop))
151644
151740
  return prop;
151645
151741
  }
151646
- return createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */);
151742
+ return createPropertyNameNodeForIdentifierOrLiteral(
151743
+ symbol.name,
151744
+ target,
151745
+ quotePreference === 0 /* Single */,
151746
+ /*stringNamed*/
151747
+ false,
151748
+ /*isMethod*/
151749
+ false
151750
+ );
151647
151751
  }
151648
151752
  function findScope(node) {
151649
151753
  if (findAncestor(node, isJsxExpression)) {
@@ -168671,7 +168775,8 @@ ${options.prefix}` : "\n" : options.prefix
168671
168775
  99 /* ESNext */,
168672
168776
  /*setParentNodes*/
168673
168777
  true,
168674
- scriptKind
168778
+ scriptKind,
168779
+ 2 /* SkipAll */
168675
168780
  );
168676
168781
  const changes = ts_formatting_exports.formatDocument(sourceFile, formatContext);
168677
168782
  return applyChanges(nonFormattedText, changes) + newLineCharacter;
@@ -173480,6 +173585,7 @@ ${options.prefix}` : "\n" : options.prefix
173480
173585
  this.directoryStructureHost = directoryStructureHost;
173481
173586
  this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
173482
173587
  this.getCanonicalFileName = this.projectService.toCanonicalFileName;
173588
+ this.jsDocParsingMode = this.projectService.jsDocParsingMode;
173483
173589
  this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
173484
173590
  if (!this.compilerOptions) {
173485
173591
  this.compilerOptions = getDefaultCompilerOptions2();
@@ -176042,6 +176148,7 @@ ${options.prefix}` : "\n" : options.prefix
176042
176148
  this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
176043
176149
  this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
176044
176150
  this.session = opts.session;
176151
+ this.jsDocParsingMode = opts.jsDocParsingMode;
176045
176152
  if (opts.serverMode !== void 0) {
176046
176153
  this.serverMode = opts.serverMode;
176047
176154
  } else {
@@ -176067,7 +176174,7 @@ ${options.prefix}` : "\n" : options.prefix
176067
176174
  hostInfo: "Unknown host",
176068
176175
  extraFileExtensions: []
176069
176176
  };
176070
- this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this);
176177
+ this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this);
176071
176178
  const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;
176072
176179
  const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;
176073
176180
  this.packageJsonCache = createPackageJsonCache(this);
@@ -183359,6 +183466,7 @@ ${e.message}`;
183359
183466
  InternalEmitFlags: () => InternalEmitFlags,
183360
183467
  InternalSymbolName: () => InternalSymbolName,
183361
183468
  InvalidatedProjectKind: () => InvalidatedProjectKind,
183469
+ JSDocParsingMode: () => JSDocParsingMode,
183362
183470
  JsDoc: () => ts_JsDoc_exports,
183363
183471
  JsTyping: () => ts_JsTyping_exports,
183364
183472
  JsxEmit: () => JsxEmit,
@@ -185763,6 +185871,7 @@ ${e.message}`;
185763
185871
  InternalEmitFlags: () => InternalEmitFlags,
185764
185872
  InternalSymbolName: () => InternalSymbolName,
185765
185873
  InvalidatedProjectKind: () => InvalidatedProjectKind,
185874
+ JSDocParsingMode: () => JSDocParsingMode,
185766
185875
  JsDoc: () => ts_JsDoc_exports,
185767
185876
  JsTyping: () => ts_JsTyping_exports,
185768
185877
  JsxEmit: () => JsxEmit,