@typescript-deploys/pr-build 5.3.0-pr-55739-21 → 5.3.0-pr-55779-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +67 -72
- package/lib/tsserver.js +77 -101
- package/lib/typescript.d.ts +5 -17
- package/lib/typescript.js +79 -102
- package/lib/typingsInstaller.js +34 -44
- package/package.json +2 -2
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,
|
|
@@ -2329,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2329
2328
|
|
|
2330
2329
|
// src/compiler/corePublic.ts
|
|
2331
2330
|
var versionMajorMinor = "5.3";
|
|
2332
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-insiders.20230919`;
|
|
2333
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2334
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2335
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -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
|
|
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
|
|
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 &&
|
|
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
|
|
13501
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
30899
|
-
|
|
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
|
-
|
|
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(
|
|
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,
|
|
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.
|
|
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.
|
|
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,
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
37547
|
+
sourceFile.skipNonSemanticJSDoc
|
|
37566
37548
|
);
|
|
37567
37549
|
result.commentDirectives = getNewCommentDirectives(
|
|
37568
37550
|
sourceFile.commentDirectives,
|
|
@@ -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;
|
|
@@ -58919,7 +58901,7 @@ function createTypeChecker(host) {
|
|
|
58919
58901
|
}
|
|
58920
58902
|
function isConstTypeVariable(type, depth = 0) {
|
|
58921
58903
|
var _a;
|
|
58922
|
-
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags &
|
|
58904
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
58923
58905
|
}
|
|
58924
58906
|
function getConstraintOfIndexedAccess(type) {
|
|
58925
58907
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -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)) {
|
|
@@ -119766,16 +119759,10 @@ function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, ge
|
|
|
119766
119759
|
}
|
|
119767
119760
|
return getPathFromPathComponents(commonPathComponents);
|
|
119768
119761
|
}
|
|
119769
|
-
function createCompilerHost(options, setParentNodes
|
|
119770
|
-
return createCompilerHostWorker(
|
|
119771
|
-
options,
|
|
119772
|
-
setParentNodes,
|
|
119773
|
-
/*system*/
|
|
119774
|
-
void 0,
|
|
119775
|
-
jsDocParsingMode
|
|
119776
|
-
);
|
|
119762
|
+
function createCompilerHost(options, setParentNodes) {
|
|
119763
|
+
return createCompilerHostWorker(options, setParentNodes);
|
|
119777
119764
|
}
|
|
119778
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes,
|
|
119765
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, skipNonSemanticJSDocParsing) {
|
|
119779
119766
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
119780
119767
|
let text;
|
|
119781
119768
|
try {
|
|
@@ -119796,7 +119783,7 @@ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, jsDoc
|
|
|
119796
119783
|
setParentNodes,
|
|
119797
119784
|
/*scriptKind*/
|
|
119798
119785
|
void 0,
|
|
119799
|
-
|
|
119786
|
+
skipNonSemanticJSDocParsing
|
|
119800
119787
|
) : void 0;
|
|
119801
119788
|
};
|
|
119802
119789
|
}
|
|
@@ -119821,7 +119808,7 @@ function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryE
|
|
|
119821
119808
|
}
|
|
119822
119809
|
};
|
|
119823
119810
|
}
|
|
119824
|
-
function createCompilerHostWorker(options, setParentNodes, system = sys
|
|
119811
|
+
function createCompilerHostWorker(options, setParentNodes, skipNonSemanticJSDocParsing, system = sys) {
|
|
119825
119812
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
119826
119813
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
119827
119814
|
function directoryExists(directoryPath) {
|
|
@@ -119840,7 +119827,7 @@ function createCompilerHostWorker(options, setParentNodes, system = sys, jsDocPa
|
|
|
119840
119827
|
const newLine = getNewLineCharacter(options);
|
|
119841
119828
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
119842
119829
|
const compilerHost = {
|
|
119843
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes,
|
|
119830
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, skipNonSemanticJSDocParsing),
|
|
119844
119831
|
getDefaultLibLocation,
|
|
119845
119832
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
119846
119833
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -126981,7 +126968,7 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
|
|
|
126981
126968
|
getCompilerOptions,
|
|
126982
126969
|
/*setParentNodes*/
|
|
126983
126970
|
void 0,
|
|
126984
|
-
host.
|
|
126971
|
+
host.skipNonSemanticJSDocParsing
|
|
126985
126972
|
),
|
|
126986
126973
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
126987
126974
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -127167,13 +127154,13 @@ function readBuilderProgram(compilerOptions, host) {
|
|
|
127167
127154
|
return void 0;
|
|
127168
127155
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
127169
127156
|
}
|
|
127170
|
-
function createIncrementalCompilerHost(options, system = sys,
|
|
127157
|
+
function createIncrementalCompilerHost(options, system = sys, skipNonSemanticJSDocParsing) {
|
|
127171
127158
|
const host = createCompilerHostWorker(
|
|
127172
127159
|
options,
|
|
127173
127160
|
/*setParentNodes*/
|
|
127174
127161
|
void 0,
|
|
127175
|
-
|
|
127176
|
-
|
|
127162
|
+
skipNonSemanticJSDocParsing,
|
|
127163
|
+
system
|
|
127177
127164
|
);
|
|
127178
127165
|
host.createHash = maybeBind(system, system.createHash);
|
|
127179
127166
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
@@ -135096,10 +135083,10 @@ var DocumentHighlights;
|
|
|
135096
135083
|
function isDocumentRegistryEntry(entry) {
|
|
135097
135084
|
return !!entry.sourceFile;
|
|
135098
135085
|
}
|
|
135099
|
-
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory
|
|
135100
|
-
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory
|
|
135086
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
135087
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
135101
135088
|
}
|
|
135102
|
-
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "",
|
|
135089
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
135103
135090
|
const buckets = /* @__PURE__ */ new Map();
|
|
135104
135091
|
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
135105
135092
|
function reportStats() {
|
|
@@ -135219,8 +135206,7 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirec
|
|
|
135219
135206
|
version2,
|
|
135220
135207
|
/*setNodeParents*/
|
|
135221
135208
|
false,
|
|
135222
|
-
scriptKind
|
|
135223
|
-
jsDocParsingMode
|
|
135209
|
+
scriptKind
|
|
135224
135210
|
);
|
|
135225
135211
|
if (externalCache) {
|
|
135226
135212
|
externalCache.setDocument(keyWithMode, path, sourceFile);
|
|
@@ -136607,12 +136593,7 @@ function transpileModule(input, transpileOptions) {
|
|
|
136607
136593
|
options
|
|
136608
136594
|
),
|
|
136609
136595
|
setExternalModuleIndicator: getSetExternalModuleIndicator(options)
|
|
136610
|
-
}
|
|
136611
|
-
/*setParentNodes*/
|
|
136612
|
-
void 0,
|
|
136613
|
-
/*scriptKind*/
|
|
136614
|
-
void 0,
|
|
136615
|
-
3 /* ParseNone */
|
|
136596
|
+
}
|
|
136616
136597
|
);
|
|
136617
136598
|
if (transpileOptions.moduleName) {
|
|
136618
136599
|
sourceFile.moduleName = transpileOptions.moduleName;
|
|
@@ -143811,8 +143792,7 @@ var SyntaxTreeCache = class {
|
|
|
143811
143792
|
version2,
|
|
143812
143793
|
/*setNodeParents*/
|
|
143813
143794
|
true,
|
|
143814
|
-
scriptKind
|
|
143815
|
-
this.host.jsDocParsingMode
|
|
143795
|
+
scriptKind
|
|
143816
143796
|
);
|
|
143817
143797
|
} else if (this.currentFileVersion !== version2) {
|
|
143818
143798
|
const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);
|
|
@@ -143831,8 +143811,8 @@ function setSourceFileFields(sourceFile, scriptSnapshot, version2) {
|
|
|
143831
143811
|
sourceFile.version = version2;
|
|
143832
143812
|
sourceFile.scriptSnapshot = scriptSnapshot;
|
|
143833
143813
|
}
|
|
143834
|
-
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind
|
|
143835
|
-
const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind
|
|
143814
|
+
function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind) {
|
|
143815
|
+
const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind);
|
|
143836
143816
|
setSourceFileFields(sourceFile, scriptSnapshot, version2);
|
|
143837
143817
|
return sourceFile;
|
|
143838
143818
|
}
|
|
@@ -143872,8 +143852,7 @@ function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version2, t
|
|
|
143872
143852
|
version2,
|
|
143873
143853
|
/*setNodeParents*/
|
|
143874
143854
|
true,
|
|
143875
|
-
sourceFile.scriptKind
|
|
143876
|
-
sourceFile.jsDocParsingMode
|
|
143855
|
+
sourceFile.scriptKind
|
|
143877
143856
|
);
|
|
143878
143857
|
}
|
|
143879
143858
|
var NoopCancellationToken = {
|
|
@@ -151130,7 +151109,6 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF
|
|
|
151130
151109
|
if (aliasDeclaration.isTypeOnly) {
|
|
151131
151110
|
const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences);
|
|
151132
151111
|
if (aliasDeclaration.parent.elements.length > 1 && sortKind) {
|
|
151133
|
-
changes.delete(sourceFile, aliasDeclaration);
|
|
151134
151112
|
const newSpecifier = factory.updateImportSpecifier(
|
|
151135
151113
|
aliasDeclaration,
|
|
151136
151114
|
/*isTypeOnly*/
|
|
@@ -151140,10 +151118,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF
|
|
|
151140
151118
|
);
|
|
151141
151119
|
const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */);
|
|
151142
151120
|
const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier, comparer);
|
|
151143
|
-
|
|
151144
|
-
|
|
151145
|
-
|
|
151121
|
+
if (aliasDeclaration.parent.elements.indexOf(aliasDeclaration) !== insertionIndex) {
|
|
151122
|
+
changes.delete(sourceFile, aliasDeclaration);
|
|
151123
|
+
changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex);
|
|
151124
|
+
return aliasDeclaration;
|
|
151125
|
+
}
|
|
151146
151126
|
}
|
|
151127
|
+
changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken());
|
|
151147
151128
|
return aliasDeclaration;
|
|
151148
151129
|
} else {
|
|
151149
151130
|
Debug.assert(aliasDeclaration.parent.parent.isTypeOnly);
|
|
@@ -169008,8 +168989,7 @@ var changesToText;
|
|
|
169008
168989
|
99 /* ESNext */,
|
|
169009
168990
|
/*setParentNodes*/
|
|
169010
168991
|
true,
|
|
169011
|
-
scriptKind
|
|
169012
|
-
3 /* ParseNone */
|
|
168992
|
+
scriptKind
|
|
169013
168993
|
);
|
|
169014
168994
|
const changes = ts_formatting_exports.formatDocument(sourceFile, formatContext);
|
|
169015
168995
|
return applyChanges(nonFormattedText, changes) + newLineCharacter;
|
|
@@ -172291,7 +172271,6 @@ __export(ts_exports2, {
|
|
|
172291
172271
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
172292
172272
|
InternalSymbolName: () => InternalSymbolName,
|
|
172293
172273
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
172294
|
-
JSDocParsingMode: () => JSDocParsingMode,
|
|
172295
172274
|
JsDoc: () => ts_JsDoc_exports,
|
|
172296
172275
|
JsTyping: () => ts_JsTyping_exports,
|
|
172297
172276
|
JsxEmit: () => JsxEmit,
|
|
@@ -176260,7 +176239,6 @@ var Project3 = class _Project {
|
|
|
176260
176239
|
this.directoryStructureHost = directoryStructureHost;
|
|
176261
176240
|
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
|
|
176262
176241
|
this.getCanonicalFileName = this.projectService.toCanonicalFileName;
|
|
176263
|
-
this.jsDocParsingMode = this.projectService.jsDocParsingMode;
|
|
176264
176242
|
this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
|
|
176265
176243
|
if (!this.compilerOptions) {
|
|
176266
176244
|
this.compilerOptions = getDefaultCompilerOptions2();
|
|
@@ -178819,7 +178797,6 @@ var _ProjectService = class _ProjectService {
|
|
|
178819
178797
|
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
|
|
178820
178798
|
this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
|
|
178821
178799
|
this.session = opts.session;
|
|
178822
|
-
this.jsDocParsingMode = opts.jsDocParsingMode;
|
|
178823
178800
|
if (opts.serverMode !== void 0) {
|
|
178824
178801
|
this.serverMode = opts.serverMode;
|
|
178825
178802
|
} else {
|
|
@@ -178845,7 +178822,7 @@ var _ProjectService = class _ProjectService {
|
|
|
178845
178822
|
hostInfo: "Unknown host",
|
|
178846
178823
|
extraFileExtensions: []
|
|
178847
178824
|
};
|
|
178848
|
-
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this
|
|
178825
|
+
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this);
|
|
178849
178826
|
const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;
|
|
178850
178827
|
const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;
|
|
178851
178828
|
this.packageJsonCache = createPackageJsonCache(this);
|
|
@@ -186856,7 +186833,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
186856
186833
|
InternalEmitFlags,
|
|
186857
186834
|
InternalSymbolName,
|
|
186858
186835
|
InvalidatedProjectKind,
|
|
186859
|
-
JSDocParsingMode,
|
|
186860
186836
|
JsDoc,
|
|
186861
186837
|
JsTyping,
|
|
186862
186838
|
JsxEmit,
|
package/lib/typescript.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
/**
|