@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/tsc.js +76 -71
- package/lib/tsserver.js +86 -100
- package/lib/typescript.d.ts +5 -17
- package/lib/typescript.js +88 -101
- package/lib/typingsInstaller.js +33 -43
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -7933,7 +7933,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18
|
|
|
7933
7933
|
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];
|
|
7934
7934
|
var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
7935
7935
|
var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
7936
|
-
var
|
|
7936
|
+
var semanticJSDocTagRegEx = /@(?:see|link)/i;
|
|
7937
7937
|
function lookupInUnicodeMap(code, map2) {
|
|
7938
7938
|
if (code < map2[0]) {
|
|
7939
7939
|
return false;
|
|
@@ -8419,8 +8419,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8419
8419
|
var tokenFlags;
|
|
8420
8420
|
var commentDirectives;
|
|
8421
8421
|
var inJSDocType = 0;
|
|
8422
|
-
var
|
|
8423
|
-
var jsDocParsingMode2 = 0 /* ParseAll */;
|
|
8422
|
+
var skipNonSemanticJSDoc = false;
|
|
8424
8423
|
setText(text, start, length2);
|
|
8425
8424
|
var scanner = {
|
|
8426
8425
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -8464,15 +8463,14 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8464
8463
|
setText,
|
|
8465
8464
|
setScriptTarget,
|
|
8466
8465
|
setLanguageVariant,
|
|
8467
|
-
setScriptKind,
|
|
8468
|
-
setJSDocParsingMode,
|
|
8469
8466
|
setOnError,
|
|
8470
8467
|
resetTokenState,
|
|
8471
8468
|
setTextPos: resetTokenState,
|
|
8472
8469
|
setInJSDocType,
|
|
8473
8470
|
tryScan,
|
|
8474
8471
|
lookAhead,
|
|
8475
|
-
scanRange
|
|
8472
|
+
scanRange,
|
|
8473
|
+
setSkipNonSemanticJSDoc
|
|
8476
8474
|
};
|
|
8477
8475
|
if (Debug.isDebugging) {
|
|
8478
8476
|
Object.defineProperty(scanner, "__debugShowCurrentPositionInText", {
|
|
@@ -9260,7 +9258,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9260
9258
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
9261
9259
|
}
|
|
9262
9260
|
}
|
|
9263
|
-
if (isJSDoc2 &&
|
|
9261
|
+
if (isJSDoc2 && (!skipNonSemanticJSDoc || semanticJSDocTagRegEx.test(text.slice(fullStartPos, pos)))) {
|
|
9264
9262
|
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
9265
9263
|
}
|
|
9266
9264
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
@@ -9519,21 +9517,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9519
9517
|
}
|
|
9520
9518
|
}
|
|
9521
9519
|
}
|
|
9522
|
-
function shouldParseJSDoc() {
|
|
9523
|
-
switch (jsDocParsingMode2) {
|
|
9524
|
-
case 0 /* ParseAll */:
|
|
9525
|
-
return true;
|
|
9526
|
-
case 3 /* ParseNone */:
|
|
9527
|
-
return false;
|
|
9528
|
-
}
|
|
9529
|
-
if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {
|
|
9530
|
-
return true;
|
|
9531
|
-
}
|
|
9532
|
-
if (jsDocParsingMode2 === 2 /* ParseForTypeInfo */) {
|
|
9533
|
-
return false;
|
|
9534
|
-
}
|
|
9535
|
-
return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));
|
|
9536
|
-
}
|
|
9537
9520
|
function reScanInvalidIdentifier() {
|
|
9538
9521
|
Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.");
|
|
9539
9522
|
pos = tokenStart = fullStartPos;
|
|
@@ -9948,11 +9931,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9948
9931
|
function setLanguageVariant(variant) {
|
|
9949
9932
|
languageVariant = variant;
|
|
9950
9933
|
}
|
|
9951
|
-
function
|
|
9952
|
-
|
|
9953
|
-
}
|
|
9954
|
-
function setJSDocParsingMode(kind) {
|
|
9955
|
-
jsDocParsingMode2 = kind;
|
|
9934
|
+
function setSkipNonSemanticJSDoc(skip) {
|
|
9935
|
+
skipNonSemanticJSDoc = skip;
|
|
9956
9936
|
}
|
|
9957
9937
|
function resetTokenState(position) {
|
|
9958
9938
|
Debug.assert(position >= 0);
|
|
@@ -26309,7 +26289,7 @@ function gatherPossibleChildren(node) {
|
|
|
26309
26289
|
function setExternalModuleIndicator(sourceFile) {
|
|
26310
26290
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
26311
26291
|
}
|
|
26312
|
-
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind,
|
|
26292
|
+
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind, skipNonSemanticJSDoc) {
|
|
26313
26293
|
var _a, _b, _c, _d;
|
|
26314
26294
|
(_a = tracing) == null ? void 0 : _a.push(
|
|
26315
26295
|
tracing.Phase.Parse,
|
|
@@ -26336,7 +26316,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
26336
26316
|
setParentNodes,
|
|
26337
26317
|
6 /* JSON */,
|
|
26338
26318
|
noop,
|
|
26339
|
-
|
|
26319
|
+
skipNonSemanticJSDoc
|
|
26340
26320
|
);
|
|
26341
26321
|
} else {
|
|
26342
26322
|
const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
|
|
@@ -26352,7 +26332,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
26352
26332
|
setParentNodes,
|
|
26353
26333
|
scriptKind,
|
|
26354
26334
|
setIndicator,
|
|
26355
|
-
|
|
26335
|
+
skipNonSemanticJSDoc
|
|
26356
26336
|
);
|
|
26357
26337
|
}
|
|
26358
26338
|
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
@@ -26471,7 +26451,7 @@ var Parser;
|
|
|
26471
26451
|
var contextFlags;
|
|
26472
26452
|
var topLevel = true;
|
|
26473
26453
|
var parseErrorBeforeNextFinishedNode = false;
|
|
26474
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride,
|
|
26454
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, skipNonSemanticJSDoc) {
|
|
26475
26455
|
var _a;
|
|
26476
26456
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
26477
26457
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -26493,8 +26473,9 @@ var Parser;
|
|
|
26493
26473
|
result2.pragmas = emptyMap;
|
|
26494
26474
|
return result2;
|
|
26495
26475
|
}
|
|
26496
|
-
|
|
26497
|
-
|
|
26476
|
+
skipNonSemanticJSDoc = !!skipNonSemanticJSDoc && scriptKind2 !== 1 /* JS */ && scriptKind2 !== 2 /* JSX */;
|
|
26477
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, skipNonSemanticJSDoc);
|
|
26478
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
|
|
26498
26479
|
clearState();
|
|
26499
26480
|
return result;
|
|
26500
26481
|
}
|
|
@@ -26507,7 +26488,8 @@ var Parser;
|
|
|
26507
26488
|
/*syntaxCursor*/
|
|
26508
26489
|
void 0,
|
|
26509
26490
|
1 /* JS */,
|
|
26510
|
-
|
|
26491
|
+
/*skipNonSemanticJSDoc*/
|
|
26492
|
+
false
|
|
26511
26493
|
);
|
|
26512
26494
|
nextToken();
|
|
26513
26495
|
const entityName = parseEntityName(
|
|
@@ -26520,7 +26502,15 @@ var Parser;
|
|
|
26520
26502
|
}
|
|
26521
26503
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
26522
26504
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
26523
|
-
initializeState(
|
|
26505
|
+
initializeState(
|
|
26506
|
+
fileName2,
|
|
26507
|
+
sourceText2,
|
|
26508
|
+
languageVersion2,
|
|
26509
|
+
syntaxCursor2,
|
|
26510
|
+
6 /* JSON */,
|
|
26511
|
+
/*skipNonSemanticJSDoc*/
|
|
26512
|
+
false
|
|
26513
|
+
);
|
|
26524
26514
|
sourceFlags = contextFlags;
|
|
26525
26515
|
nextToken();
|
|
26526
26516
|
const pos = getNodePos();
|
|
@@ -26601,7 +26591,7 @@ var Parser;
|
|
|
26601
26591
|
return result;
|
|
26602
26592
|
}
|
|
26603
26593
|
Parser2.parseJsonText = parseJsonText2;
|
|
26604
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind,
|
|
26594
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _skipNonSemanticJSDoc) {
|
|
26605
26595
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
26606
26596
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
26607
26597
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -26637,15 +26627,13 @@ var Parser;
|
|
|
26637
26627
|
scanner.setOnError(scanError);
|
|
26638
26628
|
scanner.setScriptTarget(languageVersion);
|
|
26639
26629
|
scanner.setLanguageVariant(languageVariant);
|
|
26640
|
-
scanner.
|
|
26641
|
-
scanner.setJSDocParsingMode(_jsDocParsingMode);
|
|
26630
|
+
scanner.setSkipNonSemanticJSDoc(_skipNonSemanticJSDoc);
|
|
26642
26631
|
}
|
|
26643
26632
|
function clearState() {
|
|
26644
26633
|
scanner.clearCommentDirectives();
|
|
26645
26634
|
scanner.setText("");
|
|
26646
26635
|
scanner.setOnError(void 0);
|
|
26647
|
-
scanner.
|
|
26648
|
-
scanner.setJSDocParsingMode(0 /* ParseAll */);
|
|
26636
|
+
scanner.setSkipNonSemanticJSDoc(false);
|
|
26649
26637
|
sourceText = void 0;
|
|
26650
26638
|
languageVersion = void 0;
|
|
26651
26639
|
syntaxCursor = void 0;
|
|
@@ -26659,7 +26647,7 @@ var Parser;
|
|
|
26659
26647
|
notParenthesizedArrow = void 0;
|
|
26660
26648
|
topLevel = true;
|
|
26661
26649
|
}
|
|
26662
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2,
|
|
26650
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, skipNonSemanticJSDoc) {
|
|
26663
26651
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
26664
26652
|
if (isDeclarationFile) {
|
|
26665
26653
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -26678,7 +26666,7 @@ var Parser;
|
|
|
26678
26666
|
sourceFile.identifierCount = identifierCount;
|
|
26679
26667
|
sourceFile.identifiers = identifiers;
|
|
26680
26668
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
26681
|
-
sourceFile.
|
|
26669
|
+
sourceFile.skipNonSemanticJSDoc = skipNonSemanticJSDoc;
|
|
26682
26670
|
if (jsDocDiagnostics) {
|
|
26683
26671
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
26684
26672
|
}
|
|
@@ -32113,7 +32101,8 @@ var Parser;
|
|
|
32113
32101
|
/*syntaxCursor*/
|
|
32114
32102
|
void 0,
|
|
32115
32103
|
1 /* JS */,
|
|
32116
|
-
|
|
32104
|
+
/*skipNonSemanticJSDoc*/
|
|
32105
|
+
false
|
|
32117
32106
|
);
|
|
32118
32107
|
scanner.setText(content, start, length2);
|
|
32119
32108
|
currentToken = scanner.scan();
|
|
@@ -32178,7 +32167,8 @@ var Parser;
|
|
|
32178
32167
|
/*syntaxCursor*/
|
|
32179
32168
|
void 0,
|
|
32180
32169
|
1 /* JS */,
|
|
32181
|
-
|
|
32170
|
+
/*skipNonSemanticJSDoc*/
|
|
32171
|
+
false
|
|
32182
32172
|
);
|
|
32183
32173
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
|
|
32184
32174
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -33135,7 +33125,7 @@ var IncrementalParser;
|
|
|
33135
33125
|
true,
|
|
33136
33126
|
sourceFile.scriptKind,
|
|
33137
33127
|
sourceFile.setExternalModuleIndicator,
|
|
33138
|
-
sourceFile.
|
|
33128
|
+
sourceFile.skipNonSemanticJSDoc
|
|
33139
33129
|
);
|
|
33140
33130
|
}
|
|
33141
33131
|
const incrementalSourceFile = sourceFile;
|
|
@@ -33160,7 +33150,7 @@ var IncrementalParser;
|
|
|
33160
33150
|
true,
|
|
33161
33151
|
sourceFile.scriptKind,
|
|
33162
33152
|
sourceFile.setExternalModuleIndicator,
|
|
33163
|
-
sourceFile.
|
|
33153
|
+
sourceFile.skipNonSemanticJSDoc
|
|
33164
33154
|
);
|
|
33165
33155
|
result.commentDirectives = getNewCommentDirectives(
|
|
33166
33156
|
sourceFile.commentDirectives,
|
|
@@ -39932,7 +39922,7 @@ function createBinder() {
|
|
|
39932
39922
|
case 36 /* ExclamationEqualsToken */:
|
|
39933
39923
|
case 37 /* EqualsEqualsEqualsToken */:
|
|
39934
39924
|
case 38 /* ExclamationEqualsEqualsToken */:
|
|
39935
|
-
return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
|
|
39925
|
+
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));
|
|
39936
39926
|
case 104 /* InstanceOfKeyword */:
|
|
39937
39927
|
return isNarrowableOperand(expr.left);
|
|
39938
39928
|
case 103 /* InKeyword */:
|
|
@@ -40252,7 +40242,7 @@ function createBinder() {
|
|
|
40252
40242
|
}
|
|
40253
40243
|
function bindCaseBlock(node) {
|
|
40254
40244
|
const clauses = node.clauses;
|
|
40255
|
-
const isNarrowingSwitch = isNarrowingExpression(node.parent.expression);
|
|
40245
|
+
const isNarrowingSwitch = node.parent.expression.kind === 112 /* TrueKeyword */ || isNarrowingExpression(node.parent.expression);
|
|
40256
40246
|
let fallthroughFlow = unreachableFlow;
|
|
40257
40247
|
for (let i = 0; i < clauses.length; i++) {
|
|
40258
40248
|
const clauseStart = i;
|
|
@@ -65559,6 +65549,17 @@ function createTypeChecker(host) {
|
|
|
65559
65549
|
type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
|
|
65560
65550
|
} else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) {
|
|
65561
65551
|
type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
|
|
65552
|
+
} else if (expr.kind === 112 /* TrueKeyword */) {
|
|
65553
|
+
const clause = flow.switchStatement.caseBlock.clauses.find((_, index) => index === flow.clauseStart);
|
|
65554
|
+
const clauseExpression = clause && clause.kind === 296 /* CaseClause */ ? clause.expression : void 0;
|
|
65555
|
+
if (clauseExpression) {
|
|
65556
|
+
type = narrowType(
|
|
65557
|
+
type,
|
|
65558
|
+
clauseExpression,
|
|
65559
|
+
/*assumeTrue*/
|
|
65560
|
+
true
|
|
65561
|
+
);
|
|
65562
|
+
}
|
|
65562
65563
|
} else {
|
|
65563
65564
|
if (strictNullChecks) {
|
|
65564
65565
|
if (optionalChainContainsReference(expr, reference)) {
|
|
@@ -65806,6 +65807,10 @@ function createTypeChecker(host) {
|
|
|
65806
65807
|
}
|
|
65807
65808
|
return type;
|
|
65808
65809
|
}
|
|
65810
|
+
function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) {
|
|
65811
|
+
assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */);
|
|
65812
|
+
return narrowType(type, expr, assumeTrue);
|
|
65813
|
+
}
|
|
65809
65814
|
function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
|
|
65810
65815
|
switch (expr.operatorToken.kind) {
|
|
65811
65816
|
case 64 /* EqualsToken */:
|
|
@@ -65853,6 +65858,12 @@ function createTypeChecker(host) {
|
|
|
65853
65858
|
if (isMatchingConstructorReference(right)) {
|
|
65854
65859
|
return narrowTypeByConstructor(type, operator, left, assumeTrue);
|
|
65855
65860
|
}
|
|
65861
|
+
if (isBooleanLiteral(right)) {
|
|
65862
|
+
return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue);
|
|
65863
|
+
}
|
|
65864
|
+
if (isBooleanLiteral(left)) {
|
|
65865
|
+
return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue);
|
|
65866
|
+
}
|
|
65856
65867
|
break;
|
|
65857
65868
|
case 104 /* InstanceOfKeyword */:
|
|
65858
65869
|
return narrowTypeByInstanceof(type, expr, assumeTrue);
|
|
@@ -114853,16 +114864,10 @@ function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, ge
|
|
|
114853
114864
|
}
|
|
114854
114865
|
return getPathFromPathComponents(commonPathComponents);
|
|
114855
114866
|
}
|
|
114856
|
-
function createCompilerHost(options, setParentNodes
|
|
114857
|
-
return createCompilerHostWorker(
|
|
114858
|
-
options,
|
|
114859
|
-
setParentNodes,
|
|
114860
|
-
/*system*/
|
|
114861
|
-
void 0,
|
|
114862
|
-
jsDocParsingMode2
|
|
114863
|
-
);
|
|
114867
|
+
function createCompilerHost(options, setParentNodes) {
|
|
114868
|
+
return createCompilerHostWorker(options, setParentNodes);
|
|
114864
114869
|
}
|
|
114865
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes,
|
|
114870
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, skipNonSemanticJSDocParsing2) {
|
|
114866
114871
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
114867
114872
|
let text;
|
|
114868
114873
|
try {
|
|
@@ -114883,7 +114888,7 @@ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, jsDoc
|
|
|
114883
114888
|
setParentNodes,
|
|
114884
114889
|
/*scriptKind*/
|
|
114885
114890
|
void 0,
|
|
114886
|
-
|
|
114891
|
+
skipNonSemanticJSDocParsing2
|
|
114887
114892
|
) : void 0;
|
|
114888
114893
|
};
|
|
114889
114894
|
}
|
|
@@ -114908,7 +114913,7 @@ function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryE
|
|
|
114908
114913
|
}
|
|
114909
114914
|
};
|
|
114910
114915
|
}
|
|
114911
|
-
function createCompilerHostWorker(options, setParentNodes, system = sys
|
|
114916
|
+
function createCompilerHostWorker(options, setParentNodes, skipNonSemanticJSDocParsing2, system = sys) {
|
|
114912
114917
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
114913
114918
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
114914
114919
|
function directoryExists(directoryPath) {
|
|
@@ -114927,7 +114932,7 @@ function createCompilerHostWorker(options, setParentNodes, system = sys, jsDocPa
|
|
|
114927
114932
|
const newLine = getNewLineCharacter(options);
|
|
114928
114933
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
114929
114934
|
const compilerHost = {
|
|
114930
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes,
|
|
114935
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, skipNonSemanticJSDocParsing2),
|
|
114931
114936
|
getDefaultLibLocation,
|
|
114932
114937
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
114933
114938
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -122002,7 +122007,7 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
|
|
|
122002
122007
|
getCompilerOptions,
|
|
122003
122008
|
/*setParentNodes*/
|
|
122004
122009
|
void 0,
|
|
122005
|
-
host.
|
|
122010
|
+
host.skipNonSemanticJSDocParsing
|
|
122006
122011
|
),
|
|
122007
122012
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
122008
122013
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -122188,13 +122193,13 @@ function readBuilderProgram(compilerOptions, host) {
|
|
|
122188
122193
|
return void 0;
|
|
122189
122194
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
122190
122195
|
}
|
|
122191
|
-
function createIncrementalCompilerHost(options, system = sys,
|
|
122196
|
+
function createIncrementalCompilerHost(options, system = sys, skipNonSemanticJSDocParsing2) {
|
|
122192
122197
|
const host = createCompilerHostWorker(
|
|
122193
122198
|
options,
|
|
122194
122199
|
/*setParentNodes*/
|
|
122195
122200
|
void 0,
|
|
122196
|
-
|
|
122197
|
-
|
|
122201
|
+
skipNonSemanticJSDocParsing2,
|
|
122202
|
+
system
|
|
122198
122203
|
);
|
|
122199
122204
|
host.createHash = maybeBind(system, system.createHash);
|
|
122200
122205
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
@@ -125523,7 +125528,7 @@ function reportWatchModeWithoutSysSupport(sys2, reportDiagnostic) {
|
|
|
125523
125528
|
}
|
|
125524
125529
|
return false;
|
|
125525
125530
|
}
|
|
125526
|
-
var
|
|
125531
|
+
var skipNonSemanticJSDocParsing = true;
|
|
125527
125532
|
function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {
|
|
125528
125533
|
const reportDiagnostic = updateReportDiagnostic(
|
|
125529
125534
|
sys2,
|
|
@@ -125562,7 +125567,7 @@ function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {
|
|
|
125562
125567
|
createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)),
|
|
125563
125568
|
createWatchStatusReporter2(sys2, buildOptions)
|
|
125564
125569
|
);
|
|
125565
|
-
buildHost2.
|
|
125570
|
+
buildHost2.skipNonSemanticJSDocParsing = skipNonSemanticJSDocParsing;
|
|
125566
125571
|
const solutionPerformance2 = enableSolutionPerformance(sys2, buildOptions);
|
|
125567
125572
|
updateSolutionBuilderHost(sys2, cb, buildHost2, solutionPerformance2);
|
|
125568
125573
|
const onWatchStatusChange = buildHost2.onWatchStatusChange;
|
|
@@ -125587,7 +125592,7 @@ function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {
|
|
|
125587
125592
|
createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)),
|
|
125588
125593
|
createReportErrorSummary(sys2, buildOptions)
|
|
125589
125594
|
);
|
|
125590
|
-
buildHost.
|
|
125595
|
+
buildHost.skipNonSemanticJSDocParsing = skipNonSemanticJSDocParsing;
|
|
125591
125596
|
const solutionPerformance = enableSolutionPerformance(sys2, buildOptions);
|
|
125592
125597
|
updateSolutionBuilderHost(sys2, cb, buildHost, solutionPerformance);
|
|
125593
125598
|
const builder = createSolutionBuilder(buildHost, projects, buildOptions);
|
|
@@ -125605,8 +125610,8 @@ function performCompilation(sys2, cb, reportDiagnostic, config) {
|
|
|
125605
125610
|
options,
|
|
125606
125611
|
/*setParentNodes*/
|
|
125607
125612
|
void 0,
|
|
125608
|
-
|
|
125609
|
-
|
|
125613
|
+
skipNonSemanticJSDocParsing,
|
|
125614
|
+
sys2
|
|
125610
125615
|
);
|
|
125611
125616
|
const currentDirectory = host.getCurrentDirectory();
|
|
125612
125617
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
@@ -125648,7 +125653,7 @@ function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) {
|
|
|
125648
125653
|
/*isBuildMode*/
|
|
125649
125654
|
false
|
|
125650
125655
|
);
|
|
125651
|
-
const host = createIncrementalCompilerHost(options, sys2,
|
|
125656
|
+
const host = createIncrementalCompilerHost(options, sys2, skipNonSemanticJSDocParsing);
|
|
125652
125657
|
const exitStatus = performIncrementalCompilation({
|
|
125653
125658
|
host,
|
|
125654
125659
|
system: sys2,
|
|
@@ -125703,7 +125708,7 @@ function updateCreateProgram(sys2, host, isBuildMode) {
|
|
|
125703
125708
|
};
|
|
125704
125709
|
}
|
|
125705
125710
|
function updateWatchCompilationHost(sys2, cb, watchCompilerHost) {
|
|
125706
|
-
watchCompilerHost.
|
|
125711
|
+
watchCompilerHost.skipNonSemanticJSDocParsing = skipNonSemanticJSDocParsing;
|
|
125707
125712
|
updateCreateProgram(
|
|
125708
125713
|
sys2,
|
|
125709
125714
|
watchCompilerHost,
|