@typescript-deploys/pr-build 5.5.0-pr-58495-9 → 5.5.0-pr-58525-2
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 +142 -150
- package/lib/typescript.d.ts +31 -38
- package/lib/typescript.js +656 -622
- package/package.json +1 -1
package/lib/typescript.js
CHANGED
|
@@ -68,7 +68,6 @@ __export(typescript_exports, {
|
|
|
68
68
|
EmitHint: () => EmitHint,
|
|
69
69
|
EmitOnly: () => EmitOnly,
|
|
70
70
|
EndOfLineState: () => EndOfLineState,
|
|
71
|
-
EnumKind: () => EnumKind,
|
|
72
71
|
ExitStatus: () => ExitStatus,
|
|
73
72
|
ExportKind: () => ExportKind,
|
|
74
73
|
Extension: () => Extension,
|
|
@@ -2369,7 +2368,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2369
2368
|
|
|
2370
2369
|
// src/compiler/corePublic.ts
|
|
2371
2370
|
var versionMajorMinor = "5.5";
|
|
2372
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2371
|
+
var version = `${versionMajorMinor}.0-insiders.20240513`;
|
|
2373
2372
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2374
2373
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2375
2374
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6492,11 +6491,6 @@ var SymbolFlags = /* @__PURE__ */ ((SymbolFlags3) => {
|
|
|
6492
6491
|
SymbolFlags3[SymbolFlags3["LateBindingContainer"] = 6256] = "LateBindingContainer";
|
|
6493
6492
|
return SymbolFlags3;
|
|
6494
6493
|
})(SymbolFlags || {});
|
|
6495
|
-
var EnumKind = /* @__PURE__ */ ((EnumKind2) => {
|
|
6496
|
-
EnumKind2[EnumKind2["Numeric"] = 0] = "Numeric";
|
|
6497
|
-
EnumKind2[EnumKind2["Literal"] = 1] = "Literal";
|
|
6498
|
-
return EnumKind2;
|
|
6499
|
-
})(EnumKind || {});
|
|
6500
6494
|
var CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {
|
|
6501
6495
|
CheckFlags2[CheckFlags2["None"] = 0] = "None";
|
|
6502
6496
|
CheckFlags2[CheckFlags2["Instantiated"] = 1] = "Instantiated";
|
|
@@ -11622,8 +11616,8 @@ var regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
|
|
|
11622
11616
|
]);
|
|
11623
11617
|
var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 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, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 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, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
|
|
11624
11618
|
var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 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, 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, 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, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 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, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 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, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 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, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 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, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 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, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 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, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 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, 65062, 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];
|
|
11625
|
-
var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154,
|
|
11626
|
-
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];
|
|
11619
|
+
var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 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, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 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, 8305, 8305, 8319, 8319, 8336, 8348, 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, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 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, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 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, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 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, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 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, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743];
|
|
11620
|
+
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, 2160, 2183, 2185, 2190, 2200, 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, 2901, 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, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 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, 3790, 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, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 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, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 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, 8204, 8205, 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, 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, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 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, 43881, 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, 65381, 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, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 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, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 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, 70753, 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, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 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, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 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, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 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, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 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, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999];
|
|
11627
11621
|
var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
11628
11622
|
var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
11629
11623
|
var jsDocSeeOrLink = /@(?:see|link)/i;
|
|
@@ -15978,7 +15972,7 @@ function canHaveLocals(node) {
|
|
|
15978
15972
|
}
|
|
15979
15973
|
}
|
|
15980
15974
|
function isDeclarationKind(kind) {
|
|
15981
|
-
return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 346 /* JSDocTypedefTag */ || kind === 338 /* JSDocCallbackTag */ || kind === 348 /* JSDocPropertyTag */;
|
|
15975
|
+
return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 346 /* JSDocTypedefTag */ || kind === 338 /* JSDocCallbackTag */ || kind === 348 /* JSDocPropertyTag */ || kind === 202 /* NamedTupleMember */;
|
|
15982
15976
|
}
|
|
15983
15977
|
function isDeclarationStatementKind(kind) {
|
|
15984
15978
|
return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */;
|
|
@@ -23156,13 +23150,15 @@ function createNameResolver({
|
|
|
23156
23150
|
let useResult = true;
|
|
23157
23151
|
if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
|
|
23158
23152
|
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 320 /* JSDoc */) {
|
|
23159
|
-
useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation
|
|
23153
|
+
useResult = result.flags & 262144 /* TypeParameter */ ? !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so type parameters are accessible from them
|
|
23154
|
+
lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 341 /* JSDocParameterTag */ || lastLocation.kind === 342 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false;
|
|
23160
23155
|
}
|
|
23161
23156
|
if (meaning & result.flags & 3 /* Variable */) {
|
|
23162
23157
|
if (useOuterVariableScopeInParameter(result, location, lastLocation)) {
|
|
23163
23158
|
useResult = false;
|
|
23164
23159
|
} else if (result.flags & 1 /* FunctionScopedVariable */) {
|
|
23165
|
-
useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation
|
|
23160
|
+
useResult = lastLocation.kind === 169 /* Parameter */ || !!(lastLocation.flags & 16 /* Synthesized */) || // Synthetic fake scopes are added for signatures so parameters are accessible from them
|
|
23161
|
+
lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter);
|
|
23166
23162
|
}
|
|
23167
23163
|
}
|
|
23168
23164
|
} else if (location.kind === 194 /* ConditionalType */) {
|
|
@@ -51210,7 +51206,6 @@ function createTypeChecker(host) {
|
|
|
51210
51206
|
if (meaning) {
|
|
51211
51207
|
const symbol = getMergedSymbol(symbols.get(name));
|
|
51212
51208
|
if (symbol) {
|
|
51213
|
-
Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
|
|
51214
51209
|
if (symbol.flags & meaning) {
|
|
51215
51210
|
return symbol;
|
|
51216
51211
|
}
|
|
@@ -52614,7 +52609,6 @@ function createTypeChecker(host) {
|
|
|
52614
52609
|
} else {
|
|
52615
52610
|
Debug.assertNever(name, "Unknown entity name kind.");
|
|
52616
52611
|
}
|
|
52617
|
-
Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
|
|
52618
52612
|
if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) {
|
|
52619
52613
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
52620
52614
|
getAliasDeclarationFromName(name),
|
|
@@ -54035,7 +54029,6 @@ function createTypeChecker(host) {
|
|
|
54035
54029
|
return symbolToExpression(symbol, context, meaning);
|
|
54036
54030
|
}
|
|
54037
54031
|
function withContext2(enclosingDeclaration, flags, tracker, cb) {
|
|
54038
|
-
Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 16 /* Synthesized */) === 0);
|
|
54039
54032
|
const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0;
|
|
54040
54033
|
const context = {
|
|
54041
54034
|
enclosingDeclaration,
|
|
@@ -54049,7 +54042,18 @@ function createTypeChecker(host) {
|
|
|
54049
54042
|
inferTypeParameters: void 0,
|
|
54050
54043
|
approximateLength: 0,
|
|
54051
54044
|
trackedSymbols: void 0,
|
|
54052
|
-
bundled: !!compilerOptions.outFile && !!enclosingDeclaration && isExternalOrCommonJsModule(getSourceFileOfNode(enclosingDeclaration))
|
|
54045
|
+
bundled: !!compilerOptions.outFile && !!enclosingDeclaration && isExternalOrCommonJsModule(getSourceFileOfNode(enclosingDeclaration)),
|
|
54046
|
+
truncating: false,
|
|
54047
|
+
usedSymbolNames: void 0,
|
|
54048
|
+
remappedSymbolNames: void 0,
|
|
54049
|
+
remappedSymbolReferences: void 0,
|
|
54050
|
+
reverseMappedStack: void 0,
|
|
54051
|
+
mustCreateTypeParameterSymbolList: true,
|
|
54052
|
+
typeParameterSymbolList: void 0,
|
|
54053
|
+
mustCreateTypeParametersNamesLookups: true,
|
|
54054
|
+
typeParameterNames: void 0,
|
|
54055
|
+
typeParameterNamesByText: void 0,
|
|
54056
|
+
typeParameterNamesByTextNextNameCount: void 0
|
|
54053
54057
|
};
|
|
54054
54058
|
context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost);
|
|
54055
54059
|
const resultingNode = cb(context);
|
|
@@ -55044,22 +55048,22 @@ function createTypeChecker(host) {
|
|
|
55044
55048
|
}
|
|
55045
55049
|
function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
|
|
55046
55050
|
var _a;
|
|
55047
|
-
const flags = context.flags;
|
|
55048
|
-
context.flags &= ~256 /* SuppressAnyReturnType */;
|
|
55049
|
-
context.approximateLength += 3;
|
|
55050
55051
|
let typeParameters;
|
|
55051
55052
|
let typeArguments;
|
|
55052
|
-
if (context.flags & 32 /* WriteTypeArgumentsOfSignature */ && signature.target && signature.mapper && signature.target.typeParameters) {
|
|
55053
|
-
typeArguments = signature.target.typeParameters.map((parameter) => typeToTypeNodeHelper(instantiateType(parameter, signature.mapper), context));
|
|
55054
|
-
} else {
|
|
55055
|
-
typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context));
|
|
55056
|
-
}
|
|
55057
55053
|
const expandedParams = getExpandedParameters(
|
|
55058
55054
|
signature,
|
|
55059
55055
|
/*skipUnionExpanding*/
|
|
55060
55056
|
true
|
|
55061
55057
|
)[0];
|
|
55062
|
-
const cleanup = enterNewScope(context, signature.declaration, expandedParams, signature.typeParameters);
|
|
55058
|
+
const cleanup = enterNewScope(context, signature.declaration, expandedParams, signature.typeParameters, signature.parameters);
|
|
55059
|
+
context.approximateLength += 3;
|
|
55060
|
+
if (context.flags & 32 /* WriteTypeArgumentsOfSignature */ && signature.target && signature.mapper && signature.target.typeParameters) {
|
|
55061
|
+
typeArguments = signature.target.typeParameters.map((parameter) => typeToTypeNodeHelper(instantiateType(parameter, signature.mapper), context));
|
|
55062
|
+
} else {
|
|
55063
|
+
typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context));
|
|
55064
|
+
}
|
|
55065
|
+
const flags = context.flags;
|
|
55066
|
+
context.flags &= ~256 /* SuppressAnyReturnType */;
|
|
55063
55067
|
const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */));
|
|
55064
55068
|
const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context);
|
|
55065
55069
|
if (thisParameter) {
|
|
@@ -55157,15 +55161,14 @@ function createTypeChecker(host) {
|
|
|
55157
55161
|
return isFunctionLike(node) || isJSDocSignature(node) ? getSignatureFromDeclaration(node).typeParameters : isConditionalTypeNode(node) ? getInferTypeParameters(node) : [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))];
|
|
55158
55162
|
}
|
|
55159
55163
|
function getParametersInScope(node) {
|
|
55160
|
-
return isFunctionLike(node) || isJSDocSignature(node) ?
|
|
55161
|
-
|
|
55162
|
-
|
|
55163
|
-
|
|
55164
|
-
|
|
55165
|
-
|
|
55166
|
-
|
|
55167
|
-
|
|
55168
|
-
if (context.enclosingDeclaration && declaration && declaration !== context.enclosingDeclaration && !isInJSFile(declaration) && (some(expandedParams) || some(typeParameters))) {
|
|
55164
|
+
return isFunctionLike(node) || isJSDocSignature(node) ? getSignatureFromDeclaration(node).parameters : void 0;
|
|
55165
|
+
}
|
|
55166
|
+
function enterNewScope(context, declaration, expandedParams, typeParameters, originalParameters) {
|
|
55167
|
+
const cleanupContext = cloneNodeBuilderContext(context);
|
|
55168
|
+
let cleanupParams;
|
|
55169
|
+
let cleanupTypeParams;
|
|
55170
|
+
const oldEnclosingDecl = context.enclosingDeclaration;
|
|
55171
|
+
if (context.enclosingDeclaration && declaration) {
|
|
55169
55172
|
let pushFakeScope2 = function(kind, addAll) {
|
|
55170
55173
|
Debug.assert(context.enclosingDeclaration);
|
|
55171
55174
|
let existingFakeScope;
|
|
@@ -55177,39 +55180,45 @@ function createTypeChecker(host) {
|
|
|
55177
55180
|
Debug.assertOptionalNode(existingFakeScope, isBlock);
|
|
55178
55181
|
const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable();
|
|
55179
55182
|
let newLocals;
|
|
55183
|
+
let oldLocals;
|
|
55180
55184
|
addAll((name, symbol) => {
|
|
55181
|
-
if (
|
|
55182
|
-
|
|
55183
|
-
|
|
55185
|
+
if (existingFakeScope) {
|
|
55186
|
+
const oldSymbol = locals.get(name);
|
|
55187
|
+
if (!oldSymbol) {
|
|
55188
|
+
newLocals = append(newLocals, name);
|
|
55189
|
+
} else {
|
|
55190
|
+
oldLocals = append(oldLocals, { name, oldSymbol });
|
|
55191
|
+
}
|
|
55184
55192
|
}
|
|
55193
|
+
locals.set(name, symbol);
|
|
55185
55194
|
});
|
|
55186
|
-
if (!
|
|
55187
|
-
|
|
55188
|
-
function undo() {
|
|
55189
|
-
forEach(newLocals, (s) => locals.delete(s));
|
|
55190
|
-
oldCleanup == null ? void 0 : oldCleanup();
|
|
55191
|
-
}
|
|
55192
|
-
if (existingFakeScope) {
|
|
55193
|
-
cleanup = undo;
|
|
55194
|
-
} else {
|
|
55195
|
-
const fakeScope = parseNodeFactory.createBlock(emptyArray);
|
|
55195
|
+
if (!existingFakeScope) {
|
|
55196
|
+
const fakeScope = factory.createBlock(emptyArray);
|
|
55196
55197
|
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = kind;
|
|
55197
55198
|
fakeScope.locals = locals;
|
|
55198
|
-
|
|
55199
|
-
setParent(fakeScope, saveEnclosingDeclaration);
|
|
55199
|
+
setParent(fakeScope, context.enclosingDeclaration);
|
|
55200
55200
|
context.enclosingDeclaration = fakeScope;
|
|
55201
|
-
|
|
55202
|
-
|
|
55203
|
-
|
|
55201
|
+
} else {
|
|
55202
|
+
return function undo() {
|
|
55203
|
+
forEach(newLocals, (s) => locals.delete(s));
|
|
55204
|
+
forEach(oldLocals, (s) => locals.set(s.name, s.oldSymbol));
|
|
55204
55205
|
};
|
|
55205
55206
|
}
|
|
55206
55207
|
};
|
|
55207
55208
|
var pushFakeScope = pushFakeScope2;
|
|
55208
|
-
pushFakeScope2(
|
|
55209
|
+
cleanupParams = !some(expandedParams) ? void 0 : pushFakeScope2(
|
|
55209
55210
|
"params",
|
|
55210
55211
|
(add) => {
|
|
55211
|
-
|
|
55212
|
-
|
|
55212
|
+
if (!expandedParams) return;
|
|
55213
|
+
for (let pIndex = 0; pIndex < expandedParams.length; pIndex++) {
|
|
55214
|
+
const param = expandedParams[pIndex];
|
|
55215
|
+
const originalParam = originalParameters == null ? void 0 : originalParameters[pIndex];
|
|
55216
|
+
if (originalParameters && originalParam !== param) {
|
|
55217
|
+
add(param.escapedName, unknownSymbol);
|
|
55218
|
+
if (originalParam) {
|
|
55219
|
+
add(originalParam.escapedName, unknownSymbol);
|
|
55220
|
+
}
|
|
55221
|
+
} else if (!forEach(param.declarations, (d) => {
|
|
55213
55222
|
if (isParameter(d) && isBindingPattern(d.name)) {
|
|
55214
55223
|
bindPattern(d.name);
|
|
55215
55224
|
return true;
|
|
@@ -55240,8 +55249,8 @@ function createTypeChecker(host) {
|
|
|
55240
55249
|
}
|
|
55241
55250
|
}
|
|
55242
55251
|
);
|
|
55243
|
-
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
55244
|
-
pushFakeScope2(
|
|
55252
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && some(typeParameters)) {
|
|
55253
|
+
cleanupTypeParams = pushFakeScope2(
|
|
55245
55254
|
"typeParams",
|
|
55246
55255
|
(add) => {
|
|
55247
55256
|
for (const typeParam of typeParameters ?? emptyArray) {
|
|
@@ -55251,8 +55260,13 @@ function createTypeChecker(host) {
|
|
|
55251
55260
|
}
|
|
55252
55261
|
);
|
|
55253
55262
|
}
|
|
55254
|
-
return cleanup;
|
|
55255
55263
|
}
|
|
55264
|
+
return () => {
|
|
55265
|
+
cleanupParams == null ? void 0 : cleanupParams();
|
|
55266
|
+
cleanupTypeParams == null ? void 0 : cleanupTypeParams();
|
|
55267
|
+
cleanupContext();
|
|
55268
|
+
context.enclosingDeclaration = oldEnclosingDecl;
|
|
55269
|
+
};
|
|
55256
55270
|
}
|
|
55257
55271
|
function tryGetThisParameterDeclaration(signature, context) {
|
|
55258
55272
|
if (signature.thisParameter) {
|
|
@@ -55470,7 +55484,11 @@ function createTypeChecker(host) {
|
|
|
55470
55484
|
if ((_a = context.typeParameterSymbolList) == null ? void 0 : _a.has(symbolId)) {
|
|
55471
55485
|
return void 0;
|
|
55472
55486
|
}
|
|
55473
|
-
|
|
55487
|
+
if (context.mustCreateTypeParameterSymbolList) {
|
|
55488
|
+
context.mustCreateTypeParameterSymbolList = false;
|
|
55489
|
+
context.typeParameterSymbolList = new Set(context.typeParameterSymbolList);
|
|
55490
|
+
}
|
|
55491
|
+
context.typeParameterSymbolList.add(symbolId);
|
|
55474
55492
|
let typeParameterNodes;
|
|
55475
55493
|
if (context.flags & 512 /* WriteTypeParametersInQualifiedName */ && index < chain.length - 1) {
|
|
55476
55494
|
const parentSymbol = symbol;
|
|
@@ -55731,9 +55749,15 @@ function createTypeChecker(host) {
|
|
|
55731
55749
|
result = factory.createIdentifier(text);
|
|
55732
55750
|
setIdentifierTypeArguments(result, typeArguments);
|
|
55733
55751
|
}
|
|
55734
|
-
|
|
55735
|
-
|
|
55736
|
-
|
|
55752
|
+
if (context.mustCreateTypeParametersNamesLookups) {
|
|
55753
|
+
context.mustCreateTypeParametersNamesLookups = false;
|
|
55754
|
+
context.typeParameterNames = new Map(context.typeParameterNames);
|
|
55755
|
+
context.typeParameterNamesByTextNextNameCount = new Map(context.typeParameterNamesByTextNextNameCount);
|
|
55756
|
+
context.typeParameterNamesByText = new Set(context.typeParameterNamesByText);
|
|
55757
|
+
}
|
|
55758
|
+
context.typeParameterNamesByTextNextNameCount.set(rawtext, i);
|
|
55759
|
+
context.typeParameterNames.set(getTypeId(type), result);
|
|
55760
|
+
context.typeParameterNamesByText.add(text);
|
|
55737
55761
|
}
|
|
55738
55762
|
return result;
|
|
55739
55763
|
}
|
|
@@ -55855,21 +55879,22 @@ function createTypeChecker(host) {
|
|
|
55855
55879
|
}
|
|
55856
55880
|
}
|
|
55857
55881
|
function cloneNodeBuilderContext(context) {
|
|
55858
|
-
const
|
|
55859
|
-
|
|
55860
|
-
|
|
55861
|
-
|
|
55862
|
-
|
|
55863
|
-
|
|
55864
|
-
|
|
55865
|
-
|
|
55866
|
-
|
|
55867
|
-
|
|
55868
|
-
|
|
55869
|
-
|
|
55870
|
-
|
|
55871
|
-
|
|
55872
|
-
|
|
55882
|
+
const oldMustCreateTypeParameterSymbolList = context.mustCreateTypeParameterSymbolList;
|
|
55883
|
+
const oldMustCreateTypeParametersNamesLookups = context.mustCreateTypeParametersNamesLookups;
|
|
55884
|
+
context.mustCreateTypeParameterSymbolList = true;
|
|
55885
|
+
context.mustCreateTypeParametersNamesLookups = true;
|
|
55886
|
+
const oldTypeParameterNames = context.typeParameterNames;
|
|
55887
|
+
const oldTypeParameterNamesByText = context.typeParameterNamesByText;
|
|
55888
|
+
const oldTypeParameterNamesByTextNextNameCount = context.typeParameterNamesByTextNextNameCount;
|
|
55889
|
+
const oldTypeParameterSymbolList = context.typeParameterSymbolList;
|
|
55890
|
+
return () => {
|
|
55891
|
+
context.typeParameterNames = oldTypeParameterNames;
|
|
55892
|
+
context.typeParameterNamesByText = oldTypeParameterNamesByText;
|
|
55893
|
+
context.typeParameterNamesByTextNextNameCount = oldTypeParameterNamesByTextNextNameCount;
|
|
55894
|
+
context.typeParameterSymbolList = oldTypeParameterSymbolList;
|
|
55895
|
+
context.mustCreateTypeParameterSymbolList = oldMustCreateTypeParameterSymbolList;
|
|
55896
|
+
context.mustCreateTypeParametersNamesLookups = oldMustCreateTypeParametersNamesLookups;
|
|
55897
|
+
};
|
|
55873
55898
|
}
|
|
55874
55899
|
function getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration) {
|
|
55875
55900
|
return symbol.declarations && find(symbol.declarations, (s) => !!getNonlocalEffectiveTypeAnnotationNode(s) && (!enclosingDeclaration || !!findAncestor(s, (n) => n === enclosingDeclaration)));
|
|
@@ -55947,7 +55972,7 @@ function createTypeChecker(host) {
|
|
|
55947
55972
|
function serializeReturnTypeForSignatureWorker(context, signature) {
|
|
55948
55973
|
const typePredicate = getTypePredicateOfSignature(signature);
|
|
55949
55974
|
const type = getReturnTypeOfSignature(signature);
|
|
55950
|
-
if (!isErrorType(type)
|
|
55975
|
+
if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */)) {
|
|
55951
55976
|
const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
|
|
55952
55977
|
const enclosingDeclarationIgnoringFakeScope = getEnclosingDeclarationIgnoringFakeScope(context.enclosingDeclaration);
|
|
55953
55978
|
if (!!findAncestor(annotation, (n) => n === enclosingDeclarationIgnoringFakeScope) && annotation) {
|
|
@@ -56002,13 +56027,34 @@ function createTypeChecker(host) {
|
|
|
56002
56027
|
/*dontResolveAlias*/
|
|
56003
56028
|
true
|
|
56004
56029
|
);
|
|
56030
|
+
if (context.enclosingDeclaration && (getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration || !findAncestor(node, (n) => n === context.enclosingDeclaration)) && !(sym && sym.flags & 262144 /* TypeParameter */)) {
|
|
56031
|
+
sym = getExportSymbolOfValueSymbolIfExported(sym);
|
|
56032
|
+
const symAtLocation = resolveEntityName(
|
|
56033
|
+
leftmost,
|
|
56034
|
+
meaning,
|
|
56035
|
+
/*ignoreErrors*/
|
|
56036
|
+
true,
|
|
56037
|
+
/*dontResolveAlias*/
|
|
56038
|
+
true,
|
|
56039
|
+
context.enclosingDeclaration
|
|
56040
|
+
);
|
|
56041
|
+
if (
|
|
56042
|
+
// Check for unusable parameters symbols
|
|
56043
|
+
symAtLocation === unknownSymbol || // If the symbol is not found, but was not found in the original scope either we probably have an error, don't reuse the node
|
|
56044
|
+
symAtLocation === void 0 && sym !== void 0 || // If the symbol is found both in declaration scope and in current scope then it shoudl point to the same reference
|
|
56045
|
+
symAtLocation && sym && !getSymbolIfSameReference(getExportSymbolOfValueSymbolIfExported(symAtLocation), sym)
|
|
56046
|
+
) {
|
|
56047
|
+
introducesError = true;
|
|
56048
|
+
return { introducesError, node, sym };
|
|
56049
|
+
}
|
|
56050
|
+
}
|
|
56005
56051
|
if (sym) {
|
|
56006
56052
|
if (sym.flags & 1 /* FunctionScopedVariable */ && sym.valueDeclaration) {
|
|
56007
|
-
if (isPartOfParameterDeclaration(sym.valueDeclaration)) {
|
|
56053
|
+
if (isPartOfParameterDeclaration(sym.valueDeclaration) || isJSDocParameterTag(sym.valueDeclaration)) {
|
|
56008
56054
|
return { introducesError, node: attachSymbolToLeftmostIdentifier(node) };
|
|
56009
56055
|
}
|
|
56010
56056
|
}
|
|
56011
|
-
if (!(sym.flags & 262144 /* TypeParameter */) && // Type parameters are visible in the
|
|
56057
|
+
if (!(sym.flags & 262144 /* TypeParameter */) && // Type parameters are visible in the current context if they are are resolvable
|
|
56012
56058
|
!isDeclarationName(node) && isSymbolAccessible(
|
|
56013
56059
|
sym,
|
|
56014
56060
|
context.enclosingDeclaration,
|
|
@@ -56059,14 +56105,7 @@ function createTypeChecker(host) {
|
|
|
56059
56105
|
return result === node ? setTextRange2(context, factory.cloneNode(result), node) : result;
|
|
56060
56106
|
}
|
|
56061
56107
|
function onEnterNewScope(node) {
|
|
56062
|
-
|
|
56063
|
-
context = cloneNodeBuilderContext(context);
|
|
56064
|
-
const cleanup = enterNewScope(context, node, getParametersInScope(node), getTypeParametersInScope(node));
|
|
56065
|
-
return onExitNewScope;
|
|
56066
|
-
function onExitNewScope() {
|
|
56067
|
-
cleanup == null ? void 0 : cleanup();
|
|
56068
|
-
context = oldContex;
|
|
56069
|
-
}
|
|
56108
|
+
return enterNewScope(context, node, getParametersInScope(node), getTypeParametersInScope(node));
|
|
56070
56109
|
}
|
|
56071
56110
|
function visitExistingNodeTreeSymbolsWorker(node) {
|
|
56072
56111
|
if (isJSDocAllType(node) || node.kind === 319 /* JSDocNamepathType */) {
|
|
@@ -56516,17 +56555,9 @@ function createTypeChecker(host) {
|
|
|
56516
56555
|
visitedSymbols.add(getSymbolId(visitedSym));
|
|
56517
56556
|
const skipMembershipCheck = !isPrivate;
|
|
56518
56557
|
if (skipMembershipCheck || !!length(symbol.declarations) && some(symbol.declarations, (d) => !!findAncestor(d, (n) => n === enclosingDeclaration))) {
|
|
56519
|
-
const
|
|
56520
|
-
context = cloneNodeBuilderContext(context);
|
|
56558
|
+
const scopeCleanup = cloneNodeBuilderContext(context);
|
|
56521
56559
|
serializeSymbolWorker(symbol, isPrivate, propertyAsAlias);
|
|
56522
|
-
|
|
56523
|
-
oldcontext.reportedDiagnostic = context.reportedDiagnostic;
|
|
56524
|
-
}
|
|
56525
|
-
if (context.trackedSymbols) {
|
|
56526
|
-
if (!oldContext.trackedSymbols) oldContext.trackedSymbols = context.trackedSymbols;
|
|
56527
|
-
else Debug.assert(context.trackedSymbols === oldContext.trackedSymbols);
|
|
56528
|
-
}
|
|
56529
|
-
context = oldContext;
|
|
56560
|
+
scopeCleanup();
|
|
56530
56561
|
}
|
|
56531
56562
|
}
|
|
56532
56563
|
function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) {
|
|
@@ -58093,8 +58124,6 @@ function createTypeChecker(host) {
|
|
|
58093
58124
|
switch (propertyName) {
|
|
58094
58125
|
case 0 /* Type */:
|
|
58095
58126
|
return !!getSymbolLinks(target).type;
|
|
58096
|
-
case 5 /* EnumTagType */:
|
|
58097
|
-
return !!getNodeLinks(target).resolvedEnumType;
|
|
58098
58127
|
case 2 /* DeclaredType */:
|
|
58099
58128
|
return !!getSymbolLinks(target).declaredType;
|
|
58100
58129
|
case 1 /* ResolvedBaseConstructorType */:
|
|
@@ -58103,13 +58132,13 @@ function createTypeChecker(host) {
|
|
|
58103
58132
|
return !!target.resolvedReturnType;
|
|
58104
58133
|
case 4 /* ImmediateBaseConstraint */:
|
|
58105
58134
|
return !!target.immediateBaseConstraint;
|
|
58106
|
-
case
|
|
58135
|
+
case 5 /* ResolvedTypeArguments */:
|
|
58107
58136
|
return !!target.resolvedTypeArguments;
|
|
58108
|
-
case
|
|
58137
|
+
case 6 /* ResolvedBaseTypes */:
|
|
58109
58138
|
return !!target.baseTypesResolved;
|
|
58110
|
-
case
|
|
58139
|
+
case 7 /* WriteType */:
|
|
58111
58140
|
return !!getSymbolLinks(target).writeType;
|
|
58112
|
-
case
|
|
58141
|
+
case 8 /* ParameterInitializerContainsUndefined */:
|
|
58113
58142
|
return getNodeLinks(target).parameterInitializerContainsUndefined !== void 0;
|
|
58114
58143
|
}
|
|
58115
58144
|
return Debug.assertNever(propertyName);
|
|
@@ -59128,7 +59157,7 @@ function createTypeChecker(host) {
|
|
|
59128
59157
|
function getWriteTypeOfAccessors(symbol) {
|
|
59129
59158
|
const links = getSymbolLinks(symbol);
|
|
59130
59159
|
if (!links.writeType) {
|
|
59131
|
-
if (!pushTypeResolution(symbol,
|
|
59160
|
+
if (!pushTypeResolution(symbol, 7 /* WriteType */)) {
|
|
59132
59161
|
return errorType;
|
|
59133
59162
|
}
|
|
59134
59163
|
const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration);
|
|
@@ -59538,7 +59567,7 @@ function createTypeChecker(host) {
|
|
|
59538
59567
|
}
|
|
59539
59568
|
function getBaseTypes(type) {
|
|
59540
59569
|
if (!type.baseTypesResolved) {
|
|
59541
|
-
if (pushTypeResolution(type,
|
|
59570
|
+
if (pushTypeResolution(type, 6 /* ResolvedBaseTypes */)) {
|
|
59542
59571
|
if (type.objectFlags & 8 /* Tuple */) {
|
|
59543
59572
|
type.resolvedBaseTypes = [getTupleBaseType(type)];
|
|
59544
59573
|
} else if (type.symbol.flags & (32 /* Class */ | 64 /* Interface */)) {
|
|
@@ -62038,14 +62067,10 @@ function createTypeChecker(host) {
|
|
|
62038
62067
|
}
|
|
62039
62068
|
if (type || jsdocPredicate) {
|
|
62040
62069
|
signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
|
|
62041
|
-
} else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType.flags &
|
|
62070
|
+
} else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType.flags & 16 /* Boolean */) && getParameterCount(signature) > 0) {
|
|
62042
62071
|
const { declaration } = signature;
|
|
62043
62072
|
signature.resolvedTypePredicate = noTypePredicate;
|
|
62044
|
-
|
|
62045
|
-
signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
|
|
62046
|
-
} else if (!signature.resolvedReturnType || signature.resolvedReturnType.flags & 49152 /* VoidLike */) {
|
|
62047
|
-
signature.resolvedTypePredicate = getTypeAssertionFromBody(declaration) || noTypePredicate;
|
|
62048
|
-
}
|
|
62073
|
+
signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
|
|
62049
62074
|
} else {
|
|
62050
62075
|
signature.resolvedTypePredicate = noTypePredicate;
|
|
62051
62076
|
}
|
|
@@ -62437,7 +62462,7 @@ function createTypeChecker(host) {
|
|
|
62437
62462
|
function getTypeArguments(type) {
|
|
62438
62463
|
var _a, _b;
|
|
62439
62464
|
if (!type.resolvedTypeArguments) {
|
|
62440
|
-
if (!pushTypeResolution(type,
|
|
62465
|
+
if (!pushTypeResolution(type, 5 /* ResolvedTypeArguments */)) {
|
|
62441
62466
|
return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray;
|
|
62442
62467
|
}
|
|
62443
62468
|
const node = type.node;
|
|
@@ -73636,7 +73661,7 @@ function createTypeChecker(host) {
|
|
|
73636
73661
|
function parameterInitializerContainsUndefined(declaration) {
|
|
73637
73662
|
const links = getNodeLinks(declaration);
|
|
73638
73663
|
if (links.parameterInitializerContainsUndefined === void 0) {
|
|
73639
|
-
if (!pushTypeResolution(declaration,
|
|
73664
|
+
if (!pushTypeResolution(declaration, 8 /* ParameterInitializerContainsUndefined */)) {
|
|
73640
73665
|
reportCircularityError(declaration.symbol);
|
|
73641
73666
|
return true;
|
|
73642
73667
|
}
|
|
@@ -80843,45 +80868,6 @@ function createTypeChecker(host) {
|
|
|
80843
80868
|
const falseSubtype = getFlowTypeOfReference(param.name, initType, trueType2, func, falseCondition);
|
|
80844
80869
|
return falseSubtype.flags & 131072 /* Never */ ? trueType2 : void 0;
|
|
80845
80870
|
}
|
|
80846
|
-
function getTypeAssertionFromBody(func) {
|
|
80847
|
-
switch (func.kind) {
|
|
80848
|
-
case 176 /* Constructor */:
|
|
80849
|
-
case 177 /* GetAccessor */:
|
|
80850
|
-
case 178 /* SetAccessor */:
|
|
80851
|
-
return void 0;
|
|
80852
|
-
}
|
|
80853
|
-
const functionFlags = getFunctionFlags(func);
|
|
80854
|
-
if (functionFlags !== 0 /* Normal */ || !func.body) return void 0;
|
|
80855
|
-
const returnFlowNodes = [];
|
|
80856
|
-
const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
|
|
80857
|
-
if (!returnStatement.flowNode) {
|
|
80858
|
-
return true;
|
|
80859
|
-
}
|
|
80860
|
-
returnFlowNodes.push(returnStatement.flowNode);
|
|
80861
|
-
});
|
|
80862
|
-
if (bailedEarly) return void 0;
|
|
80863
|
-
if (functionHasImplicitReturn(func)) {
|
|
80864
|
-
returnFlowNodes.push(func.endFlowNode);
|
|
80865
|
-
}
|
|
80866
|
-
if (!returnFlowNodes.length) return void 0;
|
|
80867
|
-
return forEach(func.parameters, (param, i) => {
|
|
80868
|
-
const initType = getTypeOfSymbol(param.symbol);
|
|
80869
|
-
if (!initType || !isIdentifier(param.name) || isSymbolAssigned(param.symbol) || isRestParameter(param)) {
|
|
80870
|
-
return;
|
|
80871
|
-
}
|
|
80872
|
-
const typesAtReturn = [];
|
|
80873
|
-
const bailedEarly2 = forEach(returnFlowNodes, (flowNode) => {
|
|
80874
|
-
const type = getFlowTypeOfReference(param.name, initType, initType, func, flowNode);
|
|
80875
|
-
if (type === initType) return true;
|
|
80876
|
-
typesAtReturn.push(type);
|
|
80877
|
-
});
|
|
80878
|
-
if (bailedEarly2) return;
|
|
80879
|
-
const assertedType = getUnionType(typesAtReturn, 2 /* Subtype */);
|
|
80880
|
-
const patchedInitType = mapType(initType, (t) => t.flags & 16384 /* Void */ ? undefinedType : t);
|
|
80881
|
-
if (isTypeAssignableTo(patchedInitType, assertedType)) return;
|
|
80882
|
-
return createTypePredicate(3 /* AssertsIdentifier */, unescapeLeadingUnderscores(param.name.escapedText), i, assertedType);
|
|
80883
|
-
});
|
|
80884
|
-
}
|
|
80885
80871
|
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
|
|
80886
80872
|
addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
|
|
80887
80873
|
return;
|
|
@@ -123084,7 +123070,7 @@ function createModuleResolutionLoader(containingFile, redirectedReference, optio
|
|
|
123084
123070
|
};
|
|
123085
123071
|
}
|
|
123086
123072
|
function getTypeReferenceResolutionName(entry) {
|
|
123087
|
-
return !isString(entry) ?
|
|
123073
|
+
return !isString(entry) ? entry.fileName : entry;
|
|
123088
123074
|
}
|
|
123089
123075
|
var typeReferenceResolutionNameAndModeGetter = {
|
|
123090
123076
|
getName: getTypeReferenceResolutionName,
|
|
@@ -123207,7 +123193,7 @@ function getReferencedFileLocation(program, ref) {
|
|
|
123207
123193
|
break;
|
|
123208
123194
|
case 5 /* TypeReferenceDirective */:
|
|
123209
123195
|
({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]);
|
|
123210
|
-
packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file,
|
|
123196
|
+
packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file, file.typeReferenceDirectives[index].fileName, resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId;
|
|
123211
123197
|
break;
|
|
123212
123198
|
case 7 /* LibReferenceDirective */:
|
|
123213
123199
|
({ pos, end } = file.libReferenceDirectives[index]);
|
|
@@ -125381,7 +125367,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
125381
125367
|
for (let index = 0; index < typeDirectives.length; index++) {
|
|
125382
125368
|
const ref = file.typeReferenceDirectives[index];
|
|
125383
125369
|
const resolvedTypeReferenceDirective = resolutions[index];
|
|
125384
|
-
const fileName =
|
|
125370
|
+
const fileName = ref.fileName;
|
|
125385
125371
|
resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective);
|
|
125386
125372
|
const mode = ref.resolutionMode || getDefaultResolutionModeForFile2(file);
|
|
125387
125373
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index });
|
|
@@ -160204,7 +160190,7 @@ function createSignatureDeclarationFromSignature(kind, context, quotePreference,
|
|
|
160204
160190
|
}
|
|
160205
160191
|
let typeParameters = isJs ? void 0 : signatureDeclaration.typeParameters;
|
|
160206
160192
|
let parameters = signatureDeclaration.parameters;
|
|
160207
|
-
let type = isJs ? void 0 : signatureDeclaration.type;
|
|
160193
|
+
let type = isJs ? void 0 : getSynthesizedDeepClone(signatureDeclaration.type);
|
|
160208
160194
|
if (importAdder) {
|
|
160209
160195
|
if (typeParameters) {
|
|
160210
160196
|
const newTypeParameters = sameMap(typeParameters, (typeParameterDecl) => {
|
|
@@ -177364,7 +177350,6 @@ __export(ts_exports2, {
|
|
|
177364
177350
|
EmitHint: () => EmitHint,
|
|
177365
177351
|
EmitOnly: () => EmitOnly,
|
|
177366
177352
|
EndOfLineState: () => EndOfLineState,
|
|
177367
|
-
EnumKind: () => EnumKind,
|
|
177368
177353
|
ExitStatus: () => ExitStatus,
|
|
177369
177354
|
ExportKind: () => ExportKind,
|
|
177370
177355
|
Extension: () => Extension,
|
|
@@ -179785,6 +179770,7 @@ __export(ts_server_exports3, {
|
|
|
179785
179770
|
CommandNames: () => CommandNames,
|
|
179786
179771
|
ConfigFileDiagEvent: () => ConfigFileDiagEvent,
|
|
179787
179772
|
ConfiguredProject: () => ConfiguredProject2,
|
|
179773
|
+
ConfiguredProjectLoadKind: () => ConfiguredProjectLoadKind,
|
|
179788
179774
|
CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent,
|
|
179789
179775
|
CreateFileWatcherEvent: () => CreateFileWatcherEvent,
|
|
179790
179776
|
Errors: () => Errors,
|
|
@@ -179792,7 +179778,7 @@ __export(ts_server_exports3, {
|
|
|
179792
179778
|
EventEndInstallTypes: () => EventEndInstallTypes,
|
|
179793
179779
|
EventInitializationFailed: () => EventInitializationFailed,
|
|
179794
179780
|
EventTypesRegistry: () => EventTypesRegistry,
|
|
179795
|
-
ExternalProject: () =>
|
|
179781
|
+
ExternalProject: () => ExternalProject,
|
|
179796
179782
|
GcTimer: () => GcTimer,
|
|
179797
179783
|
InferredProject: () => InferredProject2,
|
|
179798
179784
|
LargeFileReferencedEvent: () => LargeFileReferencedEvent,
|
|
@@ -179808,7 +179794,6 @@ __export(ts_server_exports3, {
|
|
|
179808
179794
|
ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent,
|
|
179809
179795
|
ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent,
|
|
179810
179796
|
ProjectLoadingStartEvent: () => ProjectLoadingStartEvent,
|
|
179811
|
-
ProjectReferenceProjectLoadKind: () => ProjectReferenceProjectLoadKind,
|
|
179812
179797
|
ProjectService: () => ProjectService3,
|
|
179813
179798
|
ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent,
|
|
179814
179799
|
ScriptInfo: () => ScriptInfo,
|
|
@@ -179860,7 +179845,6 @@ __export(ts_server_exports3, {
|
|
|
179860
179845
|
nowString: () => nowString,
|
|
179861
179846
|
nullCancellationToken: () => nullCancellationToken,
|
|
179862
179847
|
nullTypingsInstaller: () => nullTypingsInstaller,
|
|
179863
|
-
projectContainsInfoDirectly: () => projectContainsInfoDirectly,
|
|
179864
179848
|
protocol: () => ts_server_protocol_exports,
|
|
179865
179849
|
removeSorted: () => removeSorted,
|
|
179866
179850
|
stringifyIndented: () => stringifyIndented,
|
|
@@ -181038,11 +181022,8 @@ var ScriptInfo = class {
|
|
|
181038
181022
|
case 0:
|
|
181039
181023
|
return Errors.ThrowNoProject();
|
|
181040
181024
|
case 1:
|
|
181041
|
-
return
|
|
181042
|
-
!isProjectDeferredClose(this.containingProjects[0]) ? this.containingProjects[0] : void 0
|
|
181043
|
-
);
|
|
181025
|
+
return isProjectDeferredClose(this.containingProjects[0]) || isBackgroundProject(this.containingProjects[0]) ? Errors.ThrowNoProject() : this.containingProjects[0];
|
|
181044
181026
|
default:
|
|
181045
|
-
let firstExternalProject;
|
|
181046
181027
|
let firstConfiguredProject;
|
|
181047
181028
|
let firstInferredProject;
|
|
181048
181029
|
let firstNonSourceOfProjectReferenceRedirect;
|
|
@@ -181059,15 +181040,13 @@ var ScriptInfo = class {
|
|
|
181059
181040
|
if (!firstNonSourceOfProjectReferenceRedirect) firstNonSourceOfProjectReferenceRedirect = project;
|
|
181060
181041
|
}
|
|
181061
181042
|
if (!firstConfiguredProject) firstConfiguredProject = project;
|
|
181062
|
-
} else if (
|
|
181063
|
-
|
|
181043
|
+
} else if (isExternalProject(project)) {
|
|
181044
|
+
return project;
|
|
181064
181045
|
} else if (!firstInferredProject && isInferredProject(project)) {
|
|
181065
181046
|
firstInferredProject = project;
|
|
181066
181047
|
}
|
|
181067
181048
|
}
|
|
181068
|
-
return
|
|
181069
|
-
defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstExternalProject || firstInferredProject
|
|
181070
|
-
);
|
|
181049
|
+
return (defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstInferredProject) ?? Errors.ThrowNoProject();
|
|
181071
181050
|
}
|
|
181072
181051
|
}
|
|
181073
181052
|
registerFileUpdate() {
|
|
@@ -181157,12 +181136,6 @@ var ScriptInfo = class {
|
|
|
181157
181136
|
}
|
|
181158
181137
|
}
|
|
181159
181138
|
};
|
|
181160
|
-
function ensurePrimaryProjectKind(project) {
|
|
181161
|
-
if (!project || isBackgroundProject(project)) {
|
|
181162
|
-
return Errors.ThrowNoProject();
|
|
181163
|
-
}
|
|
181164
|
-
return project;
|
|
181165
|
-
}
|
|
181166
181139
|
function failIfInvalidPosition(position) {
|
|
181167
181140
|
Debug.assert(typeof position === "number", `Expected position ${position} to be a number.`);
|
|
181168
181141
|
Debug.assert(position >= 0, `Expected position to be non-negative.`);
|
|
@@ -182913,7 +182886,7 @@ var Project3 = class _Project {
|
|
|
182913
182886
|
isDefaultProjectForOpenFiles() {
|
|
182914
182887
|
return !!forEachEntry(
|
|
182915
182888
|
this.projectService.openFiles,
|
|
182916
|
-
(
|
|
182889
|
+
(_projectRootPath, path) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path)) === this
|
|
182917
182890
|
);
|
|
182918
182891
|
}
|
|
182919
182892
|
/** @internal */
|
|
@@ -183052,7 +183025,7 @@ var InferredProject2 = class extends Project3 {
|
|
|
183052
183025
|
super.addRoot(info);
|
|
183053
183026
|
}
|
|
183054
183027
|
removeRoot(info) {
|
|
183055
|
-
this.projectService.
|
|
183028
|
+
this.projectService.stopWatchingConfigFilesForScriptInfo(info);
|
|
183056
183029
|
super.removeRoot(info);
|
|
183057
183030
|
if (!this.isOrphan() && this._isJsInferredProject && info.isJavaScript()) {
|
|
183058
183031
|
if (every(this.getRootScriptInfos(), (rootInfo) => !rootInfo.isJavaScript())) {
|
|
@@ -183071,7 +183044,7 @@ var InferredProject2 = class extends Project3 {
|
|
|
183071
183044
|
return !this.projectRootPath && !this.projectService.useSingleInferredProject || this.getRootScriptInfos().length === 1;
|
|
183072
183045
|
}
|
|
183073
183046
|
close() {
|
|
183074
|
-
forEach(this.getRootScriptInfos(), (info) => this.projectService.
|
|
183047
|
+
forEach(this.getRootScriptInfos(), (info) => this.projectService.stopWatchingConfigFilesForScriptInfo(info));
|
|
183075
183048
|
super.close();
|
|
183076
183049
|
}
|
|
183077
183050
|
getTypeAcquisition() {
|
|
@@ -183403,8 +183376,6 @@ var ConfiguredProject2 = class extends Project3 {
|
|
|
183403
183376
|
this.openFileWatchTriggered = /* @__PURE__ */ new Map();
|
|
183404
183377
|
/** @internal */
|
|
183405
183378
|
this.canConfigFileJsonReportNoInputFiles = false;
|
|
183406
|
-
/** Ref count to the project when opened from external project */
|
|
183407
|
-
this.externalProjectRefCount = 0;
|
|
183408
183379
|
/** @internal */
|
|
183409
183380
|
this.isInitialLoadPending = returnTrue;
|
|
183410
183381
|
/** @internal */
|
|
@@ -183466,13 +183437,7 @@ var ConfiguredProject2 = class extends Project3 {
|
|
|
183466
183437
|
case 2 /* Full */:
|
|
183467
183438
|
this.openFileWatchTriggered.clear();
|
|
183468
183439
|
const reason = Debug.checkDefined(this.pendingUpdateReason);
|
|
183469
|
-
this.
|
|
183470
|
-
this.projectService.reloadConfiguredProject(
|
|
183471
|
-
this,
|
|
183472
|
-
reason,
|
|
183473
|
-
/*clearSemanticCache*/
|
|
183474
|
-
false
|
|
183475
|
-
);
|
|
183440
|
+
this.projectService.reloadConfiguredProject(this, reason);
|
|
183476
183441
|
result = true;
|
|
183477
183442
|
break;
|
|
183478
183443
|
default:
|
|
@@ -183576,69 +183541,13 @@ var ConfiguredProject2 = class extends Project3 {
|
|
|
183576
183541
|
super.markAsDirty();
|
|
183577
183542
|
}
|
|
183578
183543
|
/** @internal */
|
|
183579
|
-
addExternalProjectReference() {
|
|
183580
|
-
this.externalProjectRefCount++;
|
|
183581
|
-
}
|
|
183582
|
-
/** @internal */
|
|
183583
|
-
deleteExternalProjectReference() {
|
|
183584
|
-
this.externalProjectRefCount--;
|
|
183585
|
-
}
|
|
183586
|
-
/** @internal */
|
|
183587
183544
|
isSolution() {
|
|
183588
183545
|
return this.getRootFilesMap().size === 0 && !this.canConfigFileJsonReportNoInputFiles;
|
|
183589
183546
|
}
|
|
183590
|
-
/**
|
|
183591
|
-
* Find the configured project from the project references in project which contains the info directly
|
|
183592
|
-
*
|
|
183593
|
-
* @internal
|
|
183594
|
-
*/
|
|
183595
|
-
getDefaultChildProjectFromProjectWithReferences(info) {
|
|
183596
|
-
return forEachResolvedProjectReferenceProject(
|
|
183597
|
-
this,
|
|
183598
|
-
info.path,
|
|
183599
|
-
(child) => projectContainsInfoDirectly(child, info) ? child : void 0,
|
|
183600
|
-
0 /* Find */
|
|
183601
|
-
);
|
|
183602
|
-
}
|
|
183603
|
-
/**
|
|
183604
|
-
* Returns true if the project is needed by any of the open script info/external project
|
|
183605
|
-
*
|
|
183606
|
-
* @internal
|
|
183607
|
-
*/
|
|
183608
|
-
hasOpenRef() {
|
|
183609
|
-
var _a, _b;
|
|
183610
|
-
if (!!this.externalProjectRefCount) {
|
|
183611
|
-
return true;
|
|
183612
|
-
}
|
|
183613
|
-
if (this.isClosed()) {
|
|
183614
|
-
return false;
|
|
183615
|
-
}
|
|
183616
|
-
const configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(this.canonicalConfigFilePath);
|
|
183617
|
-
if (this.deferredClose) return !!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.size);
|
|
183618
|
-
if (this.projectService.hasPendingProjectUpdate(this)) {
|
|
183619
|
-
return !!((_b = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _b.size);
|
|
183620
|
-
}
|
|
183621
|
-
return !!configFileExistenceInfo.openFilesImpactedByConfigFile && forEachEntry(
|
|
183622
|
-
configFileExistenceInfo.openFilesImpactedByConfigFile,
|
|
183623
|
-
(_value, infoPath) => {
|
|
183624
|
-
const info = this.projectService.getScriptInfoForPath(infoPath);
|
|
183625
|
-
return this.containsScriptInfo(info) || !!forEachResolvedProjectReferenceProject(
|
|
183626
|
-
this,
|
|
183627
|
-
info.path,
|
|
183628
|
-
(child) => child.containsScriptInfo(info),
|
|
183629
|
-
0 /* Find */
|
|
183630
|
-
);
|
|
183631
|
-
}
|
|
183632
|
-
) || false;
|
|
183633
|
-
}
|
|
183634
183547
|
/** @internal */
|
|
183635
183548
|
isOrphan() {
|
|
183636
183549
|
return !!this.deferredClose;
|
|
183637
183550
|
}
|
|
183638
|
-
/** @internal */
|
|
183639
|
-
hasExternalProjectRef() {
|
|
183640
|
-
return !!this.externalProjectRefCount;
|
|
183641
|
-
}
|
|
183642
183551
|
getEffectiveTypeRoots() {
|
|
183643
183552
|
return getEffectiveTypeRoots(this.getCompilationSettings(), this) || [];
|
|
183644
183553
|
}
|
|
@@ -183647,7 +183556,7 @@ var ConfiguredProject2 = class extends Project3 {
|
|
|
183647
183556
|
updateErrorForNoInputFiles(fileNames, this.getConfigFilePath(), this.getCompilerOptions().configFile.configFileSpecs, this.projectErrors, this.canConfigFileJsonReportNoInputFiles);
|
|
183648
183557
|
}
|
|
183649
183558
|
};
|
|
183650
|
-
var
|
|
183559
|
+
var ExternalProject = class extends Project3 {
|
|
183651
183560
|
/** @internal */
|
|
183652
183561
|
constructor(externalProjectName, projectService, documentRegistry, compilerOptions, lastFileExceededProgramSize, compileOnSaveEnabled, projectFilePath, watchOptions) {
|
|
183653
183562
|
super(
|
|
@@ -183855,59 +183764,115 @@ function findProjectByName(projectName, projects) {
|
|
|
183855
183764
|
}
|
|
183856
183765
|
}
|
|
183857
183766
|
var noopConfigFileWatcher = { close: noop };
|
|
183767
|
+
function getConfigFileNameFromCache(info, cache) {
|
|
183768
|
+
if (!cache || isAncestorConfigFileInfo(info)) return void 0;
|
|
183769
|
+
return cache.get(info.path);
|
|
183770
|
+
}
|
|
183858
183771
|
function isOpenScriptInfo(infoOrFileNameOrConfig) {
|
|
183859
183772
|
return !!infoOrFileNameOrConfig.containingProjects;
|
|
183860
183773
|
}
|
|
183861
183774
|
function isAncestorConfigFileInfo(infoOrFileNameOrConfig) {
|
|
183862
183775
|
return !!infoOrFileNameOrConfig.configFileInfo;
|
|
183863
183776
|
}
|
|
183864
|
-
var
|
|
183865
|
-
|
|
183866
|
-
|
|
183867
|
-
|
|
183868
|
-
|
|
183869
|
-
|
|
183777
|
+
var ConfiguredProjectLoadKind = /* @__PURE__ */ ((ConfiguredProjectLoadKind2) => {
|
|
183778
|
+
ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Find"] = 0] = "Find";
|
|
183779
|
+
ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Create"] = 1] = "Create";
|
|
183780
|
+
ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Reload"] = 2] = "Reload";
|
|
183781
|
+
return ConfiguredProjectLoadKind2;
|
|
183782
|
+
})(ConfiguredProjectLoadKind || {});
|
|
183783
|
+
function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, delayReloadedConfiguredProjects) {
|
|
183784
|
+
while (true) {
|
|
183785
|
+
if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project.getCompilerOptions().disableSolutionSearching)) return;
|
|
183786
|
+
const configFileName = project.projectService.getConfigFileNameForFile({
|
|
183787
|
+
fileName: project.getConfigFilePath(),
|
|
183788
|
+
path: info.path,
|
|
183789
|
+
configFileInfo: true
|
|
183790
|
+
}, kind === 0 /* Find */);
|
|
183791
|
+
if (!configFileName) return;
|
|
183792
|
+
const ancestor = project.projectService.findCreateOrReloadConfiguredProject(
|
|
183793
|
+
configFileName,
|
|
183794
|
+
kind,
|
|
183795
|
+
reason,
|
|
183796
|
+
allowDeferredClosed,
|
|
183797
|
+
/*triggerFile*/
|
|
183798
|
+
void 0,
|
|
183799
|
+
reloadedProjects,
|
|
183800
|
+
/*delayLoad*/
|
|
183801
|
+
true,
|
|
183802
|
+
delayReloadedConfiguredProjects
|
|
183803
|
+
);
|
|
183804
|
+
if (!ancestor) return;
|
|
183805
|
+
if (ancestor.project.isInitialLoadPending() && project.getCompilerOptions().composite) {
|
|
183806
|
+
ancestor.project.setPotentialProjectReference(project.canonicalConfigFilePath);
|
|
183807
|
+
}
|
|
183808
|
+
const result = cb(ancestor.project);
|
|
183809
|
+
if (result) return result;
|
|
183810
|
+
project = ancestor.project;
|
|
183811
|
+
}
|
|
183812
|
+
}
|
|
183813
|
+
function forEachResolvedProjectReferenceProject(project, fileName, cb, kind, reason, allowDeferredClosed, triggerFile, reloadedProjects) {
|
|
183870
183814
|
var _a;
|
|
183871
183815
|
const resolvedRefs = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences();
|
|
183872
183816
|
if (!resolvedRefs) return void 0;
|
|
183873
|
-
let seenResolvedRefs;
|
|
183874
183817
|
const possibleDefaultRef = fileName ? project.getResolvedProjectReferenceToRedirect(fileName) : void 0;
|
|
183875
183818
|
if (possibleDefaultRef) {
|
|
183876
183819
|
const configFileName = toNormalizedPath(possibleDefaultRef.sourceFile.fileName);
|
|
183877
|
-
const child = project.projectService.findConfiguredProjectByProjectName(
|
|
183820
|
+
const child = project.projectService.findConfiguredProjectByProjectName(
|
|
183821
|
+
configFileName,
|
|
183822
|
+
allowDeferredClosed
|
|
183823
|
+
);
|
|
183878
183824
|
if (child) {
|
|
183879
|
-
const result =
|
|
183825
|
+
const result = callbackWithProjectFoundUsingFind(child);
|
|
183880
183826
|
if (result) return result;
|
|
183881
|
-
} else if (
|
|
183882
|
-
seenResolvedRefs = /* @__PURE__ */ new Map();
|
|
183827
|
+
} else if (kind !== 0 /* Find */) {
|
|
183883
183828
|
const result = forEachResolvedProjectReferenceProjectWorker(
|
|
183884
183829
|
resolvedRefs,
|
|
183885
183830
|
project.getCompilerOptions(),
|
|
183886
183831
|
(ref, loadKind) => possibleDefaultRef === ref ? callback(ref, loadKind) : void 0,
|
|
183887
|
-
|
|
183888
|
-
project.projectService
|
|
183889
|
-
seenResolvedRefs
|
|
183832
|
+
kind,
|
|
183833
|
+
project.projectService
|
|
183890
183834
|
);
|
|
183891
183835
|
if (result) return result;
|
|
183892
|
-
seenResolvedRefs.clear();
|
|
183893
183836
|
}
|
|
183894
183837
|
}
|
|
183895
183838
|
return forEachResolvedProjectReferenceProjectWorker(
|
|
183896
183839
|
resolvedRefs,
|
|
183897
183840
|
project.getCompilerOptions(),
|
|
183898
183841
|
(ref, loadKind) => possibleDefaultRef !== ref ? callback(ref, loadKind) : void 0,
|
|
183899
|
-
|
|
183900
|
-
project.projectService
|
|
183901
|
-
seenResolvedRefs
|
|
183842
|
+
kind,
|
|
183843
|
+
project.projectService
|
|
183902
183844
|
);
|
|
183903
183845
|
function callback(ref, loadKind) {
|
|
183904
|
-
const
|
|
183905
|
-
|
|
183906
|
-
|
|
183846
|
+
const result = project.projectService.findCreateOrReloadConfiguredProject(
|
|
183847
|
+
toNormalizedPath(ref.sourceFile.fileName),
|
|
183848
|
+
loadKind,
|
|
183849
|
+
reason,
|
|
183850
|
+
allowDeferredClosed,
|
|
183851
|
+
triggerFile,
|
|
183852
|
+
reloadedProjects
|
|
183853
|
+
);
|
|
183854
|
+
return result && (loadKind === kind ? cb(result.project, result.sentConfigFileDiag) : callbackWithProjectFoundUsingFind(result.project));
|
|
183855
|
+
}
|
|
183856
|
+
function callbackWithProjectFoundUsingFind(child) {
|
|
183857
|
+
let sentConfigFileDiag = false;
|
|
183858
|
+
switch (kind) {
|
|
183859
|
+
case 1 /* Create */:
|
|
183860
|
+
sentConfigFileDiag = updateConfiguredProject(child, triggerFile);
|
|
183861
|
+
break;
|
|
183862
|
+
case 2 /* Reload */:
|
|
183863
|
+
sentConfigFileDiag = child.projectService.reloadConfiguredProjectClearingSemanticCache(child, reason, reloadedProjects);
|
|
183864
|
+
break;
|
|
183865
|
+
case 0 /* Find */:
|
|
183866
|
+
break;
|
|
183867
|
+
default:
|
|
183868
|
+
Debug.assertNever(kind);
|
|
183869
|
+
}
|
|
183870
|
+
const result = cb(child, sentConfigFileDiag);
|
|
183871
|
+
if (result) return result;
|
|
183907
183872
|
}
|
|
183908
183873
|
}
|
|
183909
|
-
function forEachResolvedProjectReferenceProjectWorker(resolvedProjectReferences, parentOptions, cb,
|
|
183910
|
-
const loadKind = parentOptions.disableReferencedProjectLoad ? 0 /* Find */ :
|
|
183874
|
+
function forEachResolvedProjectReferenceProjectWorker(resolvedProjectReferences, parentOptions, cb, kind, projectService, seenResolvedRefs) {
|
|
183875
|
+
const loadKind = parentOptions.disableReferencedProjectLoad ? 0 /* Find */ : kind;
|
|
183911
183876
|
return forEach(resolvedProjectReferences, (ref) => {
|
|
183912
183877
|
if (!ref) return void 0;
|
|
183913
183878
|
const configFileName = toNormalizedPath(ref.sourceFile.fileName);
|
|
@@ -183948,9 +183913,6 @@ function getDetailWatchInfo(watchType, project) {
|
|
|
183948
183913
|
function isScriptInfoWatchedFromNodeModules(info) {
|
|
183949
183914
|
return !info.isScriptOpen() && info.mTime !== void 0;
|
|
183950
183915
|
}
|
|
183951
|
-
function projectContainsInfoDirectly(project, info) {
|
|
183952
|
-
return project.containsScriptInfo(info) && !project.isSourceOfProjectReferenceRedirect(info.path);
|
|
183953
|
-
}
|
|
183954
183916
|
function updateProjectIfDirty(project) {
|
|
183955
183917
|
project.invalidateResolutionsOfFailedLookupLocations();
|
|
183956
183918
|
return project.dirty && !project.updateGraph();
|
|
@@ -183968,6 +183930,25 @@ function updateWithTriggerFile(project, triggerFile, isReload) {
|
|
|
183968
183930
|
project.triggerFileForConfigFileDiag = void 0;
|
|
183969
183931
|
return sent;
|
|
183970
183932
|
}
|
|
183933
|
+
function updateConfiguredProject(project, triggerFile) {
|
|
183934
|
+
if (triggerFile) {
|
|
183935
|
+
if (updateWithTriggerFile(
|
|
183936
|
+
project,
|
|
183937
|
+
triggerFile,
|
|
183938
|
+
/*isReload*/
|
|
183939
|
+
false
|
|
183940
|
+
)) return true;
|
|
183941
|
+
} else {
|
|
183942
|
+
updateProjectIfDirty(project);
|
|
183943
|
+
}
|
|
183944
|
+
return false;
|
|
183945
|
+
}
|
|
183946
|
+
function fileOpenReason(info) {
|
|
183947
|
+
return `Creating possible configured project for ${info.fileName} to open`;
|
|
183948
|
+
}
|
|
183949
|
+
function reloadReason(reason) {
|
|
183950
|
+
return `User requested reload projects: ${reason}`;
|
|
183951
|
+
}
|
|
183971
183952
|
function setProjectOptionsUsed(project) {
|
|
183972
183953
|
if (isConfiguredProject(project)) {
|
|
183973
183954
|
project.projectOptions = true;
|
|
@@ -184107,8 +184088,10 @@ var _ProjectService = class _ProjectService {
|
|
|
184107
184088
|
* Open files: with value being project root path, and key being Path of the file that is open
|
|
184108
184089
|
*/
|
|
184109
184090
|
this.openFiles = /* @__PURE__ */ new Map();
|
|
184110
|
-
/**
|
|
184091
|
+
/** Config files looked up and cached config files for open script info */
|
|
184111
184092
|
this.configFileForOpenFiles = /* @__PURE__ */ new Map();
|
|
184093
|
+
/** Set of open script infos that are root of inferred project */
|
|
184094
|
+
this.rootOfInferredProjects = /* @__PURE__ */ new Set();
|
|
184112
184095
|
/**
|
|
184113
184096
|
* Map of open files that are opened without complete path but have projectRoot as current directory
|
|
184114
184097
|
*/
|
|
@@ -184462,9 +184445,28 @@ var _ProjectService = class _ProjectService {
|
|
|
184462
184445
|
const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo;
|
|
184463
184446
|
return scriptInfo && !scriptInfo.isOrphan() ? scriptInfo.getDefaultProject() : void 0;
|
|
184464
184447
|
}
|
|
184448
|
+
/**
|
|
184449
|
+
* If there is default project calculation pending for this file,
|
|
184450
|
+
* then it completes that calculation so that correct default project is used for the project
|
|
184451
|
+
*/
|
|
184452
|
+
tryGetDefaultProjectForEnsuringConfiguredProjectForFile(fileNameOrScriptInfo) {
|
|
184453
|
+
var _a;
|
|
184454
|
+
const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo;
|
|
184455
|
+
if (!scriptInfo) return void 0;
|
|
184456
|
+
if ((_a = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a.delete(scriptInfo.path)) {
|
|
184457
|
+
this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
184458
|
+
scriptInfo,
|
|
184459
|
+
1 /* Create */
|
|
184460
|
+
);
|
|
184461
|
+
if (scriptInfo.isOrphan()) {
|
|
184462
|
+
this.assignOrphanScriptInfoToInferredProject(scriptInfo, this.openFiles.get(scriptInfo.path));
|
|
184463
|
+
}
|
|
184464
|
+
}
|
|
184465
|
+
return this.tryGetDefaultProjectForFile(scriptInfo);
|
|
184466
|
+
}
|
|
184465
184467
|
/** @internal */
|
|
184466
184468
|
ensureDefaultProjectForFile(fileNameOrScriptInfo) {
|
|
184467
|
-
return this.
|
|
184469
|
+
return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(fileNameOrScriptInfo) || this.doEnsureDefaultProjectForFile(fileNameOrScriptInfo);
|
|
184468
184470
|
}
|
|
184469
184471
|
doEnsureDefaultProjectForFile(fileNameOrScriptInfo) {
|
|
184470
184472
|
this.ensureProjectStructuresUptoDate();
|
|
@@ -184685,7 +184687,7 @@ var _ProjectService = class _ProjectService {
|
|
|
184685
184687
|
return scheduledAnyProjectUpdate;
|
|
184686
184688
|
}
|
|
184687
184689
|
/** @internal */
|
|
184688
|
-
onConfigFileChanged(canonicalConfigFilePath, eventKind) {
|
|
184690
|
+
onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind) {
|
|
184689
184691
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
184690
184692
|
const project = this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath);
|
|
184691
184693
|
const wasDefferedClose = project == null ? void 0 : project.deferredClose;
|
|
@@ -184699,44 +184701,35 @@ var _ProjectService = class _ProjectService {
|
|
|
184699
184701
|
project.markAsDirty();
|
|
184700
184702
|
}
|
|
184701
184703
|
}
|
|
184702
|
-
this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(
|
|
184703
|
-
|
|
184704
|
-
configFileExistenceInfo,
|
|
184705
|
-
!wasDefferedClose && eventKind !== 2 /* Deleted */ ? identity : (
|
|
184706
|
-
// Reload open files if they are root of inferred project
|
|
184707
|
-
returnTrue
|
|
184708
|
-
),
|
|
184709
|
-
// Reload all the open files impacted by config file
|
|
184704
|
+
this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(
|
|
184705
|
+
canonicalConfigFilePath,
|
|
184710
184706
|
"Change in config file detected"
|
|
184711
184707
|
);
|
|
184712
|
-
|
|
184713
|
-
|
|
184714
|
-
|
|
184715
|
-
|
|
184716
|
-
|
|
184717
|
-
* If there is no existing project it just opens the configured project for the config file
|
|
184718
|
-
* shouldReloadProjectFor provides a way to filter out files to reload configured project for
|
|
184719
|
-
*/
|
|
184720
|
-
delayReloadConfiguredProjectsForFile(configFileExistenceInfo, shouldReloadProjectFor, reason) {
|
|
184721
|
-
var _a;
|
|
184722
|
-
const updatedProjects = /* @__PURE__ */ new Set();
|
|
184723
|
-
(_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.forEach((infoIsRootOfInferredProject, path) => {
|
|
184708
|
+
const updatedProjects = new Set(project ? [project] : void 0);
|
|
184709
|
+
this.openFiles.forEach((_projectRootPath, path) => {
|
|
184710
|
+
var _a, _b;
|
|
184711
|
+
const configFileForOpenFile = this.configFileForOpenFiles.get(path);
|
|
184712
|
+
if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path))) return;
|
|
184724
184713
|
this.configFileForOpenFiles.delete(path);
|
|
184725
|
-
if (!shouldReloadProjectFor(infoIsRootOfInferredProject)) {
|
|
184726
|
-
return;
|
|
184727
|
-
}
|
|
184728
184714
|
const info = this.getScriptInfoForPath(path);
|
|
184729
|
-
|
|
184730
|
-
|
|
184731
|
-
|
|
184732
|
-
|
|
184733
|
-
|
|
184734
|
-
|
|
184735
|
-
|
|
184736
|
-
|
|
184737
|
-
}
|
|
184715
|
+
const newConfigFileNameForInfo = this.getConfigFileNameForFile(
|
|
184716
|
+
info,
|
|
184717
|
+
/*findFromCacheOnly*/
|
|
184718
|
+
false
|
|
184719
|
+
);
|
|
184720
|
+
if (!newConfigFileNameForInfo) return;
|
|
184721
|
+
const projectForInfo = this.findConfiguredProjectByProjectName(newConfigFileNameForInfo) ?? this.createConfiguredProject(
|
|
184722
|
+
newConfigFileNameForInfo,
|
|
184723
|
+
`Change in config file ${configFileName} detected, ${fileOpenReason(info)}`
|
|
184724
|
+
);
|
|
184725
|
+
if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path))) {
|
|
184726
|
+
(this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path, configFileForOpenFile);
|
|
184727
|
+
}
|
|
184728
|
+
if (tryAddToSet(updatedProjects, projectForInfo) && projectForInfo.isInitialLoadPending()) {
|
|
184729
|
+
this.delayUpdateProjectGraph(projectForInfo);
|
|
184738
184730
|
}
|
|
184739
184731
|
});
|
|
184732
|
+
this.delayEnsureProjectForOpenFiles();
|
|
184740
184733
|
}
|
|
184741
184734
|
removeProject(project) {
|
|
184742
184735
|
this.logger.info("`remove Project::");
|
|
@@ -184837,9 +184830,10 @@ var _ProjectService = class _ProjectService {
|
|
|
184837
184830
|
* @param info The file that has been closed or newly configured
|
|
184838
184831
|
*/
|
|
184839
184832
|
closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) {
|
|
184833
|
+
var _a;
|
|
184840
184834
|
const fileExists = info.isDynamic ? false : this.host.fileExists(info.fileName);
|
|
184841
184835
|
info.close(fileExists);
|
|
184842
|
-
this.
|
|
184836
|
+
this.stopWatchingConfigFilesForScriptInfo(info);
|
|
184843
184837
|
const canonicalFileName = this.toCanonicalFileName(info.fileName);
|
|
184844
184838
|
if (this.openFilesWithNonRootedDiskPath.get(canonicalFileName) === info) {
|
|
184845
184839
|
this.openFilesWithNonRootedDiskPath.delete(canonicalFileName);
|
|
@@ -184875,6 +184869,8 @@ var _ProjectService = class _ProjectService {
|
|
|
184875
184869
|
}
|
|
184876
184870
|
this.openFiles.delete(info.path);
|
|
184877
184871
|
this.configFileForOpenFiles.delete(info.path);
|
|
184872
|
+
(_a = this.pendingOpenFileProjectUpdates) == null ? void 0 : _a.delete(info.path);
|
|
184873
|
+
Debug.assert(!this.rootOfInferredProjects.has(info));
|
|
184878
184874
|
if (!skipAssignOrphanScriptInfosToInferredProject && ensureProjectsForOpenFiles) {
|
|
184879
184875
|
this.assignOrphanScriptInfosToInferredProject();
|
|
184880
184876
|
}
|
|
@@ -184901,21 +184897,15 @@ var _ProjectService = class _ProjectService {
|
|
|
184901
184897
|
info.closeSourceMapFileWatcher();
|
|
184902
184898
|
}
|
|
184903
184899
|
configFileExists(configFileName, canonicalConfigFilePath, info) {
|
|
184904
|
-
|
|
184905
|
-
let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
184906
|
-
if (configFileExistenceInfo) {
|
|
184907
|
-
if (isOpenScriptInfo(info) && !((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path))) {
|
|
184908
|
-
(configFileExistenceInfo.openFilesImpactedByConfigFile || (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, false);
|
|
184909
|
-
}
|
|
184910
|
-
return configFileExistenceInfo.exists;
|
|
184911
|
-
}
|
|
184912
|
-
const exists = this.host.fileExists(configFileName);
|
|
184900
|
+
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
184913
184901
|
let openFilesImpactedByConfigFile;
|
|
184914
|
-
if (
|
|
184915
|
-
(openFilesImpactedByConfigFile
|
|
184902
|
+
if (this.openFiles.has(info.path) && !isAncestorConfigFileInfo(info)) {
|
|
184903
|
+
if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);
|
|
184904
|
+
else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path);
|
|
184916
184905
|
}
|
|
184917
|
-
configFileExistenceInfo
|
|
184918
|
-
this.
|
|
184906
|
+
if (configFileExistenceInfo) return configFileExistenceInfo.exists;
|
|
184907
|
+
const exists = this.host.fileExists(configFileName);
|
|
184908
|
+
this.configFileExistenceInfoCache.set(canonicalConfigFilePath, { exists, openFilesImpactedByConfigFile });
|
|
184919
184909
|
return exists;
|
|
184920
184910
|
}
|
|
184921
184911
|
/** @internal */
|
|
@@ -184925,7 +184915,7 @@ var _ProjectService = class _ProjectService {
|
|
|
184925
184915
|
if (!configFileExistenceInfo.watcher || configFileExistenceInfo.watcher === noopConfigFileWatcher) {
|
|
184926
184916
|
configFileExistenceInfo.watcher = this.watchFactory.watchFile(
|
|
184927
184917
|
configFileName,
|
|
184928
|
-
(_fileName, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind),
|
|
184918
|
+
(_fileName, eventKind) => this.onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind),
|
|
184929
184919
|
2e3 /* High */,
|
|
184930
184920
|
this.getWatchOptionsFromProjectWatchOptions((_b = (_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.parsedCommandLine) == null ? void 0 : _b.watchOptions, getDirectoryPath(configFileName)),
|
|
184931
184921
|
WatchType.ConfigFile,
|
|
@@ -184935,12 +184925,6 @@ var _ProjectService = class _ProjectService {
|
|
|
184935
184925
|
const projects = configFileExistenceInfo.config.projects;
|
|
184936
184926
|
projects.set(forProject.canonicalConfigFilePath, projects.get(forProject.canonicalConfigFilePath) || false);
|
|
184937
184927
|
}
|
|
184938
|
-
/**
|
|
184939
|
-
* Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project
|
|
184940
|
-
*/
|
|
184941
|
-
configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo) {
|
|
184942
|
-
return configFileExistenceInfo.openFilesImpactedByConfigFile && forEachEntry(configFileExistenceInfo.openFilesImpactedByConfigFile, identity);
|
|
184943
|
-
}
|
|
184944
184928
|
/** @internal */
|
|
184945
184929
|
releaseParsedConfig(canonicalConfigFilePath, forProject) {
|
|
184946
184930
|
var _a, _b, _c;
|
|
@@ -184951,7 +184935,7 @@ var _ProjectService = class _ProjectService {
|
|
|
184951
184935
|
clearSharedExtendedConfigFileWatcher(canonicalConfigFilePath, this.sharedExtendedConfigFileWatchers);
|
|
184952
184936
|
Debug.checkDefined(configFileExistenceInfo.watcher);
|
|
184953
184937
|
if ((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) {
|
|
184954
|
-
if (
|
|
184938
|
+
if (configFileExistenceInfo.inferredProjectRoots) {
|
|
184955
184939
|
if (!canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath)))) {
|
|
184956
184940
|
configFileExistenceInfo.watcher.close();
|
|
184957
184941
|
configFileExistenceInfo.watcher = noopConfigFileWatcher;
|
|
@@ -184966,36 +184950,35 @@ var _ProjectService = class _ProjectService {
|
|
|
184966
184950
|
}
|
|
184967
184951
|
}
|
|
184968
184952
|
/**
|
|
184969
|
-
*
|
|
184970
|
-
*
|
|
184971
|
-
*
|
|
184953
|
+
* This is called on file close or when its removed from inferred project as root,
|
|
184954
|
+
* so that we handle the watches and inferred project root data
|
|
184972
184955
|
* @internal
|
|
184973
184956
|
*/
|
|
184974
|
-
|
|
184975
|
-
if (
|
|
184976
|
-
|
|
184977
|
-
|
|
184978
|
-
|
|
184979
|
-
}
|
|
184980
|
-
/**
|
|
184981
|
-
* This is called on file close, so that we stop watching the config file for this script info
|
|
184982
|
-
*/
|
|
184983
|
-
stopWatchingConfigFilesForClosedScriptInfo(info) {
|
|
184984
|
-
Debug.assert(!info.isScriptOpen());
|
|
184957
|
+
stopWatchingConfigFilesForScriptInfo(info) {
|
|
184958
|
+
if (this.serverMode !== 0 /* Semantic */) return;
|
|
184959
|
+
const isRootOfInferredProject = this.rootOfInferredProjects.delete(info);
|
|
184960
|
+
const isOpen = info.isScriptOpen();
|
|
184961
|
+
if (isOpen && !isRootOfInferredProject) return;
|
|
184985
184962
|
this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => {
|
|
184986
184963
|
var _a, _b, _c;
|
|
184987
184964
|
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
184988
|
-
if (configFileExistenceInfo)
|
|
184989
|
-
|
|
184990
|
-
(
|
|
184991
|
-
|
|
184992
|
-
|
|
184993
|
-
|
|
184994
|
-
|
|
184995
|
-
|
|
184996
|
-
|
|
184965
|
+
if (!configFileExistenceInfo) return;
|
|
184966
|
+
if (isOpen) {
|
|
184967
|
+
if (!((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path))) return;
|
|
184968
|
+
} else {
|
|
184969
|
+
if (!((_b = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _b.delete(info.path))) return;
|
|
184970
|
+
}
|
|
184971
|
+
if (isRootOfInferredProject) {
|
|
184972
|
+
configFileExistenceInfo.inferredProjectRoots--;
|
|
184973
|
+
if (configFileExistenceInfo.watcher && !configFileExistenceInfo.config && !configFileExistenceInfo.inferredProjectRoots) {
|
|
184974
|
+
configFileExistenceInfo.watcher.close();
|
|
184975
|
+
configFileExistenceInfo.watcher = void 0;
|
|
184997
184976
|
}
|
|
184998
184977
|
}
|
|
184978
|
+
if (!((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) && !configFileExistenceInfo.config) {
|
|
184979
|
+
Debug.assert(!configFileExistenceInfo.watcher);
|
|
184980
|
+
this.configFileExistenceInfoCache.delete(canonicalConfigFilePath);
|
|
184981
|
+
}
|
|
184999
184982
|
});
|
|
185000
184983
|
}
|
|
185001
184984
|
/**
|
|
@@ -185004,39 +184987,27 @@ var _ProjectService = class _ProjectService {
|
|
|
185004
184987
|
* @internal
|
|
185005
184988
|
*/
|
|
185006
184989
|
startWatchingConfigFilesForInferredProjectRoot(info) {
|
|
184990
|
+
if (this.serverMode !== 0 /* Semantic */) return;
|
|
185007
184991
|
Debug.assert(info.isScriptOpen());
|
|
184992
|
+
this.rootOfInferredProjects.add(info);
|
|
185008
184993
|
this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName) => {
|
|
185009
184994
|
let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
185010
184995
|
if (!configFileExistenceInfo) {
|
|
185011
|
-
configFileExistenceInfo = { exists: this.host.fileExists(configFileName) };
|
|
184996
|
+
configFileExistenceInfo = { exists: this.host.fileExists(configFileName), inferredProjectRoots: 1 };
|
|
185012
184997
|
this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo);
|
|
184998
|
+
} else {
|
|
184999
|
+
configFileExistenceInfo.inferredProjectRoots = (configFileExistenceInfo.inferredProjectRoots ?? 0) + 1;
|
|
185013
185000
|
}
|
|
185014
|
-
(configFileExistenceInfo.openFilesImpactedByConfigFile
|
|
185001
|
+
(configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);
|
|
185015
185002
|
configFileExistenceInfo.watcher || (configFileExistenceInfo.watcher = canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath))) ? this.watchFactory.watchFile(
|
|
185016
185003
|
configFileName,
|
|
185017
|
-
(_filename, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind),
|
|
185004
|
+
(_filename, eventKind) => this.onConfigFileChanged(configFileName, canonicalConfigFilePath, eventKind),
|
|
185018
185005
|
2e3 /* High */,
|
|
185019
185006
|
this.hostConfiguration.watchOptions,
|
|
185020
185007
|
WatchType.ConfigFileForInferredRoot
|
|
185021
185008
|
) : noopConfigFileWatcher);
|
|
185022
185009
|
});
|
|
185023
185010
|
}
|
|
185024
|
-
/**
|
|
185025
|
-
* This is called by inferred project whenever root script info is removed from it
|
|
185026
|
-
*
|
|
185027
|
-
* @internal
|
|
185028
|
-
*/
|
|
185029
|
-
stopWatchingConfigFilesForInferredProjectRoot(info) {
|
|
185030
|
-
this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => {
|
|
185031
|
-
var _a;
|
|
185032
|
-
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
185033
|
-
if ((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path)) {
|
|
185034
|
-
Debug.assert(info.isScriptOpen());
|
|
185035
|
-
configFileExistenceInfo.openFilesImpactedByConfigFile.set(info.path, false);
|
|
185036
|
-
this.closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo);
|
|
185037
|
-
}
|
|
185038
|
-
});
|
|
185039
|
-
}
|
|
185040
185011
|
/**
|
|
185041
185012
|
* This function tries to search for a tsconfig.json for the given file.
|
|
185042
185013
|
* This is different from the method the compiler uses because
|
|
@@ -185079,10 +185050,25 @@ var _ProjectService = class _ProjectService {
|
|
|
185079
185050
|
}
|
|
185080
185051
|
/** @internal */
|
|
185081
185052
|
findDefaultConfiguredProject(info) {
|
|
185082
|
-
|
|
185083
|
-
|
|
185084
|
-
|
|
185085
|
-
|
|
185053
|
+
var _a;
|
|
185054
|
+
return info.isScriptOpen() ? (_a = this.tryFindDefaultConfiguredProjectForOpenScriptInfo(
|
|
185055
|
+
info,
|
|
185056
|
+
0 /* Find */
|
|
185057
|
+
)) == null ? void 0 : _a.defaultProject : void 0;
|
|
185058
|
+
}
|
|
185059
|
+
/** Get cached configFileName for scriptInfo or ancestor of open script info */
|
|
185060
|
+
getConfigFileNameForFileFromCache(info, lookInPendingFilesForValue) {
|
|
185061
|
+
if (lookInPendingFilesForValue) {
|
|
185062
|
+
const result = getConfigFileNameFromCache(info, this.pendingOpenFileProjectUpdates);
|
|
185063
|
+
if (result !== void 0) return result;
|
|
185064
|
+
}
|
|
185065
|
+
return getConfigFileNameFromCache(info, this.configFileForOpenFiles);
|
|
185066
|
+
}
|
|
185067
|
+
/** Caches the configFilename for script info or ancestor of open script info */
|
|
185068
|
+
setConfigFileNameForFileInCache(info, configFileName) {
|
|
185069
|
+
if (!this.openFiles.has(info.path)) return;
|
|
185070
|
+
if (isAncestorConfigFileInfo(info)) return;
|
|
185071
|
+
this.configFileForOpenFiles.set(info.path, configFileName || false);
|
|
185086
185072
|
}
|
|
185087
185073
|
/**
|
|
185088
185074
|
* This function tries to search for a tsconfig.json for the given file.
|
|
@@ -185093,17 +185079,16 @@ var _ProjectService = class _ProjectService {
|
|
|
185093
185079
|
* the newly opened file.
|
|
185094
185080
|
* If script info is passed in, it is asserted to be open script info
|
|
185095
185081
|
* otherwise just file name
|
|
185082
|
+
* when findFromCacheOnly is true only looked up in cache instead of hitting disk to figure things out
|
|
185083
|
+
* @internal
|
|
185096
185084
|
*/
|
|
185097
|
-
getConfigFileNameForFile(info) {
|
|
185098
|
-
|
|
185099
|
-
|
|
185100
|
-
|
|
185101
|
-
}
|
|
185085
|
+
getConfigFileNameForFile(info, findFromCacheOnly) {
|
|
185086
|
+
const fromCache = this.getConfigFileNameForFileFromCache(info, findFromCacheOnly);
|
|
185087
|
+
if (fromCache !== void 0) return fromCache || void 0;
|
|
185088
|
+
if (findFromCacheOnly) return void 0;
|
|
185102
185089
|
const configFileName = this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName2) => this.configFileExists(configFileName2, canonicalConfigFilePath, info));
|
|
185103
185090
|
this.logger.info(`getConfigFileNameForFile:: File: ${info.fileName} ProjectRootPath: ${this.openFiles.get(info.path)}:: Result: ${configFileName}`);
|
|
185104
|
-
|
|
185105
|
-
this.configFileForOpenFiles.set(info.path, configFileName || false);
|
|
185106
|
-
}
|
|
185091
|
+
this.setConfigFileNameForFileInCache(info, configFileName);
|
|
185107
185092
|
return configFileName;
|
|
185108
185093
|
}
|
|
185109
185094
|
printProjects() {
|
|
@@ -185123,10 +185108,10 @@ var _ProjectService = class _ProjectService {
|
|
|
185123
185108
|
this.logger.endGroup();
|
|
185124
185109
|
}
|
|
185125
185110
|
/** @internal */
|
|
185126
|
-
findConfiguredProjectByProjectName(configFileName) {
|
|
185111
|
+
findConfiguredProjectByProjectName(configFileName, allowDeferredClosed) {
|
|
185127
185112
|
const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName));
|
|
185128
185113
|
const result = this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath);
|
|
185129
|
-
return !(result == null ? void 0 : result.deferredClose) ? result : void 0;
|
|
185114
|
+
return allowDeferredClosed ? result : !(result == null ? void 0 : result.deferredClose) ? result : void 0;
|
|
185130
185115
|
}
|
|
185131
185116
|
getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath) {
|
|
185132
185117
|
return this.configuredProjects.get(canonicalConfigFilePath);
|
|
@@ -185160,7 +185145,7 @@ var _ProjectService = class _ProjectService {
|
|
|
185160
185145
|
createExternalProject(projectFileName, files, options, typeAcquisition, excludedFiles) {
|
|
185161
185146
|
const compilerOptions = convertCompilerOptions(options);
|
|
185162
185147
|
const watchOptionsAndErrors = convertWatchOptions(options, getDirectoryPath(normalizeSlashes(projectFileName)));
|
|
185163
|
-
const project = new
|
|
185148
|
+
const project = new ExternalProject(
|
|
185164
185149
|
projectFileName,
|
|
185165
185150
|
this,
|
|
185166
185151
|
this.documentRegistry,
|
|
@@ -185206,7 +185191,7 @@ var _ProjectService = class _ProjectService {
|
|
|
185206
185191
|
exclude: projectOptions && projectOptions.configHasExcludeProperty,
|
|
185207
185192
|
compileOnSave: project.compileOnSaveEnabled,
|
|
185208
185193
|
configFileName: configFileName(),
|
|
185209
|
-
projectType: project instanceof
|
|
185194
|
+
projectType: project instanceof ExternalProject ? "external" : "configured",
|
|
185210
185195
|
languageServiceEnabled: project.languageServiceEnabled,
|
|
185211
185196
|
version
|
|
185212
185197
|
};
|
|
@@ -185262,18 +185247,6 @@ var _ProjectService = class _ProjectService {
|
|
|
185262
185247
|
this.createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, project);
|
|
185263
185248
|
return project;
|
|
185264
185249
|
}
|
|
185265
|
-
/** @internal */
|
|
185266
|
-
createLoadAndUpdateConfiguredProject(configFileName, reason, triggerFile) {
|
|
185267
|
-
const project = this.createConfiguredProject(configFileName, reason);
|
|
185268
|
-
if (triggerFile) updateWithTriggerFile(
|
|
185269
|
-
project,
|
|
185270
|
-
triggerFile,
|
|
185271
|
-
/*isReload*/
|
|
185272
|
-
false
|
|
185273
|
-
);
|
|
185274
|
-
else project.updateGraph();
|
|
185275
|
-
return project;
|
|
185276
|
-
}
|
|
185277
185250
|
/**
|
|
185278
185251
|
* Read the config file of the project, and update the project root file names.
|
|
185279
185252
|
*
|
|
@@ -185547,14 +185520,23 @@ var _ProjectService = class _ProjectService {
|
|
|
185547
185520
|
setFileNamesOfAutpImportProviderOrAuxillaryProject(project, fileNames) {
|
|
185548
185521
|
this.updateNonInferredProjectFiles(project, fileNames, fileNamePropertyReader);
|
|
185549
185522
|
}
|
|
185523
|
+
/** @internal */
|
|
185524
|
+
reloadConfiguredProjectClearingSemanticCache(project, reason, reloadedProjects) {
|
|
185525
|
+
if (!tryAddToSet(reloadedProjects, project)) return false;
|
|
185526
|
+
this.clearSemanticCache(project);
|
|
185527
|
+
this.reloadConfiguredProject(project, reloadReason(reason));
|
|
185528
|
+
return true;
|
|
185529
|
+
}
|
|
185550
185530
|
/**
|
|
185551
185531
|
* Read the config file of the project again by clearing the cache and update the project graph
|
|
185552
185532
|
*
|
|
185553
185533
|
* @internal
|
|
185554
185534
|
*/
|
|
185555
|
-
reloadConfiguredProject(project, reason
|
|
185535
|
+
reloadConfiguredProject(project, reason) {
|
|
185536
|
+
project.isInitialLoadPending = returnFalse;
|
|
185537
|
+
project.pendingUpdateReason = void 0;
|
|
185538
|
+
project.pendingUpdateLevel = 0 /* Update */;
|
|
185556
185539
|
const host = project.getCachedDirectoryStructureHost();
|
|
185557
|
-
if (clearSemanticCache) this.clearSemanticCache(project);
|
|
185558
185540
|
host.clearCache();
|
|
185559
185541
|
this.loadConfiguredProject(project, reason);
|
|
185560
185542
|
updateWithTriggerFile(
|
|
@@ -185566,6 +185548,7 @@ var _ProjectService = class _ProjectService {
|
|
|
185566
185548
|
}
|
|
185567
185549
|
/** @internal */
|
|
185568
185550
|
clearSemanticCache(project) {
|
|
185551
|
+
project.originalConfiguredProjects = void 0;
|
|
185569
185552
|
project.resolutionCache.clear();
|
|
185570
185553
|
project.getLanguageService(
|
|
185571
185554
|
/*ensureSynchronized*/
|
|
@@ -186110,7 +186093,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186110
186093
|
if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) {
|
|
186111
186094
|
this.externalProjectToConfiguredProjectMap.forEach(
|
|
186112
186095
|
(projects) => projects.forEach((project) => {
|
|
186113
|
-
if (!project.deferredClose && !project.isClosed() && project.
|
|
186096
|
+
if (!project.deferredClose && !project.isClosed() && project.pendingUpdateLevel === 2 /* Full */ && !this.hasPendingProjectUpdate(project)) {
|
|
186114
186097
|
project.updateGraph();
|
|
186115
186098
|
}
|
|
186116
186099
|
})
|
|
@@ -186170,76 +186153,57 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186170
186153
|
this.pendingProjectUpdates.delete(projectName);
|
|
186171
186154
|
});
|
|
186172
186155
|
this.throttledOperations.cancel(ensureProjectForOpenFileSchedule);
|
|
186156
|
+
this.pendingOpenFileProjectUpdates = void 0;
|
|
186173
186157
|
this.pendingEnsureProjectForOpenFiles = false;
|
|
186174
186158
|
this.configFileExistenceInfoCache.forEach((info) => {
|
|
186175
186159
|
if (info.config) info.config.updateLevel = 2 /* Full */;
|
|
186176
186160
|
});
|
|
186177
|
-
this.
|
|
186161
|
+
this.configFileForOpenFiles.clear();
|
|
186178
186162
|
this.externalProjects.forEach((project) => {
|
|
186179
186163
|
this.clearSemanticCache(project);
|
|
186180
186164
|
project.updateGraph();
|
|
186181
186165
|
});
|
|
186182
|
-
|
|
186183
|
-
|
|
186184
|
-
this.
|
|
186185
|
-
|
|
186186
|
-
|
|
186187
|
-
|
|
186188
|
-
|
|
186189
|
-
|
|
186190
|
-
|
|
186191
|
-
|
|
186192
|
-
|
|
186193
|
-
|
|
186194
|
-
|
|
186195
|
-
|
|
186196
|
-
if (tryAddToSet(updatedProjects, child)) {
|
|
186197
|
-
this.reloadConfiguredProject(
|
|
186198
|
-
child,
|
|
186199
|
-
reason,
|
|
186200
|
-
/*clearSemanticCache*/
|
|
186201
|
-
true
|
|
186202
|
-
);
|
|
186203
|
-
}
|
|
186204
|
-
};
|
|
186205
|
-
(_a = this.openFiles) == null ? void 0 : _a.forEach((_projectRoot, path) => {
|
|
186206
|
-
this.configFileForOpenFiles.delete(path);
|
|
186207
|
-
const info = this.getScriptInfoForPath(path);
|
|
186208
|
-
Debug.assert(info.isScriptOpen());
|
|
186209
|
-
const configFileName = this.getConfigFileNameForFile(info);
|
|
186210
|
-
if (configFileName) {
|
|
186211
|
-
const project = this.findConfiguredProjectByProjectName(configFileName) || this.createConfiguredProject(configFileName, reason);
|
|
186212
|
-
if (tryAddToSet(updatedProjects, project)) {
|
|
186213
|
-
this.reloadConfiguredProject(
|
|
186166
|
+
const reloadedConfiguredProjects = /* @__PURE__ */ new Set();
|
|
186167
|
+
const delayReloadedConfiguredProjects = /* @__PURE__ */ new Set();
|
|
186168
|
+
this.externalProjectToConfiguredProjectMap.forEach((projects, externalProjectName) => {
|
|
186169
|
+
const reason = `Reloading configured project in external project: ${externalProjectName}`;
|
|
186170
|
+
projects.forEach((project) => {
|
|
186171
|
+
if (this.getHostPreferences().lazyConfiguredProjectsFromExternalProject) {
|
|
186172
|
+
if (!project.isInitialLoadPending()) {
|
|
186173
|
+
this.clearSemanticCache(project);
|
|
186174
|
+
project.pendingUpdateLevel = 2 /* Full */;
|
|
186175
|
+
project.pendingUpdateReason = reloadReason(reason);
|
|
186176
|
+
}
|
|
186177
|
+
delayReloadedConfiguredProjects.add(project);
|
|
186178
|
+
} else {
|
|
186179
|
+
this.reloadConfiguredProjectClearingSemanticCache(
|
|
186214
186180
|
project,
|
|
186215
186181
|
reason,
|
|
186216
|
-
|
|
186217
|
-
true
|
|
186182
|
+
reloadedConfiguredProjects
|
|
186218
186183
|
);
|
|
186219
|
-
if (!projectContainsInfoDirectly(project, info)) {
|
|
186220
|
-
const referencedProject = forEachResolvedProjectReferenceProject(
|
|
186221
|
-
project,
|
|
186222
|
-
info.path,
|
|
186223
|
-
(child) => {
|
|
186224
|
-
reloadChildProject(child);
|
|
186225
|
-
return projectContainsInfoDirectly(child, info);
|
|
186226
|
-
},
|
|
186227
|
-
1 /* FindCreate */,
|
|
186228
|
-
reason
|
|
186229
|
-
);
|
|
186230
|
-
if (referencedProject) {
|
|
186231
|
-
forEachResolvedProjectReferenceProject(
|
|
186232
|
-
project,
|
|
186233
|
-
/*fileName*/
|
|
186234
|
-
void 0,
|
|
186235
|
-
reloadChildProject,
|
|
186236
|
-
0 /* Find */
|
|
186237
|
-
);
|
|
186238
|
-
}
|
|
186239
|
-
}
|
|
186240
186184
|
}
|
|
186241
|
-
}
|
|
186185
|
+
});
|
|
186186
|
+
});
|
|
186187
|
+
this.openFiles.forEach((_projectRootPath, path) => {
|
|
186188
|
+
const info = this.getScriptInfoForPath(path);
|
|
186189
|
+
if (find(info.containingProjects, isExternalProject)) return;
|
|
186190
|
+
this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
186191
|
+
info,
|
|
186192
|
+
2 /* Reload */,
|
|
186193
|
+
reloadedConfiguredProjects,
|
|
186194
|
+
delayReloadedConfiguredProjects
|
|
186195
|
+
);
|
|
186242
186196
|
});
|
|
186197
|
+
delayReloadedConfiguredProjects.forEach((p) => reloadedConfiguredProjects.add(p));
|
|
186198
|
+
this.inferredProjects.forEach((project) => this.clearSemanticCache(project));
|
|
186199
|
+
this.ensureProjectForOpenFiles();
|
|
186200
|
+
this.cleanupProjectsAndScriptInfos(
|
|
186201
|
+
reloadedConfiguredProjects,
|
|
186202
|
+
new Set(this.openFiles.keys()),
|
|
186203
|
+
new Set(this.externalProjectToConfiguredProjectMap.keys())
|
|
186204
|
+
);
|
|
186205
|
+
this.logger.info("After reloading projects..");
|
|
186206
|
+
this.printProjects();
|
|
186243
186207
|
}
|
|
186244
186208
|
/**
|
|
186245
186209
|
* Remove the root of inferred project if script info is part of another project
|
|
@@ -186267,6 +186231,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186267
186231
|
ensureProjectForOpenFiles() {
|
|
186268
186232
|
this.logger.info("Before ensureProjectForOpenFiles:");
|
|
186269
186233
|
this.printProjects();
|
|
186234
|
+
const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;
|
|
186235
|
+
this.pendingOpenFileProjectUpdates = void 0;
|
|
186236
|
+
pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach(
|
|
186237
|
+
(_config, path) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
186238
|
+
this.getScriptInfoForPath(path),
|
|
186239
|
+
1 /* Create */
|
|
186240
|
+
)
|
|
186241
|
+
);
|
|
186270
186242
|
this.openFiles.forEach((projectRootPath, path) => {
|
|
186271
186243
|
const info = this.getScriptInfoForPath(path);
|
|
186272
186244
|
if (info.isOrphan()) {
|
|
@@ -186304,7 +186276,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186304
186276
|
const scriptInfo = this.getScriptInfo(fileName);
|
|
186305
186277
|
if (!scriptInfo && !this.host.fileExists(fileName)) return void 0;
|
|
186306
186278
|
const originalFileInfo = { fileName: toNormalizedPath(fileName), path: this.toPath(fileName) };
|
|
186307
|
-
const configFileName = this.getConfigFileNameForFile(
|
|
186279
|
+
const configFileName = this.getConfigFileNameForFile(
|
|
186280
|
+
originalFileInfo,
|
|
186281
|
+
/*findFromCacheOnly*/
|
|
186282
|
+
false
|
|
186283
|
+
);
|
|
186308
186284
|
if (!configFileName) return void 0;
|
|
186309
186285
|
let configuredProject = this.findConfiguredProjectByProjectName(configFileName);
|
|
186310
186286
|
if (!configuredProject) {
|
|
@@ -186319,17 +186295,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186319
186295
|
updateProjectIfDirty(configuredProject);
|
|
186320
186296
|
const projectContainsOriginalInfo = (project2) => {
|
|
186321
186297
|
const info = this.getScriptInfo(fileName);
|
|
186322
|
-
return info &&
|
|
186298
|
+
return info && project2.containsScriptInfo(info) && !project2.isSourceOfProjectReferenceRedirect(info.path);
|
|
186323
186299
|
};
|
|
186324
186300
|
if (configuredProject.isSolution() || !projectContainsOriginalInfo(configuredProject)) {
|
|
186325
186301
|
configuredProject = forEachResolvedProjectReferenceProject(
|
|
186326
186302
|
configuredProject,
|
|
186327
186303
|
fileName,
|
|
186328
|
-
(child) =>
|
|
186329
|
-
|
|
186330
|
-
return projectContainsOriginalInfo(child) ? child : void 0;
|
|
186331
|
-
},
|
|
186332
|
-
1 /* FindCreate */,
|
|
186304
|
+
(child) => projectContainsOriginalInfo(child) ? child : void 0,
|
|
186305
|
+
1 /* Create */,
|
|
186333
186306
|
`Creating project referenced in solution ${configuredProject.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`
|
|
186334
186307
|
);
|
|
186335
186308
|
if (!configuredProject) return void 0;
|
|
@@ -186378,107 +186351,148 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186378
186351
|
assignProjectToOpenedScriptInfo(info) {
|
|
186379
186352
|
let configFileName;
|
|
186380
186353
|
let configFileErrors;
|
|
186381
|
-
|
|
186354
|
+
const project = this.findExternalProjectContainingOpenScriptInfo(info);
|
|
186382
186355
|
let retainProjects;
|
|
186383
|
-
let projectForConfigFileDiag;
|
|
186384
186356
|
let sentConfigDiag;
|
|
186385
186357
|
if (!project && this.serverMode === 0 /* Semantic */) {
|
|
186386
|
-
|
|
186387
|
-
|
|
186388
|
-
|
|
186389
|
-
|
|
186390
|
-
|
|
186391
|
-
|
|
186392
|
-
|
|
186393
|
-
|
|
186394
|
-
|
|
186395
|
-
|
|
186396
|
-
false
|
|
186397
|
-
)) {
|
|
186398
|
-
(sentConfigDiag ?? (sentConfigDiag = /* @__PURE__ */ new Set())).add(project);
|
|
186399
|
-
}
|
|
186400
|
-
projectForConfigFileDiag = project.containsScriptInfo(info) ? project : void 0;
|
|
186401
|
-
retainProjects = project;
|
|
186402
|
-
if (!projectContainsInfoDirectly(project, info)) {
|
|
186403
|
-
forEachResolvedProjectReferenceProject(
|
|
186404
|
-
project,
|
|
186405
|
-
info.path,
|
|
186406
|
-
(child) => {
|
|
186407
|
-
if (updateWithTriggerFile(
|
|
186408
|
-
child,
|
|
186409
|
-
info.fileName,
|
|
186410
|
-
/*isReload*/
|
|
186411
|
-
false
|
|
186412
|
-
)) {
|
|
186413
|
-
(sentConfigDiag ?? (sentConfigDiag = /* @__PURE__ */ new Set())).add(child);
|
|
186414
|
-
}
|
|
186415
|
-
if (!isArray(retainProjects)) {
|
|
186416
|
-
retainProjects = [project, child];
|
|
186417
|
-
} else {
|
|
186418
|
-
retainProjects.push(child);
|
|
186419
|
-
}
|
|
186420
|
-
if (projectContainsInfoDirectly(child, info)) {
|
|
186421
|
-
projectForConfigFileDiag = child;
|
|
186422
|
-
return child;
|
|
186423
|
-
}
|
|
186424
|
-
if (!projectForConfigFileDiag && child.containsScriptInfo(info)) {
|
|
186425
|
-
projectForConfigFileDiag = child;
|
|
186426
|
-
}
|
|
186427
|
-
},
|
|
186428
|
-
1 /* FindCreate */,
|
|
186429
|
-
`Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open`
|
|
186430
|
-
);
|
|
186431
|
-
}
|
|
186432
|
-
if (projectForConfigFileDiag) {
|
|
186433
|
-
configFileName = projectForConfigFileDiag.getConfigFilePath();
|
|
186434
|
-
configFileErrors = projectForConfigFileDiag.getAllProjectErrors();
|
|
186435
|
-
} else {
|
|
186436
|
-
configFileName = void 0;
|
|
186358
|
+
const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
186359
|
+
info,
|
|
186360
|
+
1 /* Create */
|
|
186361
|
+
);
|
|
186362
|
+
if (result) {
|
|
186363
|
+
retainProjects = result.seenProjects;
|
|
186364
|
+
sentConfigDiag = result.sentConfigDiag;
|
|
186365
|
+
if (result.defaultProject) {
|
|
186366
|
+
configFileName = result.defaultProject.getConfigFilePath();
|
|
186367
|
+
configFileErrors = result.defaultProject.getAllProjectErrors();
|
|
186437
186368
|
}
|
|
186438
|
-
this.createAncestorProjects(info, project);
|
|
186439
186369
|
}
|
|
186440
186370
|
}
|
|
186441
186371
|
info.containingProjects.forEach(updateProjectIfDirty);
|
|
186442
186372
|
if (info.isOrphan()) {
|
|
186443
|
-
|
|
186444
|
-
|
|
186445
|
-
|
|
186446
|
-
project2,
|
|
186447
|
-
info.fileName,
|
|
186448
|
-
/*force*/
|
|
186449
|
-
true
|
|
186450
|
-
);
|
|
186451
|
-
});
|
|
186452
|
-
} else if (retainProjects && !(sentConfigDiag == null ? void 0 : sentConfigDiag.has(retainProjects))) {
|
|
186453
|
-
this.sendConfigFileDiagEvent(
|
|
186454
|
-
retainProjects,
|
|
186373
|
+
retainProjects == null ? void 0 : retainProjects.forEach((project2) => {
|
|
186374
|
+
if (!sentConfigDiag.has(project2)) this.sendConfigFileDiagEvent(
|
|
186375
|
+
project2,
|
|
186455
186376
|
info.fileName,
|
|
186456
186377
|
/*force*/
|
|
186457
186378
|
true
|
|
186458
186379
|
);
|
|
186459
|
-
}
|
|
186380
|
+
});
|
|
186460
186381
|
Debug.assert(this.openFiles.has(info.path));
|
|
186461
186382
|
this.assignOrphanScriptInfoToInferredProject(info, this.openFiles.get(info.path));
|
|
186462
186383
|
}
|
|
186463
186384
|
Debug.assert(!info.isOrphan());
|
|
186464
186385
|
return { configFileName, configFileErrors, retainProjects };
|
|
186465
186386
|
}
|
|
186466
|
-
|
|
186467
|
-
|
|
186468
|
-
|
|
186469
|
-
|
|
186470
|
-
|
|
186471
|
-
|
|
186472
|
-
|
|
186473
|
-
|
|
186474
|
-
|
|
186475
|
-
|
|
186476
|
-
|
|
186477
|
-
|
|
186478
|
-
|
|
186479
|
-
|
|
186480
|
-
|
|
186387
|
+
/**
|
|
186388
|
+
* Depending on kind
|
|
186389
|
+
* - Find the configuedProject and return it - if allowDeferredClosed is set it will find the deferredClosed project as well
|
|
186390
|
+
* - Create - if the project doesnt exist, it creates one as well. If not delayLoad, the project is updated (with triggerFile if passed)
|
|
186391
|
+
* - Reload - if the project doesnt exist, it creates one. If not delayLoad, the project is reloaded clearing semantic cache
|
|
186392
|
+
* @internal
|
|
186393
|
+
*/
|
|
186394
|
+
findCreateOrReloadConfiguredProject(configFileName, kind, reason, allowDeferredClosed, triggerFile, reloadedProjects, delayLoad, delayReloadedConfiguredProjects) {
|
|
186395
|
+
let project = this.findConfiguredProjectByProjectName(configFileName, allowDeferredClosed);
|
|
186396
|
+
let sentConfigFileDiag = false;
|
|
186397
|
+
switch (kind) {
|
|
186398
|
+
case 0 /* Find */:
|
|
186399
|
+
if (!project) return;
|
|
186400
|
+
break;
|
|
186401
|
+
case 1 /* Create */:
|
|
186402
|
+
project ?? (project = this.createConfiguredProject(configFileName, reason));
|
|
186403
|
+
sentConfigFileDiag = !delayLoad && updateConfiguredProject(project, triggerFile);
|
|
186404
|
+
break;
|
|
186405
|
+
case 2 /* Reload */:
|
|
186406
|
+
project ?? (project = this.createConfiguredProject(configFileName, reloadReason(reason)));
|
|
186407
|
+
sentConfigFileDiag = !delayReloadedConfiguredProjects && this.reloadConfiguredProjectClearingSemanticCache(project, reason, reloadedProjects);
|
|
186408
|
+
if (delayReloadedConfiguredProjects && !delayReloadedConfiguredProjects.has(project) && !reloadedProjects.has(project)) {
|
|
186409
|
+
project.pendingUpdateLevel = 2 /* Full */;
|
|
186410
|
+
project.pendingUpdateReason = reloadReason(reason);
|
|
186411
|
+
delayReloadedConfiguredProjects.add(project);
|
|
186412
|
+
}
|
|
186413
|
+
break;
|
|
186414
|
+
default:
|
|
186415
|
+
Debug.assertNever(kind);
|
|
186416
|
+
}
|
|
186417
|
+
return { project, sentConfigFileDiag };
|
|
186418
|
+
}
|
|
186419
|
+
/**
|
|
186420
|
+
* Finds the default configured project for given info
|
|
186421
|
+
* For any tsconfig found, it looks into that project, if not then all its references,
|
|
186422
|
+
* The search happens for all tsconfigs till projectRootPath
|
|
186423
|
+
*/
|
|
186424
|
+
tryFindDefaultConfiguredProjectForOpenScriptInfo(info, kind, allowDeferredClosed, reloadedProjects) {
|
|
186425
|
+
const configFileName = this.getConfigFileNameForFile(info, kind === 0 /* Find */);
|
|
186426
|
+
if (!configFileName) return;
|
|
186427
|
+
const result = this.findCreateOrReloadConfiguredProject(
|
|
186428
|
+
configFileName,
|
|
186429
|
+
kind,
|
|
186430
|
+
fileOpenReason(info),
|
|
186431
|
+
allowDeferredClosed,
|
|
186432
|
+
info.fileName,
|
|
186433
|
+
reloadedProjects
|
|
186434
|
+
);
|
|
186435
|
+
if (!result) return;
|
|
186436
|
+
const seenProjects = /* @__PURE__ */ new Set();
|
|
186437
|
+
const sentConfigDiag = new Set(result.sentConfigFileDiag ? [result.project] : void 0);
|
|
186438
|
+
let defaultProject;
|
|
186439
|
+
let possiblyDefault;
|
|
186440
|
+
tryFindDefaultConfiguredProject(result.project);
|
|
186441
|
+
return {
|
|
186442
|
+
defaultProject: defaultProject ?? possiblyDefault,
|
|
186443
|
+
sentConfigDiag,
|
|
186444
|
+
seenProjects
|
|
186445
|
+
};
|
|
186446
|
+
function tryFindDefaultConfiguredProject(project) {
|
|
186447
|
+
return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project);
|
|
186448
|
+
}
|
|
186449
|
+
function isDefaultProject(project) {
|
|
186450
|
+
if (!tryAddToSet(seenProjects, project)) return;
|
|
186451
|
+
const projectWithInfo = project.containsScriptInfo(info);
|
|
186452
|
+
if (projectWithInfo && !project.isSourceOfProjectReferenceRedirect(info.path)) return defaultProject = project;
|
|
186453
|
+
possiblyDefault ?? (possiblyDefault = projectWithInfo ? project : void 0);
|
|
186454
|
+
}
|
|
186455
|
+
function tryFindDefaultConfiguredProjectFromReferences(project) {
|
|
186456
|
+
return forEachResolvedProjectReferenceProject(
|
|
186457
|
+
project,
|
|
186458
|
+
info.path,
|
|
186459
|
+
(child, sentConfigFileDiag) => {
|
|
186460
|
+
if (sentConfigFileDiag) sentConfigDiag.add(child);
|
|
186461
|
+
return isDefaultProject(child);
|
|
186462
|
+
},
|
|
186463
|
+
kind,
|
|
186464
|
+
`Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open`,
|
|
186465
|
+
allowDeferredClosed,
|
|
186466
|
+
info.fileName,
|
|
186467
|
+
reloadedProjects
|
|
186468
|
+
);
|
|
186469
|
+
}
|
|
186470
|
+
}
|
|
186471
|
+
tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, kind, reloadedProjects, delayReloadedConfiguredProjects) {
|
|
186472
|
+
const allowDeferredClosed = kind === 0 /* Find */;
|
|
186473
|
+
const result = this.tryFindDefaultConfiguredProjectForOpenScriptInfo(
|
|
186474
|
+
info,
|
|
186475
|
+
kind,
|
|
186476
|
+
allowDeferredClosed,
|
|
186477
|
+
reloadedProjects
|
|
186478
|
+
);
|
|
186479
|
+
if (!result) return;
|
|
186480
|
+
const { defaultProject, seenProjects } = result;
|
|
186481
|
+
if (defaultProject) {
|
|
186482
|
+
forEachAncestorProject(
|
|
186483
|
+
info,
|
|
186484
|
+
defaultProject,
|
|
186485
|
+
(ancestor) => {
|
|
186486
|
+
seenProjects.add(ancestor);
|
|
186487
|
+
},
|
|
186488
|
+
kind,
|
|
186489
|
+
`Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`,
|
|
186490
|
+
allowDeferredClosed,
|
|
186491
|
+
reloadedProjects,
|
|
186492
|
+
delayReloadedConfiguredProjects
|
|
186493
|
+
);
|
|
186481
186494
|
}
|
|
186495
|
+
return result;
|
|
186482
186496
|
}
|
|
186483
186497
|
/** @internal */
|
|
186484
186498
|
loadAncestorProjectTree(forProjects) {
|
|
@@ -186505,13 +186519,27 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186505
186519
|
const referencedProject = forEachResolvedProjectReference(child.references, (ref) => forProjects.has(ref.sourceFile.path) ? ref : void 0);
|
|
186506
186520
|
if (!referencedProject) continue;
|
|
186507
186521
|
const configFileName = toNormalizedPath(child.sourceFile.fileName);
|
|
186508
|
-
const childProject =
|
|
186522
|
+
const childProject = this.findConfiguredProjectByProjectName(configFileName) ?? this.createConfiguredProject(
|
|
186523
|
+
configFileName,
|
|
186524
|
+
`Creating project referenced by : ${project.projectName} as it references project ${referencedProject.sourceFile.fileName}`
|
|
186525
|
+
);
|
|
186509
186526
|
updateProjectIfDirty(childProject);
|
|
186510
186527
|
this.ensureProjectChildren(childProject, forProjects, seenProjects);
|
|
186511
186528
|
}
|
|
186512
186529
|
}
|
|
186513
|
-
|
|
186514
|
-
this.
|
|
186530
|
+
cleanupConfiguredProjects(toRetainConfiguredProjects, externalProjectsRetainingConfiguredProjects, openFilesWithRetainedConfiguredProject) {
|
|
186531
|
+
this.getOrphanConfiguredProjects(
|
|
186532
|
+
toRetainConfiguredProjects,
|
|
186533
|
+
openFilesWithRetainedConfiguredProject,
|
|
186534
|
+
externalProjectsRetainingConfiguredProjects
|
|
186535
|
+
).forEach((project) => this.removeProject(project));
|
|
186536
|
+
}
|
|
186537
|
+
cleanupProjectsAndScriptInfos(toRetainConfiguredProjects, openFilesWithRetainedConfiguredProject, externalProjectsRetainingConfiguredProjects) {
|
|
186538
|
+
this.cleanupConfiguredProjects(
|
|
186539
|
+
toRetainConfiguredProjects,
|
|
186540
|
+
externalProjectsRetainingConfiguredProjects,
|
|
186541
|
+
openFilesWithRetainedConfiguredProject
|
|
186542
|
+
);
|
|
186515
186543
|
for (const inferredProject of this.inferredProjects.slice()) {
|
|
186516
186544
|
if (inferredProject.isOrphan()) {
|
|
186517
186545
|
this.removeProject(inferredProject);
|
|
@@ -186522,17 +186550,18 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186522
186550
|
openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) {
|
|
186523
186551
|
const info = this.getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath);
|
|
186524
186552
|
const { retainProjects, ...result } = this.assignProjectToOpenedScriptInfo(info);
|
|
186525
|
-
this.
|
|
186553
|
+
this.cleanupProjectsAndScriptInfos(
|
|
186554
|
+
retainProjects,
|
|
186555
|
+
/* @__PURE__ */ new Set([info.path]),
|
|
186556
|
+
/*externalProjectsRetainingConfiguredProjects*/
|
|
186557
|
+
void 0
|
|
186558
|
+
);
|
|
186526
186559
|
this.telemetryOnOpenFile(info);
|
|
186527
186560
|
this.printProjects();
|
|
186528
186561
|
return result;
|
|
186529
186562
|
}
|
|
186530
|
-
removeOrphanConfiguredProjects(toRetainConfiguredProjects) {
|
|
186531
|
-
const orphanConfiguredProjects = this.getOrphanConfiguredProjects(toRetainConfiguredProjects);
|
|
186532
|
-
orphanConfiguredProjects.forEach((project) => this.removeProject(project));
|
|
186533
|
-
}
|
|
186534
186563
|
/** @internal */
|
|
186535
|
-
getOrphanConfiguredProjects(toRetainConfiguredProjects) {
|
|
186564
|
+
getOrphanConfiguredProjects(toRetainConfiguredProjects, openFilesWithRetainedConfiguredProject, externalProjectsRetainingConfiguredProjects) {
|
|
186536
186565
|
const toRemoveConfiguredProjects = new Set(this.configuredProjects.values());
|
|
186537
186566
|
const markOriginalProjectsAsUsed = (project) => {
|
|
186538
186567
|
if (project.originalConfiguredProjects && (isConfiguredProject(project) || !project.isOrphan())) {
|
|
@@ -186544,32 +186573,45 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186544
186573
|
);
|
|
186545
186574
|
}
|
|
186546
186575
|
};
|
|
186547
|
-
|
|
186548
|
-
if (isArray(toRetainConfiguredProjects)) {
|
|
186549
|
-
toRetainConfiguredProjects.forEach(retainConfiguredProject);
|
|
186550
|
-
} else {
|
|
186551
|
-
retainConfiguredProject(toRetainConfiguredProjects);
|
|
186552
|
-
}
|
|
186553
|
-
}
|
|
186576
|
+
toRetainConfiguredProjects == null ? void 0 : toRetainConfiguredProjects.forEach(retainConfiguredProject);
|
|
186554
186577
|
this.inferredProjects.forEach(markOriginalProjectsAsUsed);
|
|
186555
186578
|
this.externalProjects.forEach(markOriginalProjectsAsUsed);
|
|
186579
|
+
this.externalProjectToConfiguredProjectMap.forEach((projects, externalProjectName) => {
|
|
186580
|
+
if (!(externalProjectsRetainingConfiguredProjects == null ? void 0 : externalProjectsRetainingConfiguredProjects.has(externalProjectName))) {
|
|
186581
|
+
projects.forEach(retainConfiguredProject);
|
|
186582
|
+
}
|
|
186583
|
+
});
|
|
186584
|
+
this.openFiles.forEach((_projectRootPath, path) => {
|
|
186585
|
+
if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path)) return;
|
|
186586
|
+
const info = this.getScriptInfoForPath(path);
|
|
186587
|
+
if (find(info.containingProjects, isExternalProject)) return;
|
|
186588
|
+
const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
|
186589
|
+
info,
|
|
186590
|
+
0 /* Find */
|
|
186591
|
+
);
|
|
186592
|
+
if (result == null ? void 0 : result.defaultProject) {
|
|
186593
|
+
result == null ? void 0 : result.seenProjects.forEach(retainConfiguredProject);
|
|
186594
|
+
}
|
|
186595
|
+
});
|
|
186556
186596
|
this.configuredProjects.forEach((project) => {
|
|
186557
|
-
if (
|
|
186558
|
-
|
|
186559
|
-
|
|
186560
|
-
|
|
186561
|
-
retainConfiguredProject(project);
|
|
186597
|
+
if (toRemoveConfiguredProjects.has(project)) {
|
|
186598
|
+
if (isPendingUpdate(project) || forEachReferencedProject(project, isRetained)) {
|
|
186599
|
+
retainConfiguredProject(project);
|
|
186600
|
+
}
|
|
186562
186601
|
}
|
|
186563
186602
|
});
|
|
186564
186603
|
return toRemoveConfiguredProjects;
|
|
186565
186604
|
function isRetained(project) {
|
|
186566
|
-
return !toRemoveConfiguredProjects.has(project) || project
|
|
186605
|
+
return !toRemoveConfiguredProjects.has(project) || isPendingUpdate(project);
|
|
186606
|
+
}
|
|
186607
|
+
function isPendingUpdate(project) {
|
|
186608
|
+
var _a, _b;
|
|
186609
|
+
return (project.deferredClose || project.projectService.hasPendingProjectUpdate(project)) && !!((_b = (_a = project.projectService.configFileExistenceInfoCache.get(project.canonicalConfigFilePath)) == null ? void 0 : _a.openFilesImpactedByConfigFile) == null ? void 0 : _b.size);
|
|
186567
186610
|
}
|
|
186568
186611
|
function retainConfiguredProject(project) {
|
|
186569
|
-
if (toRemoveConfiguredProjects.delete(project))
|
|
186570
|
-
|
|
186571
|
-
|
|
186572
|
-
}
|
|
186612
|
+
if (!toRemoveConfiguredProjects.delete(project)) return;
|
|
186613
|
+
markOriginalProjectsAsUsed(project);
|
|
186614
|
+
forEachReferencedProject(project, retainConfiguredProject);
|
|
186573
186615
|
}
|
|
186574
186616
|
}
|
|
186575
186617
|
removeOrphanScriptInfos() {
|
|
@@ -186684,14 +186726,20 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186684
186726
|
}
|
|
186685
186727
|
}
|
|
186686
186728
|
let retainProjects;
|
|
186687
|
-
|
|
186688
|
-
|
|
186689
|
-
|
|
186729
|
+
openScriptInfos == null ? void 0 : openScriptInfos.forEach((info) => {
|
|
186730
|
+
var _a;
|
|
186731
|
+
return (_a = this.assignProjectToOpenedScriptInfo(info).retainProjects) == null ? void 0 : _a.forEach((p) => (retainProjects ?? (retainProjects = /* @__PURE__ */ new Set())).add(p));
|
|
186732
|
+
});
|
|
186690
186733
|
if (assignOrphanScriptInfosToInferredProject) {
|
|
186691
186734
|
this.assignOrphanScriptInfosToInferredProject();
|
|
186692
186735
|
}
|
|
186693
186736
|
if (openScriptInfos) {
|
|
186694
|
-
this.
|
|
186737
|
+
this.cleanupProjectsAndScriptInfos(
|
|
186738
|
+
retainProjects,
|
|
186739
|
+
new Set(openScriptInfos.map((info) => info.path)),
|
|
186740
|
+
/*externalProjectsRetainingConfiguredProjects*/
|
|
186741
|
+
void 0
|
|
186742
|
+
);
|
|
186695
186743
|
openScriptInfos.forEach((info) => this.telemetryOnOpenFile(info));
|
|
186696
186744
|
this.printProjects();
|
|
186697
186745
|
} else if (length(closedFiles)) {
|
|
@@ -186704,20 +186752,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186704
186752
|
scriptInfo.editContent(change.span.start, change.span.start + change.span.length, change.newText);
|
|
186705
186753
|
}
|
|
186706
186754
|
}
|
|
186707
|
-
closeConfiguredProjectReferencedFromExternalProject(configuredProjects) {
|
|
186708
|
-
configuredProjects == null ? void 0 : configuredProjects.forEach((configuredProject) => {
|
|
186709
|
-
if (!configuredProject.isClosed()) {
|
|
186710
|
-
configuredProject.deleteExternalProjectReference();
|
|
186711
|
-
if (!configuredProject.hasOpenRef()) this.removeProject(configuredProject);
|
|
186712
|
-
}
|
|
186713
|
-
});
|
|
186714
|
-
}
|
|
186715
186755
|
// eslint-disable-line @typescript-eslint/unified-signatures
|
|
186716
|
-
closeExternalProject(uncheckedFileName,
|
|
186756
|
+
closeExternalProject(uncheckedFileName, cleanupAfter) {
|
|
186717
186757
|
const fileName = toNormalizedPath(uncheckedFileName);
|
|
186718
|
-
const
|
|
186719
|
-
if (
|
|
186720
|
-
this.closeConfiguredProjectReferencedFromExternalProject(configuredProjects);
|
|
186758
|
+
const projects = this.externalProjectToConfiguredProjectMap.get(fileName);
|
|
186759
|
+
if (projects) {
|
|
186721
186760
|
this.externalProjectToConfiguredProjectMap.delete(fileName);
|
|
186722
186761
|
} else {
|
|
186723
186762
|
const externalProject = this.findExternalProjectByProjectName(uncheckedFileName);
|
|
@@ -186725,28 +186764,28 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186725
186764
|
this.removeProject(externalProject);
|
|
186726
186765
|
}
|
|
186727
186766
|
}
|
|
186728
|
-
if (
|
|
186767
|
+
if (cleanupAfter) {
|
|
186768
|
+
this.cleanupConfiguredProjects();
|
|
186769
|
+
this.printProjects();
|
|
186770
|
+
}
|
|
186729
186771
|
}
|
|
186730
186772
|
openExternalProjects(projects) {
|
|
186731
|
-
const projectsToClose =
|
|
186732
|
-
|
|
186733
|
-
projectsToClose.set(externalProjectName, true);
|
|
186734
|
-
});
|
|
186773
|
+
const projectsToClose = new Set(this.externalProjects.map((p) => p.getProjectName()));
|
|
186774
|
+
this.externalProjectToConfiguredProjectMap.forEach((_, externalProjectName) => projectsToClose.add(externalProjectName));
|
|
186735
186775
|
for (const externalProject of projects) {
|
|
186736
186776
|
this.openExternalProject(
|
|
186737
186777
|
externalProject,
|
|
186738
|
-
/*
|
|
186778
|
+
/*cleanupAfter*/
|
|
186739
186779
|
false
|
|
186740
186780
|
);
|
|
186741
186781
|
projectsToClose.delete(externalProject.projectFileName);
|
|
186742
186782
|
}
|
|
186743
|
-
|
|
186744
|
-
|
|
186745
|
-
|
|
186746
|
-
|
|
186747
|
-
|
|
186748
|
-
|
|
186749
|
-
});
|
|
186783
|
+
projectsToClose.forEach((externalProjectName) => this.closeExternalProject(
|
|
186784
|
+
externalProjectName,
|
|
186785
|
+
/*cleanupAfter*/
|
|
186786
|
+
false
|
|
186787
|
+
));
|
|
186788
|
+
this.cleanupConfiguredProjects();
|
|
186750
186789
|
this.printProjects();
|
|
186751
186790
|
}
|
|
186752
186791
|
static escapeFilenameForRegex(filename) {
|
|
@@ -186851,9 +186890,8 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186851
186890
|
}
|
|
186852
186891
|
}
|
|
186853
186892
|
// eslint-disable-line @typescript-eslint/unified-signatures
|
|
186854
|
-
openExternalProject(proj,
|
|
186893
|
+
openExternalProject(proj, cleanupAfter) {
|
|
186855
186894
|
const existingExternalProject = this.findExternalProjectByProjectName(proj.projectFileName);
|
|
186856
|
-
const existingConfiguredProjects = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName);
|
|
186857
186895
|
let configuredProjects;
|
|
186858
186896
|
let rootFiles = [];
|
|
186859
186897
|
for (const file of proj.rootFiles) {
|
|
@@ -186862,18 +186900,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186862
186900
|
if (this.serverMode === 0 /* Semantic */ && this.host.fileExists(normalized)) {
|
|
186863
186901
|
let project = this.findConfiguredProjectByProjectName(normalized);
|
|
186864
186902
|
if (!project) {
|
|
186865
|
-
project = this.
|
|
186866
|
-
|
|
186867
|
-
`Creating configured project in external project: ${proj.projectFileName}`,
|
|
186868
|
-
/*triggerFile*/
|
|
186869
|
-
void 0
|
|
186870
|
-
);
|
|
186871
|
-
}
|
|
186872
|
-
if (!(existingConfiguredProjects == null ? void 0 : existingConfiguredProjects.has(project))) {
|
|
186873
|
-
project.addExternalProjectReference();
|
|
186903
|
+
project = this.createConfiguredProject(normalized, `Creating configured project in external project: ${proj.projectFileName}`);
|
|
186904
|
+
if (!this.getHostPreferences().lazyConfiguredProjectsFromExternalProject) project.updateGraph();
|
|
186874
186905
|
}
|
|
186875
186906
|
(configuredProjects ?? (configuredProjects = /* @__PURE__ */ new Set())).add(project);
|
|
186876
|
-
|
|
186907
|
+
Debug.assert(!project.isClosed());
|
|
186877
186908
|
}
|
|
186878
186909
|
} else {
|
|
186879
186910
|
rootFiles.push(file);
|
|
@@ -186911,8 +186942,13 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
186911
186942
|
project.updateGraph();
|
|
186912
186943
|
}
|
|
186913
186944
|
}
|
|
186914
|
-
|
|
186915
|
-
|
|
186945
|
+
if (cleanupAfter) {
|
|
186946
|
+
this.cleanupConfiguredProjects(
|
|
186947
|
+
configuredProjects,
|
|
186948
|
+
new Set(proj.projectFileName)
|
|
186949
|
+
);
|
|
186950
|
+
this.printProjects();
|
|
186951
|
+
}
|
|
186916
186952
|
}
|
|
186917
186953
|
hasDeferredExtension() {
|
|
186918
186954
|
for (const extension of this.hostConfiguration.extraFileExtensions) {
|
|
@@ -187826,7 +187862,7 @@ var Session3 = class _Session {
|
|
|
187826
187862
|
["openExternalProject" /* OpenExternalProject */]: (request) => {
|
|
187827
187863
|
this.projectService.openExternalProject(
|
|
187828
187864
|
request.arguments,
|
|
187829
|
-
/*
|
|
187865
|
+
/*cleanupAfter*/
|
|
187830
187866
|
true
|
|
187831
187867
|
);
|
|
187832
187868
|
return this.requiredResponse(
|
|
@@ -187844,7 +187880,7 @@ var Session3 = class _Session {
|
|
|
187844
187880
|
["closeExternalProject" /* CloseExternalProject */]: (request) => {
|
|
187845
187881
|
this.projectService.closeExternalProject(
|
|
187846
187882
|
request.arguments.projectFileName,
|
|
187847
|
-
/*
|
|
187883
|
+
/*cleanupAfter*/
|
|
187848
187884
|
true
|
|
187849
187885
|
);
|
|
187850
187886
|
return this.requiredResponse(
|
|
@@ -191569,6 +191605,7 @@ __export(ts_server_exports4, {
|
|
|
191569
191605
|
CommandNames: () => CommandNames,
|
|
191570
191606
|
ConfigFileDiagEvent: () => ConfigFileDiagEvent,
|
|
191571
191607
|
ConfiguredProject: () => ConfiguredProject2,
|
|
191608
|
+
ConfiguredProjectLoadKind: () => ConfiguredProjectLoadKind,
|
|
191572
191609
|
CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent,
|
|
191573
191610
|
CreateFileWatcherEvent: () => CreateFileWatcherEvent,
|
|
191574
191611
|
Errors: () => Errors,
|
|
@@ -191576,7 +191613,7 @@ __export(ts_server_exports4, {
|
|
|
191576
191613
|
EventEndInstallTypes: () => EventEndInstallTypes,
|
|
191577
191614
|
EventInitializationFailed: () => EventInitializationFailed,
|
|
191578
191615
|
EventTypesRegistry: () => EventTypesRegistry,
|
|
191579
|
-
ExternalProject: () =>
|
|
191616
|
+
ExternalProject: () => ExternalProject,
|
|
191580
191617
|
GcTimer: () => GcTimer,
|
|
191581
191618
|
InferredProject: () => InferredProject2,
|
|
191582
191619
|
LargeFileReferencedEvent: () => LargeFileReferencedEvent,
|
|
@@ -191592,7 +191629,6 @@ __export(ts_server_exports4, {
|
|
|
191592
191629
|
ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent,
|
|
191593
191630
|
ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent,
|
|
191594
191631
|
ProjectLoadingStartEvent: () => ProjectLoadingStartEvent,
|
|
191595
|
-
ProjectReferenceProjectLoadKind: () => ProjectReferenceProjectLoadKind,
|
|
191596
191632
|
ProjectService: () => ProjectService3,
|
|
191597
191633
|
ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent,
|
|
191598
191634
|
ScriptInfo: () => ScriptInfo,
|
|
@@ -191644,7 +191680,6 @@ __export(ts_server_exports4, {
|
|
|
191644
191680
|
nowString: () => nowString,
|
|
191645
191681
|
nullCancellationToken: () => nullCancellationToken,
|
|
191646
191682
|
nullTypingsInstaller: () => nullTypingsInstaller,
|
|
191647
|
-
projectContainsInfoDirectly: () => projectContainsInfoDirectly,
|
|
191648
191683
|
protocol: () => ts_server_protocol_exports,
|
|
191649
191684
|
removeSorted: () => removeSorted,
|
|
191650
191685
|
stringifyIndented: () => stringifyIndented,
|
|
@@ -191706,7 +191741,6 @@ if (typeof console !== "undefined") {
|
|
|
191706
191741
|
EmitHint,
|
|
191707
191742
|
EmitOnly,
|
|
191708
191743
|
EndOfLineState,
|
|
191709
|
-
EnumKind,
|
|
191710
191744
|
ExitStatus,
|
|
191711
191745
|
ExportKind,
|
|
191712
191746
|
Extension,
|