@typescript-deploys/pr-build 5.3.0-pr-55739-21 → 5.3.0-pr-53714-29

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/tsserver.js CHANGED
@@ -103,7 +103,6 @@ __export(server_exports, {
103
103
  InternalEmitFlags: () => InternalEmitFlags,
104
104
  InternalSymbolName: () => InternalSymbolName,
105
105
  InvalidatedProjectKind: () => InvalidatedProjectKind,
106
- JSDocParsingMode: () => JSDocParsingMode,
107
106
  JsDoc: () => ts_JsDoc_exports,
108
107
  JsTyping: () => ts_JsTyping_exports,
109
108
  JsxEmit: () => JsxEmit,
@@ -7423,13 +7422,6 @@ var commentPragmas = {
7423
7422
  kind: 4 /* MultiLine */
7424
7423
  }
7425
7424
  };
7426
- var JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode8) => {
7427
- JSDocParsingMode8[JSDocParsingMode8["ParseAll"] = 0] = "ParseAll";
7428
- JSDocParsingMode8[JSDocParsingMode8["ParseForTypeErrors"] = 1] = "ParseForTypeErrors";
7429
- JSDocParsingMode8[JSDocParsingMode8["ParseForTypeInfo"] = 2] = "ParseForTypeInfo";
7430
- JSDocParsingMode8[JSDocParsingMode8["ParseNone"] = 3] = "ParseNone";
7431
- return JSDocParsingMode8;
7432
- })(JSDocParsingMode || {});
7433
7425
 
7434
7426
  // src/compiler/sys.ts
7435
7427
  function generateDjb2Hash(data) {
@@ -11461,7 +11453,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18
11461
11453
  var 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];
11462
11454
  var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
11463
11455
  var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
11464
- var jsDocSeeOrLink = /@(?:see|link)/i;
11456
+ var semanticJSDocTagRegEx = /@(?:see|link)/i;
11465
11457
  function lookupInUnicodeMap(code, map2) {
11466
11458
  if (code < map2[0]) {
11467
11459
  return false;
@@ -11968,8 +11960,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
11968
11960
  var tokenFlags;
11969
11961
  var commentDirectives;
11970
11962
  var inJSDocType = 0;
11971
- var scriptKind = 0 /* Unknown */;
11972
- var jsDocParsingMode = 0 /* ParseAll */;
11963
+ var skipNonSemanticJSDoc = false;
11973
11964
  setText(text, start2, length2);
11974
11965
  var scanner2 = {
11975
11966
  getTokenFullStart: () => fullStartPos,
@@ -12013,15 +12004,14 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12013
12004
  setText,
12014
12005
  setScriptTarget,
12015
12006
  setLanguageVariant,
12016
- setScriptKind,
12017
- setJSDocParsingMode,
12018
12007
  setOnError,
12019
12008
  resetTokenState,
12020
12009
  setTextPos: resetTokenState,
12021
12010
  setInJSDocType,
12022
12011
  tryScan,
12023
12012
  lookAhead,
12024
- scanRange
12013
+ scanRange,
12014
+ setSkipNonSemanticJSDoc
12025
12015
  };
12026
12016
  if (Debug.isDebugging) {
12027
12017
  Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", {
@@ -12809,7 +12799,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12809
12799
  tokenFlags |= 1 /* PrecedingLineBreak */;
12810
12800
  }
12811
12801
  }
12812
- if (isJSDoc2 && shouldParseJSDoc()) {
12802
+ if (isJSDoc2 && (!skipNonSemanticJSDoc || semanticJSDocTagRegEx.test(text.slice(fullStartPos, pos)))) {
12813
12803
  tokenFlags |= 2 /* PrecedingJSDocComment */;
12814
12804
  }
12815
12805
  commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
@@ -13068,21 +13058,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13068
13058
  }
13069
13059
  }
13070
13060
  }
13071
- function shouldParseJSDoc() {
13072
- switch (jsDocParsingMode) {
13073
- case 0 /* ParseAll */:
13074
- return true;
13075
- case 3 /* ParseNone */:
13076
- return false;
13077
- }
13078
- if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {
13079
- return true;
13080
- }
13081
- if (jsDocParsingMode === 2 /* ParseForTypeInfo */) {
13082
- return false;
13083
- }
13084
- return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));
13085
- }
13086
13061
  function reScanInvalidIdentifier() {
13087
13062
  Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.");
13088
13063
  pos = tokenStart = fullStartPos;
@@ -13497,11 +13472,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13497
13472
  function setLanguageVariant(variant) {
13498
13473
  languageVariant = variant;
13499
13474
  }
13500
- function setScriptKind(kind) {
13501
- scriptKind = kind;
13502
- }
13503
- function setJSDocParsingMode(kind) {
13504
- jsDocParsingMode = kind;
13475
+ function setSkipNonSemanticJSDoc(skip) {
13476
+ skipNonSemanticJSDoc = skip;
13505
13477
  }
13506
13478
  function resetTokenState(position) {
13507
13479
  Debug.assert(position >= 0);
@@ -30696,7 +30668,7 @@ function gatherPossibleChildren(node) {
30696
30668
  function setExternalModuleIndicator(sourceFile) {
30697
30669
  sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
30698
30670
  }
30699
- function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind, jsDocParsingMode) {
30671
+ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind, skipNonSemanticJSDoc) {
30700
30672
  var _a, _b, _c, _d;
30701
30673
  (_a = tracing) == null ? void 0 : _a.push(
30702
30674
  tracing.Phase.Parse,
@@ -30723,7 +30695,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
30723
30695
  setParentNodes,
30724
30696
  6 /* JSON */,
30725
30697
  noop,
30726
- jsDocParsingMode
30698
+ skipNonSemanticJSDoc
30727
30699
  );
30728
30700
  } else {
30729
30701
  const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
@@ -30739,7 +30711,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
30739
30711
  setParentNodes,
30740
30712
  scriptKind,
30741
30713
  setIndicator,
30742
- jsDocParsingMode
30714
+ skipNonSemanticJSDoc
30743
30715
  );
30744
30716
  }
30745
30717
  (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
@@ -30873,7 +30845,7 @@ var Parser;
30873
30845
  var contextFlags;
30874
30846
  var topLevel = true;
30875
30847
  var parseErrorBeforeNextFinishedNode = false;
30876
- function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) {
30848
+ function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, skipNonSemanticJSDoc) {
30877
30849
  var _a;
30878
30850
  scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
30879
30851
  if (scriptKind2 === 6 /* JSON */) {
@@ -30895,8 +30867,9 @@ var Parser;
30895
30867
  result2.pragmas = emptyMap;
30896
30868
  return result2;
30897
30869
  }
30898
- initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);
30899
- const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);
30870
+ skipNonSemanticJSDoc = !!skipNonSemanticJSDoc && scriptKind2 !== 1 /* JS */ && scriptKind2 !== 2 /* JSX */;
30871
+ initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, skipNonSemanticJSDoc);
30872
+ const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
30900
30873
  clearState();
30901
30874
  return result;
30902
30875
  }
@@ -30909,7 +30882,8 @@ var Parser;
30909
30882
  /*syntaxCursor*/
30910
30883
  void 0,
30911
30884
  1 /* JS */,
30912
- 0 /* ParseAll */
30885
+ /*skipNonSemanticJSDoc*/
30886
+ false
30913
30887
  );
30914
30888
  nextToken();
30915
30889
  const entityName = parseEntityName(
@@ -30922,7 +30896,15 @@ var Parser;
30922
30896
  }
30923
30897
  Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
30924
30898
  function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
30925
- initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */);
30899
+ initializeState(
30900
+ fileName2,
30901
+ sourceText2,
30902
+ languageVersion2,
30903
+ syntaxCursor2,
30904
+ 6 /* JSON */,
30905
+ /*skipNonSemanticJSDoc*/
30906
+ false
30907
+ );
30926
30908
  sourceFlags = contextFlags;
30927
30909
  nextToken();
30928
30910
  const pos = getNodePos();
@@ -31003,7 +30985,7 @@ var Parser;
31003
30985
  return result;
31004
30986
  }
31005
30987
  Parser2.parseJsonText = parseJsonText2;
31006
- function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
30988
+ function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _skipNonSemanticJSDoc) {
31007
30989
  NodeConstructor2 = objectAllocator.getNodeConstructor();
31008
30990
  TokenConstructor2 = objectAllocator.getTokenConstructor();
31009
30991
  IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
@@ -31039,15 +31021,13 @@ var Parser;
31039
31021
  scanner2.setOnError(scanError);
31040
31022
  scanner2.setScriptTarget(languageVersion);
31041
31023
  scanner2.setLanguageVariant(languageVariant);
31042
- scanner2.setScriptKind(scriptKind);
31043
- scanner2.setJSDocParsingMode(_jsDocParsingMode);
31024
+ scanner2.setSkipNonSemanticJSDoc(_skipNonSemanticJSDoc);
31044
31025
  }
31045
31026
  function clearState() {
31046
31027
  scanner2.clearCommentDirectives();
31047
31028
  scanner2.setText("");
31048
31029
  scanner2.setOnError(void 0);
31049
- scanner2.setScriptKind(0 /* Unknown */);
31050
- scanner2.setJSDocParsingMode(0 /* ParseAll */);
31030
+ scanner2.setSkipNonSemanticJSDoc(false);
31051
31031
  sourceText = void 0;
31052
31032
  languageVersion = void 0;
31053
31033
  syntaxCursor = void 0;
@@ -31061,7 +31041,7 @@ var Parser;
31061
31041
  notParenthesizedArrow = void 0;
31062
31042
  topLevel = true;
31063
31043
  }
31064
- function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
31044
+ function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, skipNonSemanticJSDoc) {
31065
31045
  const isDeclarationFile = isDeclarationFileName(fileName);
31066
31046
  if (isDeclarationFile) {
31067
31047
  contextFlags |= 33554432 /* Ambient */;
@@ -31080,7 +31060,7 @@ var Parser;
31080
31060
  sourceFile.identifierCount = identifierCount;
31081
31061
  sourceFile.identifiers = identifiers;
31082
31062
  sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
31083
- sourceFile.jsDocParsingMode = jsDocParsingMode;
31063
+ sourceFile.skipNonSemanticJSDoc = skipNonSemanticJSDoc;
31084
31064
  if (jsDocDiagnostics) {
31085
31065
  sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
31086
31066
  }
@@ -36515,7 +36495,8 @@ var Parser;
36515
36495
  /*syntaxCursor*/
36516
36496
  void 0,
36517
36497
  1 /* JS */,
36518
- 0 /* ParseAll */
36498
+ /*skipNonSemanticJSDoc*/
36499
+ false
36519
36500
  );
36520
36501
  scanner2.setText(content, start2, length2);
36521
36502
  currentToken = scanner2.scan();
@@ -36580,7 +36561,8 @@ var Parser;
36580
36561
  /*syntaxCursor*/
36581
36562
  void 0,
36582
36563
  1 /* JS */,
36583
- 0 /* ParseAll */
36564
+ /*skipNonSemanticJSDoc*/
36565
+ false
36584
36566
  );
36585
36567
  const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2));
36586
36568
  const sourceFile = { languageVariant: 0 /* Standard */, text: content };
@@ -37537,7 +37519,7 @@ var IncrementalParser;
37537
37519
  true,
37538
37520
  sourceFile.scriptKind,
37539
37521
  sourceFile.setExternalModuleIndicator,
37540
- sourceFile.jsDocParsingMode
37522
+ sourceFile.skipNonSemanticJSDoc
37541
37523
  );
37542
37524
  }
37543
37525
  const incrementalSourceFile = sourceFile;
@@ -37562,7 +37544,7 @@ var IncrementalParser;
37562
37544
  true,
37563
37545
  sourceFile.scriptKind,
37564
37546
  sourceFile.setExternalModuleIndicator,
37565
- sourceFile.jsDocParsingMode
37547
+ sourceFile.skipNonSemanticJSDoc
37566
37548
  );
37567
37549
  result.commentDirectives = getNewCommentDirectives(
37568
37550
  sourceFile.commentDirectives,
@@ -44595,7 +44577,7 @@ function createBinder() {
44595
44577
  case 36 /* ExclamationEqualsToken */:
44596
44578
  case 37 /* EqualsEqualsEqualsToken */:
44597
44579
  case 38 /* ExclamationEqualsEqualsToken */:
44598
- return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
44580
+ return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right));
44599
44581
  case 104 /* InstanceOfKeyword */:
44600
44582
  return isNarrowableOperand(expr.left);
44601
44583
  case 103 /* InKeyword */:
@@ -44915,7 +44897,7 @@ function createBinder() {
44915
44897
  }
44916
44898
  function bindCaseBlock(node) {
44917
44899
  const clauses = node.clauses;
44918
- const isNarrowingSwitch = isNarrowingExpression(node.parent.expression);
44900
+ const isNarrowingSwitch = node.parent.expression.kind === 112 /* TrueKeyword */ || isNarrowingExpression(node.parent.expression);
44919
44901
  let fallthroughFlow = unreachableFlow;
44920
44902
  for (let i = 0; i < clauses.length; i++) {
44921
44903
  const clauseStart = i;
@@ -70267,6 +70249,17 @@ function createTypeChecker(host) {
70267
70249
  type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
70268
70250
  } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) {
70269
70251
  type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
70252
+ } else if (expr.kind === 112 /* TrueKeyword */) {
70253
+ const clause = flow.switchStatement.caseBlock.clauses.find((_, index) => index === flow.clauseStart);
70254
+ const clauseExpression = clause && clause.kind === 296 /* CaseClause */ ? clause.expression : void 0;
70255
+ if (clauseExpression) {
70256
+ type = narrowType(
70257
+ type,
70258
+ clauseExpression,
70259
+ /*assumeTrue*/
70260
+ true
70261
+ );
70262
+ }
70270
70263
  } else {
70271
70264
  if (strictNullChecks) {
70272
70265
  if (optionalChainContainsReference(expr, reference)) {
@@ -70514,6 +70507,10 @@ function createTypeChecker(host) {
70514
70507
  }
70515
70508
  return type;
70516
70509
  }
70510
+ function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) {
70511
+ assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */);
70512
+ return narrowType(type, expr, assumeTrue);
70513
+ }
70517
70514
  function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
70518
70515
  switch (expr.operatorToken.kind) {
70519
70516
  case 64 /* EqualsToken */:
@@ -70561,6 +70558,12 @@ function createTypeChecker(host) {
70561
70558
  if (isMatchingConstructorReference(right)) {
70562
70559
  return narrowTypeByConstructor(type, operator, left, assumeTrue);
70563
70560
  }
70561
+ if (isBooleanLiteral(right)) {
70562
+ return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue);
70563
+ }
70564
+ if (isBooleanLiteral(left)) {
70565
+ return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue);
70566
+ }
70564
70567
  break;
70565
70568
  case 104 /* InstanceOfKeyword */:
70566
70569
  return narrowTypeByInstanceof(type, expr, assumeTrue);
@@ -119766,16 +119769,10 @@ function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, ge
119766
119769
  }
119767
119770
  return getPathFromPathComponents(commonPathComponents);
119768
119771
  }
119769
- function createCompilerHost(options, setParentNodes, jsDocParsingMode) {
119770
- return createCompilerHostWorker(
119771
- options,
119772
- setParentNodes,
119773
- /*system*/
119774
- void 0,
119775
- jsDocParsingMode
119776
- );
119772
+ function createCompilerHost(options, setParentNodes) {
119773
+ return createCompilerHostWorker(options, setParentNodes);
119777
119774
  }
119778
- function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, jsDocParsingMode) {
119775
+ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, skipNonSemanticJSDocParsing) {
119779
119776
  return (fileName, languageVersionOrOptions, onError) => {
119780
119777
  let text;
119781
119778
  try {
@@ -119796,7 +119793,7 @@ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, jsDoc
119796
119793
  setParentNodes,
119797
119794
  /*scriptKind*/
119798
119795
  void 0,
119799
- jsDocParsingMode
119796
+ skipNonSemanticJSDocParsing
119800
119797
  ) : void 0;
119801
119798
  };
119802
119799
  }
@@ -119821,7 +119818,7 @@ function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryE
119821
119818
  }
119822
119819
  };
119823
119820
  }
119824
- function createCompilerHostWorker(options, setParentNodes, system = sys, jsDocParsingMode) {
119821
+ function createCompilerHostWorker(options, setParentNodes, skipNonSemanticJSDocParsing, system = sys) {
119825
119822
  const existingDirectories = /* @__PURE__ */ new Map();
119826
119823
  const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
119827
119824
  function directoryExists(directoryPath) {
@@ -119840,7 +119837,7 @@ function createCompilerHostWorker(options, setParentNodes, system = sys, jsDocPa
119840
119837
  const newLine = getNewLineCharacter(options);
119841
119838
  const realpath = system.realpath && ((path) => system.realpath(path));
119842
119839
  const compilerHost = {
119843
- getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, jsDocParsingMode),
119840
+ getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, skipNonSemanticJSDocParsing),
119844
119841
  getDefaultLibLocation,
119845
119842
  getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
119846
119843
  writeFile: createWriteFileMeasuringIO(
@@ -126981,7 +126978,7 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
126981
126978
  getCompilerOptions,
126982
126979
  /*setParentNodes*/
126983
126980
  void 0,
126984
- host.jsDocParsingMode
126981
+ host.skipNonSemanticJSDocParsing
126985
126982
  ),
126986
126983
  getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
126987
126984
  getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
@@ -127167,13 +127164,13 @@ function readBuilderProgram(compilerOptions, host) {
127167
127164
  return void 0;
127168
127165
  return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
127169
127166
  }
127170
- function createIncrementalCompilerHost(options, system = sys, jsDocParsingMode) {
127167
+ function createIncrementalCompilerHost(options, system = sys, skipNonSemanticJSDocParsing) {
127171
127168
  const host = createCompilerHostWorker(
127172
127169
  options,
127173
127170
  /*setParentNodes*/
127174
127171
  void 0,
127175
- system,
127176
- jsDocParsingMode
127172
+ skipNonSemanticJSDocParsing,
127173
+ system
127177
127174
  );
127178
127175
  host.createHash = maybeBind(system, system.createHash);
127179
127176
  host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
@@ -135096,10 +135093,10 @@ var DocumentHighlights;
135096
135093
  function isDocumentRegistryEntry(entry) {
135097
135094
  return !!entry.sourceFile;
135098
135095
  }
135099
- function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) {
135100
- return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode);
135096
+ function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
135097
+ return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
135101
135098
  }
135102
- function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) {
135099
+ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
135103
135100
  const buckets = /* @__PURE__ */ new Map();
135104
135101
  const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
135105
135102
  function reportStats() {
@@ -135219,8 +135216,7 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirec
135219
135216
  version2,
135220
135217
  /*setNodeParents*/
135221
135218
  false,
135222
- scriptKind,
135223
- jsDocParsingMode
135219
+ scriptKind
135224
135220
  );
135225
135221
  if (externalCache) {
135226
135222
  externalCache.setDocument(keyWithMode, path, sourceFile);
@@ -136607,12 +136603,7 @@ function transpileModule(input, transpileOptions) {
136607
136603
  options
136608
136604
  ),
136609
136605
  setExternalModuleIndicator: getSetExternalModuleIndicator(options)
136610
- },
136611
- /*setParentNodes*/
136612
- void 0,
136613
- /*scriptKind*/
136614
- void 0,
136615
- 3 /* ParseNone */
136606
+ }
136616
136607
  );
136617
136608
  if (transpileOptions.moduleName) {
136618
136609
  sourceFile.moduleName = transpileOptions.moduleName;
@@ -143811,8 +143802,7 @@ var SyntaxTreeCache = class {
143811
143802
  version2,
143812
143803
  /*setNodeParents*/
143813
143804
  true,
143814
- scriptKind,
143815
- this.host.jsDocParsingMode
143805
+ scriptKind
143816
143806
  );
143817
143807
  } else if (this.currentFileVersion !== version2) {
143818
143808
  const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);
@@ -143831,8 +143821,8 @@ function setSourceFileFields(sourceFile, scriptSnapshot, version2) {
143831
143821
  sourceFile.version = version2;
143832
143822
  sourceFile.scriptSnapshot = scriptSnapshot;
143833
143823
  }
143834
- function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind, jsDocParsingMode) {
143835
- const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind, jsDocParsingMode);
143824
+ function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind) {
143825
+ const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind);
143836
143826
  setSourceFileFields(sourceFile, scriptSnapshot, version2);
143837
143827
  return sourceFile;
143838
143828
  }
@@ -143872,8 +143862,7 @@ function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version2, t
143872
143862
  version2,
143873
143863
  /*setNodeParents*/
143874
143864
  true,
143875
- sourceFile.scriptKind,
143876
- sourceFile.jsDocParsingMode
143865
+ sourceFile.scriptKind
143877
143866
  );
143878
143867
  }
143879
143868
  var NoopCancellationToken = {
@@ -151130,7 +151119,6 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF
151130
151119
  if (aliasDeclaration.isTypeOnly) {
151131
151120
  const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences);
151132
151121
  if (aliasDeclaration.parent.elements.length > 1 && sortKind) {
151133
- changes.delete(sourceFile, aliasDeclaration);
151134
151122
  const newSpecifier = factory.updateImportSpecifier(
151135
151123
  aliasDeclaration,
151136
151124
  /*isTypeOnly*/
@@ -151140,10 +151128,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF
151140
151128
  );
151141
151129
  const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */);
151142
151130
  const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier, comparer);
151143
- changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex);
151144
- } else {
151145
- changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken());
151131
+ if (aliasDeclaration.parent.elements.indexOf(aliasDeclaration) !== insertionIndex) {
151132
+ changes.delete(sourceFile, aliasDeclaration);
151133
+ changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex);
151134
+ return aliasDeclaration;
151135
+ }
151146
151136
  }
151137
+ changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken());
151147
151138
  return aliasDeclaration;
151148
151139
  } else {
151149
151140
  Debug.assert(aliasDeclaration.parent.parent.isTypeOnly);
@@ -169008,8 +168999,7 @@ var changesToText;
169008
168999
  99 /* ESNext */,
169009
169000
  /*setParentNodes*/
169010
169001
  true,
169011
- scriptKind,
169012
- 3 /* ParseNone */
169002
+ scriptKind
169013
169003
  );
169014
169004
  const changes = ts_formatting_exports.formatDocument(sourceFile, formatContext);
169015
169005
  return applyChanges(nonFormattedText, changes) + newLineCharacter;
@@ -172291,7 +172281,6 @@ __export(ts_exports2, {
172291
172281
  InternalEmitFlags: () => InternalEmitFlags,
172292
172282
  InternalSymbolName: () => InternalSymbolName,
172293
172283
  InvalidatedProjectKind: () => InvalidatedProjectKind,
172294
- JSDocParsingMode: () => JSDocParsingMode,
172295
172284
  JsDoc: () => ts_JsDoc_exports,
172296
172285
  JsTyping: () => ts_JsTyping_exports,
172297
172286
  JsxEmit: () => JsxEmit,
@@ -176260,7 +176249,6 @@ var Project3 = class _Project {
176260
176249
  this.directoryStructureHost = directoryStructureHost;
176261
176250
  this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
176262
176251
  this.getCanonicalFileName = this.projectService.toCanonicalFileName;
176263
- this.jsDocParsingMode = this.projectService.jsDocParsingMode;
176264
176252
  this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
176265
176253
  if (!this.compilerOptions) {
176266
176254
  this.compilerOptions = getDefaultCompilerOptions2();
@@ -178819,7 +178807,6 @@ var _ProjectService = class _ProjectService {
178819
178807
  this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
178820
178808
  this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
178821
178809
  this.session = opts.session;
178822
- this.jsDocParsingMode = opts.jsDocParsingMode;
178823
178810
  if (opts.serverMode !== void 0) {
178824
178811
  this.serverMode = opts.serverMode;
178825
178812
  } else {
@@ -178845,7 +178832,7 @@ var _ProjectService = class _ProjectService {
178845
178832
  hostInfo: "Unknown host",
178846
178833
  extraFileExtensions: []
178847
178834
  };
178848
- this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this);
178835
+ this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this);
178849
178836
  const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;
178850
178837
  const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;
178851
178838
  this.packageJsonCache = createPackageJsonCache(this);
@@ -186856,7 +186843,6 @@ start(initializeNodeSystem(), require("os").platform());
186856
186843
  InternalEmitFlags,
186857
186844
  InternalSymbolName,
186858
186845
  InvalidatedProjectKind,
186859
- JSDocParsingMode,
186860
186846
  JsDoc,
186861
186847
  JsTyping,
186862
186848
  JsxEmit,
@@ -3616,7 +3616,6 @@ declare namespace ts {
3616
3616
  typesMapLocation?: string;
3617
3617
  serverMode?: LanguageServiceMode;
3618
3618
  session: Session<unknown> | undefined;
3619
- jsDocParsingMode?: JSDocParsingMode;
3620
3619
  }
3621
3620
  interface WatchOptionsAndErrors {
3622
3621
  watchOptions: WatchOptions;
@@ -3691,7 +3690,6 @@ declare namespace ts {
3691
3690
  private performanceEventHandler?;
3692
3691
  private pendingPluginEnablements?;
3693
3692
  private currentPluginEnablementPromise?;
3694
- readonly jsDocParsingMode: JSDocParsingMode | undefined;
3695
3693
  constructor(opts: ProjectServiceOptions);
3696
3694
  toPath(fileName: string): Path;
3697
3695
  private loadTypesMap;
@@ -8609,12 +8607,6 @@ declare namespace ts {
8609
8607
  IndexSignatureParameters = 8848,
8610
8608
  JSDocComment = 33,
8611
8609
  }
8612
- enum JSDocParsingMode {
8613
- ParseAll = 0,
8614
- ParseForTypeErrors = 1,
8615
- ParseForTypeInfo = 2,
8616
- ParseNone = 3,
8617
- }
8618
8610
  interface UserPreferences {
8619
8611
  readonly disableSuggestions?: boolean;
8620
8612
  readonly quotePreference?: "auto" | "double" | "single";
@@ -8776,8 +8768,6 @@ declare namespace ts {
8776
8768
  setOnError(onError: ErrorCallback | undefined): void;
8777
8769
  setScriptTarget(scriptTarget: ScriptTarget): void;
8778
8770
  setLanguageVariant(variant: LanguageVariant): void;
8779
- setScriptKind(scriptKind: ScriptKind): void;
8780
- setJSDocParsingMode(kind: JSDocParsingMode): void;
8781
8771
  /** @deprecated use {@link resetTokenState} */
8782
8772
  setTextPos(textPos: number): void;
8783
8773
  resetTokenState(pos: number): void;
@@ -9423,7 +9413,7 @@ declare namespace ts {
9423
9413
  * that they appear in the source code. The language service depends on this property to locate nodes by position.
9424
9414
  */
9425
9415
  function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
9426
- function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind, jsDocParsingMode?: JSDocParsingMode): SourceFile;
9416
+ function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
9427
9417
  function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
9428
9418
  /**
9429
9419
  * Parse json text into SyntaxTree and return node and parse errors if any
@@ -9728,7 +9718,7 @@ declare namespace ts {
9728
9718
  function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
9729
9719
  function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined;
9730
9720
  function resolveTripleslashReference(moduleName: string, containingFile: string): string;
9731
- function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean, jsDocParsingMode?: JSDocParsingMode): CompilerHost;
9721
+ function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
9732
9722
  function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
9733
9723
  function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
9734
9724
  function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string;
@@ -9940,7 +9930,7 @@ declare namespace ts {
9940
9930
  emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
9941
9931
  }
9942
9932
  function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined;
9943
- function createIncrementalCompilerHost(options: CompilerOptions, system?: System, jsDocParsingMode?: JSDocParsingMode): CompilerHost;
9933
+ function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost;
9944
9934
  function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T;
9945
9935
  /**
9946
9936
  * Create the watch compiler host for either configFile or fileNames and its options
@@ -10037,7 +10027,6 @@ declare namespace ts {
10037
10027
  * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
10038
10028
  */
10039
10029
  getModuleResolutionCache?(): ModuleResolutionCache | undefined;
10040
- jsDocParsingMode?: JSDocParsingMode;
10041
10030
  }
10042
10031
  interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
10043
10032
  /** Instead of using output d.ts file from project reference, use its source file */
@@ -10288,7 +10277,6 @@ declare namespace ts {
10288
10277
  installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
10289
10278
  writeFile?(fileName: string, content: string): void;
10290
10279
  getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
10291
- jsDocParsingMode?: JSDocParsingMode;
10292
10280
  }
10293
10281
  type WithMetadata<T> = T & {
10294
10282
  metadata?: unknown;
@@ -11386,7 +11374,7 @@ declare namespace ts {
11386
11374
  fileName: string;
11387
11375
  highlightSpans: HighlightSpan[];
11388
11376
  }
11389
- function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string, jsDocParsingMode?: JSDocParsingMode): DocumentRegistry;
11377
+ function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
11390
11378
  /**
11391
11379
  * The document registry represents a store of SourceFile objects that can be shared between
11392
11380
  * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
@@ -11494,7 +11482,7 @@ declare namespace ts {
11494
11482
  function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
11495
11483
  function getDefaultCompilerOptions(): CompilerOptions;
11496
11484
  function getSupportedCodeFixes(): readonly string[];
11497
- function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind, jsDocParsingMode?: JSDocParsingMode): SourceFile;
11485
+ function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
11498
11486
  function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
11499
11487
  function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService;
11500
11488
  /**