typescript 5.3.0-dev.20230912 → 5.3.0-dev.20230914
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 +227 -63
- package/lib/tsserver.js +248 -71
- package/lib/typescript.d.ts +5 -2
- package/lib/typescript.js +248 -72
- package/lib/typingsInstaller.js +44 -17
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230914`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -2188,7 +2188,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
2188
2188
|
// for use with vscode-js-debug's new customDescriptionGenerator in launch.json
|
|
2189
2189
|
__tsDebuggerDisplay: {
|
|
2190
2190
|
value() {
|
|
2191
|
-
const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags &
|
|
2191
|
+
const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
|
|
2192
2192
|
const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
|
|
2193
2193
|
return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
|
|
2194
2194
|
}
|
|
@@ -9582,6 +9582,7 @@ ${lanes.join("\n")}
|
|
|
9582
9582
|
var tokenFlags;
|
|
9583
9583
|
var commentDirectives;
|
|
9584
9584
|
var inJSDocType = 0;
|
|
9585
|
+
var skipNonSemanticJSDoc = false;
|
|
9585
9586
|
setText(text, start, length2);
|
|
9586
9587
|
var scanner2 = {
|
|
9587
9588
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -9631,7 +9632,8 @@ ${lanes.join("\n")}
|
|
|
9631
9632
|
setInJSDocType,
|
|
9632
9633
|
tryScan,
|
|
9633
9634
|
lookAhead,
|
|
9634
|
-
scanRange
|
|
9635
|
+
scanRange,
|
|
9636
|
+
setSkipNonSemanticJSDoc
|
|
9635
9637
|
};
|
|
9636
9638
|
if (Debug.isDebugging) {
|
|
9637
9639
|
Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", {
|
|
@@ -10403,9 +10405,7 @@ ${lanes.join("\n")}
|
|
|
10403
10405
|
}
|
|
10404
10406
|
if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
|
|
10405
10407
|
pos += 2;
|
|
10406
|
-
|
|
10407
|
-
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
10408
|
-
}
|
|
10408
|
+
const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */;
|
|
10409
10409
|
let commentClosed = false;
|
|
10410
10410
|
let lastLineStart = tokenStart;
|
|
10411
10411
|
while (pos < end) {
|
|
@@ -10421,6 +10421,9 @@ ${lanes.join("\n")}
|
|
|
10421
10421
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
10422
10422
|
}
|
|
10423
10423
|
}
|
|
10424
|
+
if (isJSDoc2 && (!skipNonSemanticJSDoc || semanticJSDocTagRegEx.test(text.slice(fullStartPos, pos)))) {
|
|
10425
|
+
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
10426
|
+
}
|
|
10424
10427
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
10425
10428
|
if (!commentClosed) {
|
|
10426
10429
|
error2(Diagnostics.Asterisk_Slash_expected);
|
|
@@ -11091,6 +11094,9 @@ ${lanes.join("\n")}
|
|
|
11091
11094
|
function setLanguageVariant(variant) {
|
|
11092
11095
|
languageVariant = variant;
|
|
11093
11096
|
}
|
|
11097
|
+
function setSkipNonSemanticJSDoc(skip) {
|
|
11098
|
+
skipNonSemanticJSDoc = skip;
|
|
11099
|
+
}
|
|
11094
11100
|
function resetTokenState(position) {
|
|
11095
11101
|
Debug.assert(position >= 0);
|
|
11096
11102
|
pos = position;
|
|
@@ -11125,7 +11131,7 @@ ${lanes.join("\n")}
|
|
|
11125
11131
|
function utf16EncodeAsString(codePoint) {
|
|
11126
11132
|
return utf16EncodeAsStringWorker(codePoint);
|
|
11127
11133
|
}
|
|
11128
|
-
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
|
|
11134
|
+
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, semanticJSDocTagRegEx, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
|
|
11129
11135
|
var init_scanner = __esm({
|
|
11130
11136
|
"src/compiler/scanner.ts"() {
|
|
11131
11137
|
"use strict";
|
|
@@ -11288,6 +11294,7 @@ ${lanes.join("\n")}
|
|
|
11288
11294
|
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];
|
|
11289
11295
|
commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
11290
11296
|
commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
11297
|
+
semanticJSDocTagRegEx = /@(?:see|link)/i;
|
|
11291
11298
|
tokenStrings = makeReverseMap(textToToken);
|
|
11292
11299
|
mergeConflictMarkerLength = "<<<<<<<".length;
|
|
11293
11300
|
shebangTriviaRegex = /^#!.*/;
|
|
@@ -16846,7 +16853,7 @@ ${lanes.join("\n")}
|
|
|
16846
16853
|
return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node;
|
|
16847
16854
|
}
|
|
16848
16855
|
function isRightSideOfAccessExpression(node) {
|
|
16849
|
-
return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node;
|
|
16856
|
+
return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node);
|
|
16850
16857
|
}
|
|
16851
16858
|
function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {
|
|
16852
16859
|
return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node;
|
|
@@ -18862,6 +18869,9 @@ ${lanes.join("\n")}
|
|
|
18862
18869
|
}
|
|
18863
18870
|
return Debug.fail();
|
|
18864
18871
|
}
|
|
18872
|
+
function isExpandoPropertyDeclaration(declaration) {
|
|
18873
|
+
return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
|
|
18874
|
+
}
|
|
18865
18875
|
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
|
|
18866
18876
|
var init_utilities = __esm({
|
|
18867
18877
|
"src/compiler/utilities.ts"() {
|
|
@@ -28079,7 +28089,7 @@ ${lanes.join("\n")}
|
|
|
28079
28089
|
function setExternalModuleIndicator(sourceFile) {
|
|
28080
28090
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
28081
28091
|
}
|
|
28082
|
-
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
28092
|
+
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind, skipNonSemanticJSDoc) {
|
|
28083
28093
|
var _a, _b, _c, _d;
|
|
28084
28094
|
(_a = tracing) == null ? void 0 : _a.push(
|
|
28085
28095
|
tracing.Phase.Parse,
|
|
@@ -28105,7 +28115,8 @@ ${lanes.join("\n")}
|
|
|
28105
28115
|
void 0,
|
|
28106
28116
|
setParentNodes,
|
|
28107
28117
|
6 /* JSON */,
|
|
28108
|
-
noop
|
|
28118
|
+
noop,
|
|
28119
|
+
skipNonSemanticJSDoc
|
|
28109
28120
|
);
|
|
28110
28121
|
} else {
|
|
28111
28122
|
const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
|
|
@@ -28120,7 +28131,8 @@ ${lanes.join("\n")}
|
|
|
28120
28131
|
void 0,
|
|
28121
28132
|
setParentNodes,
|
|
28122
28133
|
scriptKind,
|
|
28123
|
-
setIndicator
|
|
28134
|
+
setIndicator,
|
|
28135
|
+
skipNonSemanticJSDoc
|
|
28124
28136
|
);
|
|
28125
28137
|
}
|
|
28126
28138
|
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
@@ -28904,7 +28916,7 @@ ${lanes.join("\n")}
|
|
|
28904
28916
|
var contextFlags;
|
|
28905
28917
|
var topLevel = true;
|
|
28906
28918
|
var parseErrorBeforeNextFinishedNode = false;
|
|
28907
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) {
|
|
28919
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, skipNonSemanticJSDoc) {
|
|
28908
28920
|
var _a;
|
|
28909
28921
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
28910
28922
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -28926,8 +28938,9 @@ ${lanes.join("\n")}
|
|
|
28926
28938
|
result2.pragmas = emptyMap;
|
|
28927
28939
|
return result2;
|
|
28928
28940
|
}
|
|
28929
|
-
|
|
28930
|
-
|
|
28941
|
+
skipNonSemanticJSDoc = !!skipNonSemanticJSDoc && scriptKind2 !== 1 /* JS */ && scriptKind2 !== 2 /* JSX */;
|
|
28942
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, skipNonSemanticJSDoc);
|
|
28943
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
|
|
28931
28944
|
clearState();
|
|
28932
28945
|
return result;
|
|
28933
28946
|
}
|
|
@@ -28939,7 +28952,9 @@ ${lanes.join("\n")}
|
|
|
28939
28952
|
languageVersion2,
|
|
28940
28953
|
/*syntaxCursor*/
|
|
28941
28954
|
void 0,
|
|
28942
|
-
1 /* JS
|
|
28955
|
+
1 /* JS */,
|
|
28956
|
+
/*skipNonSemanticJSDoc*/
|
|
28957
|
+
false
|
|
28943
28958
|
);
|
|
28944
28959
|
nextToken();
|
|
28945
28960
|
const entityName = parseEntityName(
|
|
@@ -28952,7 +28967,15 @@ ${lanes.join("\n")}
|
|
|
28952
28967
|
}
|
|
28953
28968
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
28954
28969
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
28955
|
-
initializeState(
|
|
28970
|
+
initializeState(
|
|
28971
|
+
fileName2,
|
|
28972
|
+
sourceText2,
|
|
28973
|
+
languageVersion2,
|
|
28974
|
+
syntaxCursor2,
|
|
28975
|
+
6 /* JSON */,
|
|
28976
|
+
/*skipNonSemanticJSDoc*/
|
|
28977
|
+
false
|
|
28978
|
+
);
|
|
28956
28979
|
sourceFlags = contextFlags;
|
|
28957
28980
|
nextToken();
|
|
28958
28981
|
const pos = getNodePos();
|
|
@@ -29033,7 +29056,7 @@ ${lanes.join("\n")}
|
|
|
29033
29056
|
return result;
|
|
29034
29057
|
}
|
|
29035
29058
|
Parser2.parseJsonText = parseJsonText2;
|
|
29036
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) {
|
|
29059
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _skipNonSemanticJSDoc) {
|
|
29037
29060
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
29038
29061
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
29039
29062
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -29069,11 +29092,13 @@ ${lanes.join("\n")}
|
|
|
29069
29092
|
scanner2.setOnError(scanError);
|
|
29070
29093
|
scanner2.setScriptTarget(languageVersion);
|
|
29071
29094
|
scanner2.setLanguageVariant(languageVariant);
|
|
29095
|
+
scanner2.setSkipNonSemanticJSDoc(_skipNonSemanticJSDoc);
|
|
29072
29096
|
}
|
|
29073
29097
|
function clearState() {
|
|
29074
29098
|
scanner2.clearCommentDirectives();
|
|
29075
29099
|
scanner2.setText("");
|
|
29076
29100
|
scanner2.setOnError(void 0);
|
|
29101
|
+
scanner2.setSkipNonSemanticJSDoc(false);
|
|
29077
29102
|
sourceText = void 0;
|
|
29078
29103
|
languageVersion = void 0;
|
|
29079
29104
|
syntaxCursor = void 0;
|
|
@@ -29087,7 +29112,7 @@ ${lanes.join("\n")}
|
|
|
29087
29112
|
notParenthesizedArrow = void 0;
|
|
29088
29113
|
topLevel = true;
|
|
29089
29114
|
}
|
|
29090
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) {
|
|
29115
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, skipNonSemanticJSDoc) {
|
|
29091
29116
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
29092
29117
|
if (isDeclarationFile) {
|
|
29093
29118
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -29106,6 +29131,7 @@ ${lanes.join("\n")}
|
|
|
29106
29131
|
sourceFile.identifierCount = identifierCount;
|
|
29107
29132
|
sourceFile.identifiers = identifiers;
|
|
29108
29133
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
29134
|
+
sourceFile.skipNonSemanticJSDoc = skipNonSemanticJSDoc;
|
|
29109
29135
|
if (jsDocDiagnostics) {
|
|
29110
29136
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
29111
29137
|
}
|
|
@@ -34539,7 +34565,9 @@ ${lanes.join("\n")}
|
|
|
34539
34565
|
99 /* Latest */,
|
|
34540
34566
|
/*syntaxCursor*/
|
|
34541
34567
|
void 0,
|
|
34542
|
-
1 /* JS
|
|
34568
|
+
1 /* JS */,
|
|
34569
|
+
/*skipNonSemanticJSDoc*/
|
|
34570
|
+
false
|
|
34543
34571
|
);
|
|
34544
34572
|
scanner2.setText(content, start, length2);
|
|
34545
34573
|
currentToken = scanner2.scan();
|
|
@@ -34603,7 +34631,9 @@ ${lanes.join("\n")}
|
|
|
34603
34631
|
99 /* Latest */,
|
|
34604
34632
|
/*syntaxCursor*/
|
|
34605
34633
|
void 0,
|
|
34606
|
-
1 /* JS
|
|
34634
|
+
1 /* JS */,
|
|
34635
|
+
/*skipNonSemanticJSDoc*/
|
|
34636
|
+
false
|
|
34607
34637
|
);
|
|
34608
34638
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
|
|
34609
34639
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -35558,7 +35588,8 @@ ${lanes.join("\n")}
|
|
|
35558
35588
|
/*setParentNodes*/
|
|
35559
35589
|
true,
|
|
35560
35590
|
sourceFile.scriptKind,
|
|
35561
|
-
sourceFile.setExternalModuleIndicator
|
|
35591
|
+
sourceFile.setExternalModuleIndicator,
|
|
35592
|
+
sourceFile.skipNonSemanticJSDoc
|
|
35562
35593
|
);
|
|
35563
35594
|
}
|
|
35564
35595
|
const incrementalSourceFile = sourceFile;
|
|
@@ -35582,7 +35613,8 @@ ${lanes.join("\n")}
|
|
|
35582
35613
|
/*setParentNodes*/
|
|
35583
35614
|
true,
|
|
35584
35615
|
sourceFile.scriptKind,
|
|
35585
|
-
sourceFile.setExternalModuleIndicator
|
|
35616
|
+
sourceFile.setExternalModuleIndicator,
|
|
35617
|
+
sourceFile.skipNonSemanticJSDoc
|
|
35586
35618
|
);
|
|
35587
35619
|
result.commentDirectives = getNewCommentDirectives(
|
|
35588
35620
|
sourceFile.commentDirectives,
|
|
@@ -37443,7 +37475,7 @@ ${lanes.join("\n")}
|
|
|
37443
37475
|
return false;
|
|
37444
37476
|
}
|
|
37445
37477
|
for (const ext of extensionGroup) {
|
|
37446
|
-
if (fileExtensionIs(file, ext)) {
|
|
37478
|
+
if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
|
|
37447
37479
|
return false;
|
|
37448
37480
|
}
|
|
37449
37481
|
const higherPriorityPath = keyMapper(changeExtension(file, ext));
|
|
@@ -45933,20 +45965,30 @@ ${lanes.join("\n")}
|
|
|
45933
45965
|
typeHasCallOrConstructSignatures
|
|
45934
45966
|
};
|
|
45935
45967
|
function runWithoutResolvedSignatureCaching(node, fn) {
|
|
45936
|
-
const
|
|
45968
|
+
const cachedResolvedSignatures = [];
|
|
45969
|
+
const cachedTypes2 = [];
|
|
45937
45970
|
while (node) {
|
|
45938
|
-
if (isCallLikeExpression(node)) {
|
|
45971
|
+
if (isCallLikeExpression(node) || isFunctionLike(node)) {
|
|
45939
45972
|
const nodeLinks2 = getNodeLinks(node);
|
|
45940
45973
|
const resolvedSignature = nodeLinks2.resolvedSignature;
|
|
45941
|
-
|
|
45974
|
+
cachedResolvedSignatures.push([nodeLinks2, resolvedSignature]);
|
|
45942
45975
|
nodeLinks2.resolvedSignature = void 0;
|
|
45943
45976
|
}
|
|
45977
|
+
if (isFunctionLike(node)) {
|
|
45978
|
+
const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node));
|
|
45979
|
+
const type = symbolLinks2.type;
|
|
45980
|
+
cachedTypes2.push([symbolLinks2, type]);
|
|
45981
|
+
symbolLinks2.type = void 0;
|
|
45982
|
+
}
|
|
45944
45983
|
node = node.parent;
|
|
45945
45984
|
}
|
|
45946
45985
|
const result = fn();
|
|
45947
|
-
for (const [nodeLinks2, resolvedSignature] of
|
|
45986
|
+
for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) {
|
|
45948
45987
|
nodeLinks2.resolvedSignature = resolvedSignature;
|
|
45949
45988
|
}
|
|
45989
|
+
for (const [symbolLinks2, type] of cachedTypes2) {
|
|
45990
|
+
symbolLinks2.type = type;
|
|
45991
|
+
}
|
|
45950
45992
|
return result;
|
|
45951
45993
|
}
|
|
45952
45994
|
function runWithInferenceBlockedFromSourceNode(node, fn) {
|
|
@@ -45999,29 +46041,72 @@ ${lanes.join("\n")}
|
|
|
45999
46041
|
var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */);
|
|
46000
46042
|
var unresolvedSymbols = /* @__PURE__ */ new Map();
|
|
46001
46043
|
var errorTypes = /* @__PURE__ */ new Map();
|
|
46044
|
+
var seenIntrinsicNames = /* @__PURE__ */ new Set();
|
|
46002
46045
|
var anyType = createIntrinsicType(1 /* Any */, "any");
|
|
46003
|
-
var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType
|
|
46004
|
-
var wildcardType = createIntrinsicType(
|
|
46005
|
-
|
|
46046
|
+
var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto");
|
|
46047
|
+
var wildcardType = createIntrinsicType(
|
|
46048
|
+
1 /* Any */,
|
|
46049
|
+
"any",
|
|
46050
|
+
/*objectFlags*/
|
|
46051
|
+
void 0,
|
|
46052
|
+
"wildcard"
|
|
46053
|
+
);
|
|
46054
|
+
var blockedStringType = createIntrinsicType(
|
|
46055
|
+
1 /* Any */,
|
|
46056
|
+
"any",
|
|
46057
|
+
/*objectFlags*/
|
|
46058
|
+
void 0,
|
|
46059
|
+
"blocked string"
|
|
46060
|
+
);
|
|
46006
46061
|
var errorType = createIntrinsicType(1 /* Any */, "error");
|
|
46007
46062
|
var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
|
|
46008
|
-
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType
|
|
46063
|
+
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
|
|
46009
46064
|
var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
|
|
46010
46065
|
var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
|
|
46011
|
-
var nonNullUnknownType = createIntrinsicType(
|
|
46066
|
+
var nonNullUnknownType = createIntrinsicType(
|
|
46067
|
+
2 /* Unknown */,
|
|
46068
|
+
"unknown",
|
|
46069
|
+
/*objectFlags*/
|
|
46070
|
+
void 0,
|
|
46071
|
+
"non-null"
|
|
46072
|
+
);
|
|
46012
46073
|
var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
|
|
46013
|
-
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType
|
|
46014
|
-
var missingType = createIntrinsicType(
|
|
46074
|
+
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
|
|
46075
|
+
var missingType = createIntrinsicType(
|
|
46076
|
+
32768 /* Undefined */,
|
|
46077
|
+
"undefined",
|
|
46078
|
+
/*objectFlags*/
|
|
46079
|
+
void 0,
|
|
46080
|
+
"missing"
|
|
46081
|
+
);
|
|
46015
46082
|
var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType;
|
|
46016
|
-
var optionalType = createIntrinsicType(
|
|
46083
|
+
var optionalType = createIntrinsicType(
|
|
46084
|
+
32768 /* Undefined */,
|
|
46085
|
+
"undefined",
|
|
46086
|
+
/*objectFlags*/
|
|
46087
|
+
void 0,
|
|
46088
|
+
"optional"
|
|
46089
|
+
);
|
|
46017
46090
|
var nullType = createIntrinsicType(65536 /* Null */, "null");
|
|
46018
|
-
var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType
|
|
46091
|
+
var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening");
|
|
46019
46092
|
var stringType = createIntrinsicType(4 /* String */, "string");
|
|
46020
46093
|
var numberType = createIntrinsicType(8 /* Number */, "number");
|
|
46021
46094
|
var bigintType = createIntrinsicType(64 /* BigInt */, "bigint");
|
|
46022
|
-
var falseType = createIntrinsicType(
|
|
46095
|
+
var falseType = createIntrinsicType(
|
|
46096
|
+
512 /* BooleanLiteral */,
|
|
46097
|
+
"false",
|
|
46098
|
+
/*objectFlags*/
|
|
46099
|
+
void 0,
|
|
46100
|
+
"fresh"
|
|
46101
|
+
);
|
|
46023
46102
|
var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
|
|
46024
|
-
var trueType = createIntrinsicType(
|
|
46103
|
+
var trueType = createIntrinsicType(
|
|
46104
|
+
512 /* BooleanLiteral */,
|
|
46105
|
+
"true",
|
|
46106
|
+
/*objectFlags*/
|
|
46107
|
+
void 0,
|
|
46108
|
+
"fresh"
|
|
46109
|
+
);
|
|
46025
46110
|
var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
|
|
46026
46111
|
trueType.regularType = regularTrueType;
|
|
46027
46112
|
trueType.freshType = trueType;
|
|
@@ -46035,9 +46120,21 @@ ${lanes.join("\n")}
|
|
|
46035
46120
|
var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol");
|
|
46036
46121
|
var voidType = createIntrinsicType(16384 /* Void */, "void");
|
|
46037
46122
|
var neverType = createIntrinsicType(131072 /* Never */, "never");
|
|
46038
|
-
var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType
|
|
46039
|
-
var implicitNeverType = createIntrinsicType(
|
|
46040
|
-
|
|
46123
|
+
var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent");
|
|
46124
|
+
var implicitNeverType = createIntrinsicType(
|
|
46125
|
+
131072 /* Never */,
|
|
46126
|
+
"never",
|
|
46127
|
+
/*objectFlags*/
|
|
46128
|
+
void 0,
|
|
46129
|
+
"implicit"
|
|
46130
|
+
);
|
|
46131
|
+
var unreachableNeverType = createIntrinsicType(
|
|
46132
|
+
131072 /* Never */,
|
|
46133
|
+
"never",
|
|
46134
|
+
/*objectFlags*/
|
|
46135
|
+
void 0,
|
|
46136
|
+
"unreachable"
|
|
46137
|
+
);
|
|
46041
46138
|
var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object");
|
|
46042
46139
|
var stringOrNumberType = getUnionType([stringType, numberType]);
|
|
46043
46140
|
var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]);
|
|
@@ -46047,7 +46144,13 @@ ${lanes.join("\n")}
|
|
|
46047
46144
|
var numericStringType = getTemplateLiteralType(["", ""], [numberType]);
|
|
46048
46145
|
var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)");
|
|
46049
46146
|
var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)");
|
|
46050
|
-
var uniqueLiteralType = createIntrinsicType(
|
|
46147
|
+
var uniqueLiteralType = createIntrinsicType(
|
|
46148
|
+
131072 /* Never */,
|
|
46149
|
+
"never",
|
|
46150
|
+
/*objectFlags*/
|
|
46151
|
+
void 0,
|
|
46152
|
+
"unique literal"
|
|
46153
|
+
);
|
|
46051
46154
|
var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)");
|
|
46052
46155
|
var outofbandVarianceMarkerHandler;
|
|
46053
46156
|
var reportUnreliableMapper = makeFunctionTypeMapper((t) => {
|
|
@@ -49291,12 +49394,21 @@ ${lanes.join("\n")}
|
|
|
49291
49394
|
function createOriginType(flags) {
|
|
49292
49395
|
return new Type27(checker, flags);
|
|
49293
49396
|
}
|
|
49294
|
-
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None
|
|
49397
|
+
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {
|
|
49398
|
+
checkIntrinsicName(intrinsicName, debugIntrinsicName);
|
|
49295
49399
|
const type = createType(kind);
|
|
49296
49400
|
type.intrinsicName = intrinsicName;
|
|
49401
|
+
type.debugIntrinsicName = debugIntrinsicName;
|
|
49297
49402
|
type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */;
|
|
49298
49403
|
return type;
|
|
49299
49404
|
}
|
|
49405
|
+
function checkIntrinsicName(name, debug) {
|
|
49406
|
+
const key = `${name},${debug ?? ""}`;
|
|
49407
|
+
if (seenIntrinsicNames.has(key)) {
|
|
49408
|
+
Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`);
|
|
49409
|
+
}
|
|
49410
|
+
seenIntrinsicNames.add(key);
|
|
49411
|
+
}
|
|
49300
49412
|
function createObjectType(objectFlags, symbol) {
|
|
49301
49413
|
const type = createTypeWithSymbol(524288 /* Object */, symbol);
|
|
49302
49414
|
type.objectFlags = objectFlags;
|
|
@@ -51593,6 +51705,10 @@ ${lanes.join("\n")}
|
|
|
51593
51705
|
const type = checkExpression(name.expression);
|
|
51594
51706
|
return !!(type.flags & 402653316 /* StringLike */);
|
|
51595
51707
|
}
|
|
51708
|
+
if (isElementAccessExpression(name)) {
|
|
51709
|
+
const type = checkExpression(name.argumentExpression);
|
|
51710
|
+
return !!(type.flags & 402653316 /* StringLike */);
|
|
51711
|
+
}
|
|
51596
51712
|
return isStringLiteral(name);
|
|
51597
51713
|
}
|
|
51598
51714
|
function isSingleQuotedStringNamed(d) {
|
|
@@ -53028,6 +53144,7 @@ ${lanes.join("\n")}
|
|
|
53028
53144
|
if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {
|
|
53029
53145
|
serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */);
|
|
53030
53146
|
} else {
|
|
53147
|
+
const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
|
|
53031
53148
|
const statement = factory.createVariableStatement(
|
|
53032
53149
|
/*modifiers*/
|
|
53033
53150
|
void 0,
|
|
@@ -53038,7 +53155,7 @@ ${lanes.join("\n")}
|
|
|
53038
53155
|
void 0,
|
|
53039
53156
|
serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)
|
|
53040
53157
|
)
|
|
53041
|
-
],
|
|
53158
|
+
], flags)
|
|
53042
53159
|
);
|
|
53043
53160
|
addResult(
|
|
53044
53161
|
statement,
|
|
@@ -55958,13 +56075,14 @@ ${lanes.join("\n")}
|
|
|
55958
56075
|
const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
|
|
55959
56076
|
const paramSymbol = createSymbol(
|
|
55960
56077
|
1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
|
|
55961
|
-
paramName || `arg${i}
|
|
56078
|
+
paramName || `arg${i}`,
|
|
56079
|
+
isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
|
|
55962
56080
|
);
|
|
55963
56081
|
paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
55964
56082
|
params[i] = paramSymbol;
|
|
55965
56083
|
}
|
|
55966
56084
|
if (needsExtraRestElement) {
|
|
55967
|
-
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
|
|
56085
|
+
const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
|
|
55968
56086
|
restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
|
|
55969
56087
|
if (shorter === right) {
|
|
55970
56088
|
restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
|
|
@@ -56332,7 +56450,9 @@ ${lanes.join("\n")}
|
|
|
56332
56450
|
} else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
|
|
56333
56451
|
const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
|
|
56334
56452
|
const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
|
|
56335
|
-
const
|
|
56453
|
+
const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType);
|
|
56454
|
+
const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly));
|
|
56455
|
+
const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly);
|
|
56336
56456
|
indexInfos = appendIndexInfo(
|
|
56337
56457
|
indexInfos,
|
|
56338
56458
|
indexInfo,
|
|
@@ -57930,7 +58050,13 @@ ${lanes.join("\n")}
|
|
|
57930
58050
|
const id = getAliasId(symbol, typeArguments);
|
|
57931
58051
|
let errorType2 = errorTypes.get(id);
|
|
57932
58052
|
if (!errorType2) {
|
|
57933
|
-
errorType2 = createIntrinsicType(
|
|
58053
|
+
errorType2 = createIntrinsicType(
|
|
58054
|
+
1 /* Any */,
|
|
58055
|
+
"error",
|
|
58056
|
+
/*objectFlags*/
|
|
58057
|
+
void 0,
|
|
58058
|
+
`alias ${id}`
|
|
58059
|
+
);
|
|
57934
58060
|
errorType2.aliasSymbol = symbol;
|
|
57935
58061
|
errorType2.aliasTypeArguments = typeArguments;
|
|
57936
58062
|
errorTypes.set(id, errorType2);
|
|
@@ -59773,7 +59899,7 @@ ${lanes.join("\n")}
|
|
|
59773
59899
|
return autoType;
|
|
59774
59900
|
}
|
|
59775
59901
|
}
|
|
59776
|
-
const propType = getTypeOfSymbol(prop);
|
|
59902
|
+
const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
|
|
59777
59903
|
return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType;
|
|
59778
59904
|
}
|
|
59779
59905
|
if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) {
|
|
@@ -66914,7 +67040,7 @@ ${lanes.join("\n")}
|
|
|
66914
67040
|
function hasMatchingArgument(expression, reference) {
|
|
66915
67041
|
if (expression.arguments) {
|
|
66916
67042
|
for (const argument of expression.arguments) {
|
|
66917
|
-
if (isOrContainsMatchingReference(reference, argument)) {
|
|
67043
|
+
if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
|
|
66918
67044
|
return true;
|
|
66919
67045
|
}
|
|
66920
67046
|
}
|
|
@@ -68554,7 +68680,7 @@ ${lanes.join("\n")}
|
|
|
68554
68680
|
false
|
|
68555
68681
|
);
|
|
68556
68682
|
}
|
|
68557
|
-
if (strictNullChecks &&
|
|
68683
|
+
if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
|
|
68558
68684
|
type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
|
|
68559
68685
|
}
|
|
68560
68686
|
const access = getDiscriminantPropertyAccess(predicateArgument, type);
|
|
@@ -68644,7 +68770,7 @@ ${lanes.join("\n")}
|
|
|
68644
68770
|
if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) {
|
|
68645
68771
|
return getWriteTypeOfAccessors(location.parent.symbol);
|
|
68646
68772
|
}
|
|
68647
|
-
return getNonMissingTypeOfSymbol(symbol);
|
|
68773
|
+
return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol);
|
|
68648
68774
|
}
|
|
68649
68775
|
function getControlFlowContainer(node) {
|
|
68650
68776
|
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */);
|
|
@@ -83916,7 +84042,7 @@ ${lanes.join("\n")}
|
|
|
83916
84042
|
if (!symbol || !(symbol.flags & 16 /* Function */)) {
|
|
83917
84043
|
return false;
|
|
83918
84044
|
}
|
|
83919
|
-
return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ &&
|
|
84045
|
+
return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration));
|
|
83920
84046
|
}
|
|
83921
84047
|
function getPropertiesOfContainerFunction(node) {
|
|
83922
84048
|
const declaration = getParseTreeNode(node, isFunctionDeclaration);
|
|
@@ -84423,11 +84549,11 @@ ${lanes.join("\n")}
|
|
|
84423
84549
|
if (fileToDirective.has(file.path))
|
|
84424
84550
|
return;
|
|
84425
84551
|
fileToDirective.set(file.path, [key, mode]);
|
|
84426
|
-
for (const { fileName
|
|
84552
|
+
for (const { fileName } of file.referencedFiles) {
|
|
84427
84553
|
const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
|
|
84428
84554
|
const referencedFile = host.getSourceFile(resolvedFile);
|
|
84429
84555
|
if (referencedFile) {
|
|
84430
|
-
addReferencedFilesToTypeDirective(referencedFile, key,
|
|
84556
|
+
addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
|
|
84431
84557
|
}
|
|
84432
84558
|
}
|
|
84433
84559
|
}
|
|
@@ -110727,7 +110853,7 @@ ${lanes.join("\n")}
|
|
|
110727
110853
|
fakespace.symbol = props[0].parent;
|
|
110728
110854
|
const exportMappings = [];
|
|
110729
110855
|
let declarations = mapDefined(props, (p) => {
|
|
110730
|
-
if (!
|
|
110856
|
+
if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
|
|
110731
110857
|
return void 0;
|
|
110732
110858
|
}
|
|
110733
110859
|
const nameStr = unescapeLeadingUnderscores(p.escapedName);
|
|
@@ -117466,7 +117592,8 @@ ${lanes.join("\n")}
|
|
|
117466
117592
|
currentDirectory,
|
|
117467
117593
|
useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
|
|
117468
117594
|
writeLog,
|
|
117469
|
-
toPath: toPath3
|
|
117595
|
+
toPath: toPath3,
|
|
117596
|
+
getScriptKind: getScriptKind2
|
|
117470
117597
|
}) {
|
|
117471
117598
|
const newPath = removeIgnoredPath(fileOrDirectoryPath);
|
|
117472
117599
|
if (!newPath) {
|
|
@@ -117476,7 +117603,7 @@ ${lanes.join("\n")}
|
|
|
117476
117603
|
fileOrDirectoryPath = newPath;
|
|
117477
117604
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
117478
117605
|
return false;
|
|
117479
|
-
if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
117606
|
+
if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
|
|
117480
117607
|
writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
|
|
117481
117608
|
return true;
|
|
117482
117609
|
}
|
|
@@ -117505,6 +117632,25 @@ ${lanes.join("\n")}
|
|
|
117505
117632
|
function hasSourceFile(file) {
|
|
117506
117633
|
return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
|
|
117507
117634
|
}
|
|
117635
|
+
function isSupportedScriptKind() {
|
|
117636
|
+
if (!getScriptKind2)
|
|
117637
|
+
return false;
|
|
117638
|
+
const scriptKind = getScriptKind2(fileOrDirectory);
|
|
117639
|
+
switch (scriptKind) {
|
|
117640
|
+
case 3 /* TS */:
|
|
117641
|
+
case 4 /* TSX */:
|
|
117642
|
+
case 7 /* Deferred */:
|
|
117643
|
+
case 5 /* External */:
|
|
117644
|
+
return true;
|
|
117645
|
+
case 1 /* JS */:
|
|
117646
|
+
case 2 /* JSX */:
|
|
117647
|
+
return getAllowJSCompilerOption(options);
|
|
117648
|
+
case 6 /* JSON */:
|
|
117649
|
+
return getResolveJsonModule(options);
|
|
117650
|
+
case 0 /* Unknown */:
|
|
117651
|
+
return false;
|
|
117652
|
+
}
|
|
117653
|
+
}
|
|
117508
117654
|
}
|
|
117509
117655
|
function isBuilderProgram(program) {
|
|
117510
117656
|
return !!program.getState;
|
|
@@ -117688,7 +117834,7 @@ ${lanes.join("\n")}
|
|
|
117688
117834
|
function createCompilerHost(options, setParentNodes) {
|
|
117689
117835
|
return createCompilerHostWorker(options, setParentNodes);
|
|
117690
117836
|
}
|
|
117691
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
|
|
117837
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, skipNonSemanticJSDocParsing) {
|
|
117692
117838
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
117693
117839
|
let text;
|
|
117694
117840
|
try {
|
|
@@ -117702,7 +117848,15 @@ ${lanes.join("\n")}
|
|
|
117702
117848
|
}
|
|
117703
117849
|
text = "";
|
|
117704
117850
|
}
|
|
117705
|
-
return text !== void 0 ? createSourceFile(
|
|
117851
|
+
return text !== void 0 ? createSourceFile(
|
|
117852
|
+
fileName,
|
|
117853
|
+
text,
|
|
117854
|
+
languageVersionOrOptions,
|
|
117855
|
+
setParentNodes,
|
|
117856
|
+
/*scriptKind*/
|
|
117857
|
+
void 0,
|
|
117858
|
+
skipNonSemanticJSDocParsing
|
|
117859
|
+
) : void 0;
|
|
117706
117860
|
};
|
|
117707
117861
|
}
|
|
117708
117862
|
function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {
|
|
@@ -117726,7 +117880,7 @@ ${lanes.join("\n")}
|
|
|
117726
117880
|
}
|
|
117727
117881
|
};
|
|
117728
117882
|
}
|
|
117729
|
-
function createCompilerHostWorker(options, setParentNodes, system = sys) {
|
|
117883
|
+
function createCompilerHostWorker(options, setParentNodes, skipNonSemanticJSDocParsing, system = sys) {
|
|
117730
117884
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
117731
117885
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
117732
117886
|
function directoryExists(directoryPath) {
|
|
@@ -117745,7 +117899,7 @@ ${lanes.join("\n")}
|
|
|
117745
117899
|
const newLine = getNewLineCharacter(options);
|
|
117746
117900
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
117747
117901
|
const compilerHost = {
|
|
117748
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes),
|
|
117902
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes, skipNonSemanticJSDocParsing),
|
|
117749
117903
|
getDefaultLibLocation,
|
|
117750
117904
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
117751
117905
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -124888,7 +125042,8 @@ ${lanes.join("\n")}
|
|
|
124888
125042
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
124889
125043
|
getCompilerOptions,
|
|
124890
125044
|
/*setParentNodes*/
|
|
124891
|
-
void 0
|
|
125045
|
+
void 0,
|
|
125046
|
+
host.skipNonSemanticJSDocParsing
|
|
124892
125047
|
),
|
|
124893
125048
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
124894
125049
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -125115,11 +125270,12 @@ ${lanes.join("\n")}
|
|
|
125115
125270
|
return void 0;
|
|
125116
125271
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
125117
125272
|
}
|
|
125118
|
-
function createIncrementalCompilerHost(options, system = sys) {
|
|
125273
|
+
function createIncrementalCompilerHost(options, system = sys, skipNonSemanticJSDocParsing) {
|
|
125119
125274
|
const host = createCompilerHostWorker(
|
|
125120
125275
|
options,
|
|
125121
125276
|
/*setParentNodes*/
|
|
125122
125277
|
void 0,
|
|
125278
|
+
skipNonSemanticJSDocParsing,
|
|
125123
125279
|
system
|
|
125124
125280
|
);
|
|
125125
125281
|
host.createHash = maybeBind(system, system.createHash);
|
|
@@ -131604,7 +131760,7 @@ ${lanes.join("\n")}
|
|
|
131604
131760
|
}
|
|
131605
131761
|
};
|
|
131606
131762
|
if (Debug.isDebugging) {
|
|
131607
|
-
Object.defineProperty(cache, "__cache", {
|
|
131763
|
+
Object.defineProperty(cache, "__cache", { value: exportInfo });
|
|
131608
131764
|
}
|
|
131609
131765
|
return cache;
|
|
131610
131766
|
function rehydrateCachedInfo(info) {
|
|
@@ -131642,11 +131798,15 @@ ${lanes.join("\n")}
|
|
|
131642
131798
|
}
|
|
131643
131799
|
function key(importedName, symbol, ambientModuleName, checker) {
|
|
131644
131800
|
const moduleKey = ambientModuleName || "";
|
|
131645
|
-
return `${importedName}
|
|
131801
|
+
return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
|
|
131646
131802
|
}
|
|
131647
131803
|
function parseKey(key2) {
|
|
131648
|
-
const
|
|
131649
|
-
const
|
|
131804
|
+
const firstSpace = key2.indexOf(" ");
|
|
131805
|
+
const secondSpace = key2.indexOf(" ", firstSpace + 1);
|
|
131806
|
+
const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
|
|
131807
|
+
const data = key2.substring(secondSpace + 1);
|
|
131808
|
+
const symbolName2 = data.substring(0, symbolNameLength);
|
|
131809
|
+
const moduleKey = data.substring(symbolNameLength + 1);
|
|
131650
131810
|
const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
|
|
131651
131811
|
return { symbolName: symbolName2, ambientModuleName };
|
|
131652
131812
|
}
|
|
@@ -135079,7 +135239,14 @@ ${lanes.join("\n")}
|
|
|
135079
135239
|
}
|
|
135080
135240
|
}
|
|
135081
135241
|
function hasNavigationBarName(node) {
|
|
135082
|
-
|
|
135242
|
+
const name = getNameOfDeclaration(node);
|
|
135243
|
+
if (name === void 0)
|
|
135244
|
+
return false;
|
|
135245
|
+
if (isComputedPropertyName(name)) {
|
|
135246
|
+
const expression = name.expression;
|
|
135247
|
+
return isEntityNameExpression(expression) || isNumericLiteral(expression) || isStringOrNumericLiteralLike(expression);
|
|
135248
|
+
}
|
|
135249
|
+
return !!name;
|
|
135083
135250
|
}
|
|
135084
135251
|
function addChildrenRecursively(node) {
|
|
135085
135252
|
curCancellationToken.throwIfCancellationRequested();
|
|
@@ -169166,7 +169333,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169166
169333
|
// insert space after '?' only when it is used in conditional operator
|
|
169167
169334
|
rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
|
|
169168
169335
|
// in other cases there should be no space between '?' and next token
|
|
169169
|
-
rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
169336
|
+
rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */),
|
|
169170
169337
|
rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */),
|
|
169171
169338
|
rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
169172
169339
|
rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */),
|
|
@@ -169511,6 +169678,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169511
169678
|
const contextKind = context.contextNode.kind;
|
|
169512
169679
|
return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind);
|
|
169513
169680
|
}
|
|
169681
|
+
function isOptionalPropertyContext(context) {
|
|
169682
|
+
return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken;
|
|
169683
|
+
}
|
|
169684
|
+
function isNonOptionalPropertyContext(context) {
|
|
169685
|
+
return !isOptionalPropertyContext(context);
|
|
169686
|
+
}
|
|
169514
169687
|
function isConditionalOperatorContext(context) {
|
|
169515
169688
|
return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */;
|
|
169516
169689
|
}
|
|
@@ -173528,7 +173701,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
173528
173701
|
return scriptInfo;
|
|
173529
173702
|
}
|
|
173530
173703
|
getScriptKind(fileName) {
|
|
173531
|
-
const info = this.
|
|
173704
|
+
const info = this.projectService.getScriptInfoForPath(this.toPath(fileName));
|
|
173532
173705
|
return info && info.scriptKind;
|
|
173533
173706
|
}
|
|
173534
173707
|
getScriptVersion(filename) {
|
|
@@ -176349,7 +176522,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176349
176522
|
program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,
|
|
176350
176523
|
useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,
|
|
176351
176524
|
writeLog: (s) => this.logger.info(s),
|
|
176352
|
-
toPath: (s) => this.toPath(s)
|
|
176525
|
+
toPath: (s) => this.toPath(s),
|
|
176526
|
+
getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0
|
|
176353
176527
|
}))
|
|
176354
176528
|
return;
|
|
176355
176529
|
if (config.reloadLevel !== 2 /* Full */)
|
|
@@ -184463,6 +184637,7 @@ ${e.message}`;
|
|
|
184463
184637
|
isExclamationToken: () => isExclamationToken,
|
|
184464
184638
|
isExcludedFile: () => isExcludedFile,
|
|
184465
184639
|
isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
|
|
184640
|
+
isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
|
|
184466
184641
|
isExportAssignment: () => isExportAssignment,
|
|
184467
184642
|
isExportDeclaration: () => isExportDeclaration,
|
|
184468
184643
|
isExportModifier: () => isExportModifier,
|
|
@@ -186866,6 +187041,7 @@ ${e.message}`;
|
|
|
186866
187041
|
isExclamationToken: () => isExclamationToken,
|
|
186867
187042
|
isExcludedFile: () => isExcludedFile,
|
|
186868
187043
|
isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
|
|
187044
|
+
isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
|
|
186869
187045
|
isExportAssignment: () => isExportAssignment,
|
|
186870
187046
|
isExportDeclaration: () => isExportDeclaration,
|
|
186871
187047
|
isExportModifier: () => isExportModifier,
|