@typescript-deploys/pr-build 5.3.0-pr-55547-8 → 5.3.0-pr-55739-8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +148 -58
- package/lib/tsserver.js +179 -69
- package/lib/typescript.d.ts +16 -5
- package/lib/typescript.js +180 -71
- package/lib/typingsInstaller.js +41 -16
- package/package.json +3 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230915`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -7933,6 +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 semanticJSDocTagRegEx = /@(?:see|link)/i;
|
|
7936
7937
|
function lookupInUnicodeMap(code, map2) {
|
|
7937
7938
|
if (code < map2[0]) {
|
|
7938
7939
|
return false;
|
|
@@ -8418,6 +8419,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8418
8419
|
var tokenFlags;
|
|
8419
8420
|
var commentDirectives;
|
|
8420
8421
|
var inJSDocType = 0;
|
|
8422
|
+
var scriptKind = 0 /* Unknown */;
|
|
8423
|
+
var jsDocParsingMode2 = 0 /* KeepAll */;
|
|
8421
8424
|
setText(text, start, length2);
|
|
8422
8425
|
var scanner = {
|
|
8423
8426
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -8461,6 +8464,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8461
8464
|
setText,
|
|
8462
8465
|
setScriptTarget,
|
|
8463
8466
|
setLanguageVariant,
|
|
8467
|
+
setScriptKind,
|
|
8468
|
+
setJSDocParsingMode,
|
|
8464
8469
|
setOnError,
|
|
8465
8470
|
resetTokenState,
|
|
8466
8471
|
setTextPos: resetTokenState,
|
|
@@ -8714,7 +8719,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8714
8719
|
start2 = pos;
|
|
8715
8720
|
continue;
|
|
8716
8721
|
}
|
|
8717
|
-
if (
|
|
8722
|
+
if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) {
|
|
8718
8723
|
result += text.substring(start2, pos);
|
|
8719
8724
|
tokenFlags |= 4 /* Unterminated */;
|
|
8720
8725
|
error(Diagnostics.Unterminated_string_literal);
|
|
@@ -9239,9 +9244,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9239
9244
|
}
|
|
9240
9245
|
if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
|
|
9241
9246
|
pos += 2;
|
|
9242
|
-
|
|
9243
|
-
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
9244
|
-
}
|
|
9247
|
+
const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */;
|
|
9245
9248
|
let commentClosed = false;
|
|
9246
9249
|
let lastLineStart = tokenStart;
|
|
9247
9250
|
while (pos < end) {
|
|
@@ -9257,6 +9260,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9257
9260
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
9258
9261
|
}
|
|
9259
9262
|
}
|
|
9263
|
+
if (isJSDoc2) {
|
|
9264
|
+
const shouldParseJSDoc = jsDocParsingMode2 === 2 /* SkipAll */ ? false : jsDocParsingMode2 === 1 /* KeepSemanticOnly */ ? scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */ || semanticJSDocTagRegEx.test(text.slice(fullStartPos, pos)) : true;
|
|
9265
|
+
if (shouldParseJSDoc) {
|
|
9266
|
+
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
9267
|
+
}
|
|
9268
|
+
}
|
|
9260
9269
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
9261
9270
|
if (!commentClosed) {
|
|
9262
9271
|
error(Diagnostics.Asterisk_Slash_expected);
|
|
@@ -9927,6 +9936,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9927
9936
|
function setLanguageVariant(variant) {
|
|
9928
9937
|
languageVariant = variant;
|
|
9929
9938
|
}
|
|
9939
|
+
function setScriptKind(kind) {
|
|
9940
|
+
scriptKind = kind;
|
|
9941
|
+
}
|
|
9942
|
+
function setJSDocParsingMode(kind) {
|
|
9943
|
+
jsDocParsingMode2 = kind;
|
|
9944
|
+
}
|
|
9930
9945
|
function resetTokenState(position) {
|
|
9931
9946
|
Debug.assert(position >= 0);
|
|
9932
9947
|
pos = position;
|
|
@@ -15554,6 +15569,9 @@ function isPrototypeAccess(node) {
|
|
|
15554
15569
|
function isRightSideOfQualifiedNameOrPropertyAccess(node) {
|
|
15555
15570
|
return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node;
|
|
15556
15571
|
}
|
|
15572
|
+
function isRightSideOfAccessExpression(node) {
|
|
15573
|
+
return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node);
|
|
15574
|
+
}
|
|
15557
15575
|
function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {
|
|
15558
15576
|
return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node;
|
|
15559
15577
|
}
|
|
@@ -17286,8 +17304,9 @@ function isFunctionExpressionOrArrowFunction(node) {
|
|
|
17286
17304
|
function isNumericLiteralName(name) {
|
|
17287
17305
|
return (+name).toString() === name;
|
|
17288
17306
|
}
|
|
17289
|
-
function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed) {
|
|
17290
|
-
|
|
17307
|
+
function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed, isMethod) {
|
|
17308
|
+
const isMethodNamedNew = isMethod && name === "new";
|
|
17309
|
+
return !isMethodNamedNew && isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && !isMethodNamedNew && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote);
|
|
17291
17310
|
}
|
|
17292
17311
|
function isThisTypeParameter(type) {
|
|
17293
17312
|
return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
|
|
@@ -26278,7 +26297,7 @@ function gatherPossibleChildren(node) {
|
|
|
26278
26297
|
function setExternalModuleIndicator(sourceFile) {
|
|
26279
26298
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
26280
26299
|
}
|
|
26281
|
-
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
26300
|
+
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind, jsDocParsingMode2) {
|
|
26282
26301
|
var _a, _b, _c, _d;
|
|
26283
26302
|
(_a = tracing) == null ? void 0 : _a.push(
|
|
26284
26303
|
tracing.Phase.Parse,
|
|
@@ -26304,7 +26323,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
26304
26323
|
void 0,
|
|
26305
26324
|
setParentNodes,
|
|
26306
26325
|
6 /* JSON */,
|
|
26307
|
-
noop
|
|
26326
|
+
noop,
|
|
26327
|
+
jsDocParsingMode2
|
|
26308
26328
|
);
|
|
26309
26329
|
} else {
|
|
26310
26330
|
const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
|
|
@@ -26319,7 +26339,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
26319
26339
|
void 0,
|
|
26320
26340
|
setParentNodes,
|
|
26321
26341
|
scriptKind,
|
|
26322
|
-
setIndicator
|
|
26342
|
+
setIndicator,
|
|
26343
|
+
jsDocParsingMode2
|
|
26323
26344
|
);
|
|
26324
26345
|
}
|
|
26325
26346
|
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
@@ -26438,7 +26459,7 @@ var Parser;
|
|
|
26438
26459
|
var contextFlags;
|
|
26439
26460
|
var topLevel = true;
|
|
26440
26461
|
var parseErrorBeforeNextFinishedNode = false;
|
|
26441
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) {
|
|
26462
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode2 = 0 /* KeepAll */) {
|
|
26442
26463
|
var _a;
|
|
26443
26464
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
26444
26465
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -26460,8 +26481,8 @@ var Parser;
|
|
|
26460
26481
|
result2.pragmas = emptyMap;
|
|
26461
26482
|
return result2;
|
|
26462
26483
|
}
|
|
26463
|
-
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2);
|
|
26464
|
-
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator);
|
|
26484
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode2);
|
|
26485
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode2);
|
|
26465
26486
|
clearState();
|
|
26466
26487
|
return result;
|
|
26467
26488
|
}
|
|
@@ -26473,7 +26494,8 @@ var Parser;
|
|
|
26473
26494
|
languageVersion2,
|
|
26474
26495
|
/*syntaxCursor*/
|
|
26475
26496
|
void 0,
|
|
26476
|
-
1 /* JS
|
|
26497
|
+
1 /* JS */,
|
|
26498
|
+
0 /* KeepAll */
|
|
26477
26499
|
);
|
|
26478
26500
|
nextToken();
|
|
26479
26501
|
const entityName = parseEntityName(
|
|
@@ -26486,7 +26508,7 @@ var Parser;
|
|
|
26486
26508
|
}
|
|
26487
26509
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
26488
26510
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
26489
|
-
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */);
|
|
26511
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* KeepAll */);
|
|
26490
26512
|
sourceFlags = contextFlags;
|
|
26491
26513
|
nextToken();
|
|
26492
26514
|
const pos = getNodePos();
|
|
@@ -26567,7 +26589,7 @@ var Parser;
|
|
|
26567
26589
|
return result;
|
|
26568
26590
|
}
|
|
26569
26591
|
Parser2.parseJsonText = parseJsonText2;
|
|
26570
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) {
|
|
26592
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
|
|
26571
26593
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
26572
26594
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
26573
26595
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -26603,11 +26625,15 @@ var Parser;
|
|
|
26603
26625
|
scanner.setOnError(scanError);
|
|
26604
26626
|
scanner.setScriptTarget(languageVersion);
|
|
26605
26627
|
scanner.setLanguageVariant(languageVariant);
|
|
26628
|
+
scanner.setScriptKind(scriptKind);
|
|
26629
|
+
scanner.setJSDocParsingMode(_jsDocParsingMode);
|
|
26606
26630
|
}
|
|
26607
26631
|
function clearState() {
|
|
26608
26632
|
scanner.clearCommentDirectives();
|
|
26609
26633
|
scanner.setText("");
|
|
26610
26634
|
scanner.setOnError(void 0);
|
|
26635
|
+
scanner.setScriptKind(0 /* Unknown */);
|
|
26636
|
+
scanner.setJSDocParsingMode(0 /* KeepAll */);
|
|
26611
26637
|
sourceText = void 0;
|
|
26612
26638
|
languageVersion = void 0;
|
|
26613
26639
|
syntaxCursor = void 0;
|
|
@@ -26621,7 +26647,7 @@ var Parser;
|
|
|
26621
26647
|
notParenthesizedArrow = void 0;
|
|
26622
26648
|
topLevel = true;
|
|
26623
26649
|
}
|
|
26624
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) {
|
|
26650
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode2) {
|
|
26625
26651
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
26626
26652
|
if (isDeclarationFile) {
|
|
26627
26653
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -26640,6 +26666,7 @@ var Parser;
|
|
|
26640
26666
|
sourceFile.identifierCount = identifierCount;
|
|
26641
26667
|
sourceFile.identifiers = identifiers;
|
|
26642
26668
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
26669
|
+
sourceFile.jsDocParsingMode = jsDocParsingMode2;
|
|
26643
26670
|
if (jsDocDiagnostics) {
|
|
26644
26671
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
26645
26672
|
}
|
|
@@ -32073,7 +32100,8 @@ var Parser;
|
|
|
32073
32100
|
99 /* Latest */,
|
|
32074
32101
|
/*syntaxCursor*/
|
|
32075
32102
|
void 0,
|
|
32076
|
-
1 /* JS
|
|
32103
|
+
1 /* JS */,
|
|
32104
|
+
0 /* KeepAll */
|
|
32077
32105
|
);
|
|
32078
32106
|
scanner.setText(content, start, length2);
|
|
32079
32107
|
currentToken = scanner.scan();
|
|
@@ -32137,7 +32165,8 @@ var Parser;
|
|
|
32137
32165
|
99 /* Latest */,
|
|
32138
32166
|
/*syntaxCursor*/
|
|
32139
32167
|
void 0,
|
|
32140
|
-
1 /* JS
|
|
32168
|
+
1 /* JS */,
|
|
32169
|
+
0 /* KeepAll */
|
|
32141
32170
|
);
|
|
32142
32171
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
|
|
32143
32172
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -33093,7 +33122,8 @@ var IncrementalParser;
|
|
|
33093
33122
|
/*setParentNodes*/
|
|
33094
33123
|
true,
|
|
33095
33124
|
sourceFile.scriptKind,
|
|
33096
|
-
sourceFile.setExternalModuleIndicator
|
|
33125
|
+
sourceFile.setExternalModuleIndicator,
|
|
33126
|
+
sourceFile.jsDocParsingMode
|
|
33097
33127
|
);
|
|
33098
33128
|
}
|
|
33099
33129
|
const incrementalSourceFile = sourceFile;
|
|
@@ -33117,7 +33147,8 @@ var IncrementalParser;
|
|
|
33117
33147
|
/*setParentNodes*/
|
|
33118
33148
|
true,
|
|
33119
33149
|
sourceFile.scriptKind,
|
|
33120
|
-
sourceFile.setExternalModuleIndicator
|
|
33150
|
+
sourceFile.setExternalModuleIndicator,
|
|
33151
|
+
sourceFile.jsDocParsingMode
|
|
33121
33152
|
);
|
|
33122
33153
|
result.commentDirectives = getNewCommentDirectives(
|
|
33123
33154
|
sourceFile.commentDirectives,
|
|
@@ -43467,20 +43498,30 @@ function createTypeChecker(host) {
|
|
|
43467
43498
|
typeHasCallOrConstructSignatures
|
|
43468
43499
|
};
|
|
43469
43500
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
43470
|
-
const
|
|
43501
|
+
const cachedResolvedSignatures = [];
|
|
43502
|
+
const cachedTypes2 = [];
|
|
43471
43503
|
while (node) {
|
|
43472
|
-
if (isCallLikeExpression(node)) {
|
|
43504
|
+
if (isCallLikeExpression(node) || isFunctionLike(node)) {
|
|
43473
43505
|
const nodeLinks2 = getNodeLinks(node);
|
|
43474
43506
|
const resolvedSignature = nodeLinks2.resolvedSignature;
|
|
43475
|
-
|
|
43507
|
+
cachedResolvedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
43476
43508
|
nodeLinks2.resolvedSignature = void 0;
|
|
43477
43509
|
}
|
|
43510
|
+
if (isFunctionLike(node)) {
|
|
43511
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
43512
|
+
const type = symbolLinks2.type;
|
|
43513
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
43514
|
+
symbolLinks2.type = void 0;
|
|
43515
|
+
}
|
|
43478
43516
|
node = node.parent;
|
|
43479
43517
|
}
|
|
43480
43518
|
const result = fn();
|
|
43481
|
-
for (const [nodeLinks2, resolvedSignature] of
|
|
43519
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
43482
43520
|
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
43483
43521
|
}
|
|
43522
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
43523
|
+
symbolLinks2.type = type;
|
|
43524
|
+
}
|
|
43484
43525
|
return result;
|
|
43485
43526
|
}
|
|
43486
43527
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
@@ -49214,14 +49255,15 @@ function createTypeChecker(host) {
|
|
|
49214
49255
|
function getPropertyNameNodeForSymbol(symbol, context) {
|
|
49215
49256
|
const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
|
|
49216
49257
|
const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
|
|
49217
|
-
const
|
|
49258
|
+
const isMethod = !!(symbol.flags & 8192 /* Method */);
|
|
49259
|
+
const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod);
|
|
49218
49260
|
if (fromNameType) {
|
|
49219
49261
|
return fromNameType;
|
|
49220
49262
|
}
|
|
49221
49263
|
const rawName = unescapeLeadingUnderscores(symbol.escapedName);
|
|
49222
|
-
return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed);
|
|
49264
|
+
return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
|
|
49223
49265
|
}
|
|
49224
|
-
function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed) {
|
|
49266
|
+
function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod) {
|
|
49225
49267
|
const nameType = getSymbolLinks(symbol).nameType;
|
|
49226
49268
|
if (nameType) {
|
|
49227
49269
|
if (nameType.flags & 384 /* StringOrNumberLiteral */) {
|
|
@@ -49232,7 +49274,7 @@ function createTypeChecker(host) {
|
|
|
49232
49274
|
if (isNumericLiteralName(name) && startsWith(name, "-")) {
|
|
49233
49275
|
return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(Math.abs(+name))));
|
|
49234
49276
|
}
|
|
49235
|
-
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions));
|
|
49277
|
+
return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
|
|
49236
49278
|
}
|
|
49237
49279
|
if (nameType.flags & 8192 /* UniqueESSymbol */) {
|
|
49238
49280
|
return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */));
|
|
@@ -51335,10 +51377,6 @@ function createTypeChecker(host) {
|
|
|
51335
51377
|
const prop = getPropertyOfType(type, name);
|
|
51336
51378
|
return prop ? getTypeOfSymbol(prop) : void 0;
|
|
51337
51379
|
}
|
|
51338
|
-
function getTypeOfPropertyOrIndexSignature(type, name) {
|
|
51339
|
-
var _a;
|
|
51340
|
-
return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType;
|
|
51341
|
-
}
|
|
51342
51380
|
function getTypeOfPropertyOrIndexSignatureOfType(type, name) {
|
|
51343
51381
|
var _a;
|
|
51344
51382
|
let propType;
|
|
@@ -51477,9 +51515,14 @@ function createTypeChecker(host) {
|
|
|
51477
51515
|
function getTypeForBindingElement(declaration) {
|
|
51478
51516
|
const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */;
|
|
51479
51517
|
const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
51480
|
-
return parentType && getBindingElementTypeFromParentType(
|
|
51518
|
+
return parentType && getBindingElementTypeFromParentType(
|
|
51519
|
+
declaration,
|
|
51520
|
+
parentType,
|
|
51521
|
+
/*noTupleBoundsCheck*/
|
|
51522
|
+
false
|
|
51523
|
+
);
|
|
51481
51524
|
}
|
|
51482
|
-
function getBindingElementTypeFromParentType(declaration, parentType) {
|
|
51525
|
+
function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) {
|
|
51483
51526
|
if (isTypeAny(parentType)) {
|
|
51484
51527
|
return parentType;
|
|
51485
51528
|
}
|
|
@@ -51518,7 +51561,7 @@ function createTypeChecker(host) {
|
|
|
51518
51561
|
type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType);
|
|
51519
51562
|
} else if (isArrayLikeType(parentType)) {
|
|
51520
51563
|
const indexType = getNumberLiteralType(index);
|
|
51521
|
-
const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
51564
|
+
const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0);
|
|
51522
51565
|
const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
|
|
51523
51566
|
type = getFlowTypeOfDestructuring(declaration, declaredType);
|
|
51524
51567
|
} else {
|
|
@@ -57391,7 +57434,7 @@ function createTypeChecker(host) {
|
|
|
57391
57434
|
return autoType;
|
|
57392
57435
|
}
|
|
57393
57436
|
}
|
|
57394
|
-
const propType = getTypeOfSymbol(prop);
|
|
57437
|
+
const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
|
|
57395
57438
|
return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType;
|
|
57396
57439
|
}
|
|
57397
57440
|
if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) {
|
|
@@ -63321,7 +63364,7 @@ function createTypeChecker(host) {
|
|
|
63321
63364
|
}
|
|
63322
63365
|
const name = escapeLeadingUnderscores(t.value);
|
|
63323
63366
|
const literalProp = createSymbol(4 /* Property */, name);
|
|
63324
|
-
literalProp.links.type =
|
|
63367
|
+
literalProp.links.type = anyType;
|
|
63325
63368
|
if (t.symbol) {
|
|
63326
63369
|
literalProp.declarations = t.symbol.declarations;
|
|
63327
63370
|
literalProp.valueDeclaration = t.symbol.valueDeclaration;
|
|
@@ -65689,7 +65732,7 @@ function createTypeChecker(host) {
|
|
|
65689
65732
|
propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
|
|
65690
65733
|
const narrowedPropType = narrowType2(propType);
|
|
65691
65734
|
return filterType(type, (t) => {
|
|
65692
|
-
const discriminantType =
|
|
65735
|
+
const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType;
|
|
65693
65736
|
return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType);
|
|
65694
65737
|
});
|
|
65695
65738
|
}
|
|
@@ -66262,7 +66305,7 @@ function createTypeChecker(host) {
|
|
|
66262
66305
|
if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) {
|
|
66263
66306
|
return getWriteTypeOfAccessors(location.parent.symbol);
|
|
66264
66307
|
}
|
|
66265
|
-
return getNonMissingTypeOfSymbol(symbol);
|
|
66308
|
+
return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol);
|
|
66266
66309
|
}
|
|
66267
66310
|
function getControlFlowContainer(node) {
|
|
66268
66311
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
@@ -66406,7 +66449,12 @@ function createTypeChecker(host) {
|
|
|
66406
66449
|
if (narrowedType.flags & 131072 /* Never */) {
|
|
66407
66450
|
return neverType;
|
|
66408
66451
|
}
|
|
66409
|
-
return getBindingElementTypeFromParentType(
|
|
66452
|
+
return getBindingElementTypeFromParentType(
|
|
66453
|
+
declaration,
|
|
66454
|
+
narrowedType,
|
|
66455
|
+
/*noTupleBoundsCheck*/
|
|
66456
|
+
true
|
|
66457
|
+
);
|
|
66410
66458
|
}
|
|
66411
66459
|
}
|
|
66412
66460
|
}
|
|
@@ -66930,6 +66978,9 @@ function createTypeChecker(host) {
|
|
|
66930
66978
|
error(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class);
|
|
66931
66979
|
return errorType;
|
|
66932
66980
|
}
|
|
66981
|
+
if (classDeclarationExtendsNull(classLikeDeclaration)) {
|
|
66982
|
+
return isCallExpression2 ? errorType : nullWideningType;
|
|
66983
|
+
}
|
|
66933
66984
|
const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration));
|
|
66934
66985
|
const baseClassType = classType && getBaseTypes(classType)[0];
|
|
66935
66986
|
if (!baseClassType) {
|
|
@@ -72460,7 +72511,12 @@ function createTypeChecker(host) {
|
|
|
72460
72511
|
function assignBindingElementTypes(pattern, parentType) {
|
|
72461
72512
|
for (const element of pattern.elements) {
|
|
72462
72513
|
if (!isOmittedExpression(element)) {
|
|
72463
|
-
const type = getBindingElementTypeFromParentType(
|
|
72514
|
+
const type = getBindingElementTypeFromParentType(
|
|
72515
|
+
element,
|
|
72516
|
+
parentType,
|
|
72517
|
+
/*noTupleBoundsCheck*/
|
|
72518
|
+
false
|
|
72519
|
+
);
|
|
72464
72520
|
if (element.name.kind === 80 /* Identifier */) {
|
|
72465
72521
|
getSymbolLinks(getSymbolOfDeclaration(element)).type = type;
|
|
72466
72522
|
} else {
|
|
@@ -112930,6 +112986,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112930
112986
|
increaseIndent();
|
|
112931
112987
|
shouldDecreaseIndentAfterEmit = true;
|
|
112932
112988
|
}
|
|
112989
|
+
if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) {
|
|
112990
|
+
const commentRange = getCommentRange(child);
|
|
112991
|
+
emitTrailingCommentsOfPosition(
|
|
112992
|
+
commentRange.pos,
|
|
112993
|
+
/*prefixSpace*/
|
|
112994
|
+
!!(format & 512 /* SpaceBetweenSiblings */),
|
|
112995
|
+
/*forceNoNewline*/
|
|
112996
|
+
true
|
|
112997
|
+
);
|
|
112998
|
+
}
|
|
112933
112999
|
writeLine(separatingLineTerminatorCount);
|
|
112934
113000
|
shouldEmitInterveningComments = false;
|
|
112935
113001
|
} else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) {
|
|
@@ -114775,10 +114841,16 @@ function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, ge
|
|
|
114775
114841
|
}
|
|
114776
114842
|
return getPathFromPathComponents(commonPathComponents);
|
|
114777
114843
|
}
|
|
114778
|
-
function createCompilerHost(options, setParentNodes) {
|
|
114779
|
-
return createCompilerHostWorker(
|
|
114844
|
+
function createCompilerHost(options, setParentNodes, jsDocParsingMode2) {
|
|
114845
|
+
return createCompilerHostWorker(
|
|
114846
|
+
options,
|
|
114847
|
+
setParentNodes,
|
|
114848
|
+
/*system*/
|
|
114849
|
+
void 0,
|
|
114850
|
+
jsDocParsingMode2
|
|
114851
|
+
);
|
|
114780
114852
|
}
|
|
114781
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
|
|
114853
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, jsDocParsingMode2) {
|
|
114782
114854
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
114783
114855
|
let text;
|
|
114784
114856
|
try {
|
|
@@ -114792,7 +114864,15 @@ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
|
|
|
114792
114864
|
}
|
|
114793
114865
|
text = "";
|
|
114794
114866
|
}
|
|
114795
|
-
return text !== void 0 ? createSourceFile(
|
|
114867
|
+
return text !== void 0 ? createSourceFile(
|
|
114868
|
+
fileName,
|
|
114869
|
+
text,
|
|
114870
|
+
languageVersionOrOptions,
|
|
114871
|
+
setParentNodes,
|
|
114872
|
+
/*scriptKind*/
|
|
114873
|
+
void 0,
|
|
114874
|
+
jsDocParsingMode2
|
|
114875
|
+
) : void 0;
|
|
114796
114876
|
};
|
|
114797
114877
|
}
|
|
114798
114878
|
function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {
|
|
@@ -114816,7 +114896,7 @@ function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryE
|
|
|
114816
114896
|
}
|
|
114817
114897
|
};
|
|
114818
114898
|
}
|
|
114819
|
-
function createCompilerHostWorker(options, setParentNodes, system = sys) {
|
|
114899
|
+
function createCompilerHostWorker(options, setParentNodes, system = sys, jsDocParsingMode2) {
|
|
114820
114900
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
114821
114901
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
114822
114902
|
function directoryExists(directoryPath) {
|
|
@@ -114835,7 +114915,7 @@ function createCompilerHostWorker(options, setParentNodes, system = sys) {
|
|
|
114835
114915
|
const newLine = getNewLineCharacter(options);
|
|
114836
114916
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
114837
114917
|
const compilerHost = {
|
|
114838
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes),
|
|
114918
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, jsDocParsingMode2),
|
|
114839
114919
|
getDefaultLibLocation,
|
|
114840
114920
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
114841
114921
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -120459,19 +120539,22 @@ function removeIgnoredPath(path) {
|
|
|
120459
120539
|
function perceivedOsRootLengthForWatching(pathComponents2, length2) {
|
|
120460
120540
|
if (length2 <= 1)
|
|
120461
120541
|
return 1;
|
|
120462
|
-
let
|
|
120542
|
+
let indexAfterOsRoot = 1;
|
|
120463
120543
|
let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0;
|
|
120464
120544
|
if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths
|
|
120465
120545
|
pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) {
|
|
120466
120546
|
if (length2 === 2)
|
|
120467
120547
|
return 2;
|
|
120468
|
-
|
|
120548
|
+
indexAfterOsRoot = 2;
|
|
120469
120549
|
isDosStyle = true;
|
|
120470
120550
|
}
|
|
120471
|
-
if (isDosStyle && !pathComponents2[
|
|
120472
|
-
return
|
|
120551
|
+
if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) {
|
|
120552
|
+
return indexAfterOsRoot;
|
|
120553
|
+
}
|
|
120554
|
+
if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) {
|
|
120555
|
+
return indexAfterOsRoot + 1;
|
|
120473
120556
|
}
|
|
120474
|
-
return
|
|
120557
|
+
return indexAfterOsRoot + 2;
|
|
120475
120558
|
}
|
|
120476
120559
|
function canWatchDirectoryOrFile(pathComponents2, length2) {
|
|
120477
120560
|
if (length2 === void 0)
|
|
@@ -121906,7 +121989,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
|
|
|
121906
121989
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
121907
121990
|
getCompilerOptions,
|
|
121908
121991
|
/*setParentNodes*/
|
|
121909
|
-
void 0
|
|
121992
|
+
void 0,
|
|
121993
|
+
host.jsDocParsingMode
|
|
121910
121994
|
),
|
|
121911
121995
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
121912
121996
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -122092,12 +122176,13 @@ function readBuilderProgram(compilerOptions, host) {
|
|
|
122092
122176
|
return void 0;
|
|
122093
122177
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
122094
122178
|
}
|
|
122095
|
-
function createIncrementalCompilerHost(options, system = sys) {
|
|
122179
|
+
function createIncrementalCompilerHost(options, system = sys, jsDocParsingMode2) {
|
|
122096
122180
|
const host = createCompilerHostWorker(
|
|
122097
122181
|
options,
|
|
122098
122182
|
/*setParentNodes*/
|
|
122099
122183
|
void 0,
|
|
122100
|
-
system
|
|
122184
|
+
system,
|
|
122185
|
+
jsDocParsingMode2
|
|
122101
122186
|
);
|
|
122102
122187
|
host.createHash = maybeBind(system, system.createHash);
|
|
122103
122188
|
host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
|
|
@@ -125426,6 +125511,7 @@ function reportWatchModeWithoutSysSupport(sys2, reportDiagnostic) {
|
|
|
125426
125511
|
}
|
|
125427
125512
|
return false;
|
|
125428
125513
|
}
|
|
125514
|
+
var jsDocParsingMode = 1 /* KeepSemanticOnly */;
|
|
125429
125515
|
function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {
|
|
125430
125516
|
const reportDiagnostic = updateReportDiagnostic(
|
|
125431
125517
|
sys2,
|
|
@@ -125464,6 +125550,7 @@ function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {
|
|
|
125464
125550
|
createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)),
|
|
125465
125551
|
createWatchStatusReporter2(sys2, buildOptions)
|
|
125466
125552
|
);
|
|
125553
|
+
buildHost2.jsDocParsingMode = jsDocParsingMode;
|
|
125467
125554
|
const solutionPerformance2 = enableSolutionPerformance(sys2, buildOptions);
|
|
125468
125555
|
updateSolutionBuilderHost(sys2, cb, buildHost2, solutionPerformance2);
|
|
125469
125556
|
const onWatchStatusChange = buildHost2.onWatchStatusChange;
|
|
@@ -125488,6 +125575,7 @@ function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) {
|
|
|
125488
125575
|
createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)),
|
|
125489
125576
|
createReportErrorSummary(sys2, buildOptions)
|
|
125490
125577
|
);
|
|
125578
|
+
buildHost.jsDocParsingMode = jsDocParsingMode;
|
|
125491
125579
|
const solutionPerformance = enableSolutionPerformance(sys2, buildOptions);
|
|
125492
125580
|
updateSolutionBuilderHost(sys2, cb, buildHost, solutionPerformance);
|
|
125493
125581
|
const builder = createSolutionBuilder(buildHost, projects, buildOptions);
|
|
@@ -125505,7 +125593,8 @@ function performCompilation(sys2, cb, reportDiagnostic, config) {
|
|
|
125505
125593
|
options,
|
|
125506
125594
|
/*setParentNodes*/
|
|
125507
125595
|
void 0,
|
|
125508
|
-
sys2
|
|
125596
|
+
sys2,
|
|
125597
|
+
jsDocParsingMode
|
|
125509
125598
|
);
|
|
125510
125599
|
const currentDirectory = host.getCurrentDirectory();
|
|
125511
125600
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames());
|
|
@@ -125547,7 +125636,7 @@ function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) {
|
|
|
125547
125636
|
/*isBuildMode*/
|
|
125548
125637
|
false
|
|
125549
125638
|
);
|
|
125550
|
-
const host = createIncrementalCompilerHost(options, sys2);
|
|
125639
|
+
const host = createIncrementalCompilerHost(options, sys2, jsDocParsingMode);
|
|
125551
125640
|
const exitStatus = performIncrementalCompilation({
|
|
125552
125641
|
host,
|
|
125553
125642
|
system: sys2,
|
|
@@ -125602,6 +125691,7 @@ function updateCreateProgram(sys2, host, isBuildMode) {
|
|
|
125602
125691
|
};
|
|
125603
125692
|
}
|
|
125604
125693
|
function updateWatchCompilationHost(sys2, cb, watchCompilerHost) {
|
|
125694
|
+
watchCompilerHost.jsDocParsingMode = jsDocParsingMode;
|
|
125605
125695
|
updateCreateProgram(
|
|
125606
125696
|
sys2,
|
|
125607
125697
|
watchCompilerHost,
|