typescript 5.3.0-dev.20230921 → 5.3.0-dev.20230922
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 +88 -64
- package/lib/tsserver.js +124 -72
- package/lib/typescript.d.ts +37 -1
- package/lib/typescript.js +125 -74
- package/lib/typingsInstaller.js +45 -35
- 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.20230922`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3497,7 +3497,7 @@ ${lanes.join("\n")}
|
|
|
3497
3497
|
const name = DiagnosticCategory[d.category];
|
|
3498
3498
|
return lowerCase ? name.toLowerCase() : name;
|
|
3499
3499
|
}
|
|
3500
|
-
var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
|
|
3500
|
+
var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, JSDocParsingMode;
|
|
3501
3501
|
var init_types = __esm({
|
|
3502
3502
|
"src/compiler/types.ts"() {
|
|
3503
3503
|
"use strict";
|
|
@@ -5183,6 +5183,13 @@ ${lanes.join("\n")}
|
|
|
5183
5183
|
kind: 4 /* MultiLine */
|
|
5184
5184
|
}
|
|
5185
5185
|
};
|
|
5186
|
+
JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode7) => {
|
|
5187
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseAll"] = 0] = "ParseAll";
|
|
5188
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseNone"] = 1] = "ParseNone";
|
|
5189
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseForTypeErrors"] = 2] = "ParseForTypeErrors";
|
|
5190
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseForTypeInfo"] = 3] = "ParseForTypeInfo";
|
|
5191
|
+
return JSDocParsingMode7;
|
|
5192
|
+
})(JSDocParsingMode || {});
|
|
5186
5193
|
}
|
|
5187
5194
|
});
|
|
5188
5195
|
|
|
@@ -8991,7 +8998,7 @@ ${lanes.join("\n")}
|
|
|
8991
8998
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
8992
8999
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
8993
9000
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
8994
|
-
|
|
9001
|
+
Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
|
|
8995
9002
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
8996
9003
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
8997
9004
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -9582,7 +9589,8 @@ ${lanes.join("\n")}
|
|
|
9582
9589
|
var tokenFlags;
|
|
9583
9590
|
var commentDirectives;
|
|
9584
9591
|
var inJSDocType = 0;
|
|
9585
|
-
var
|
|
9592
|
+
var scriptKind = 0 /* Unknown */;
|
|
9593
|
+
var jsDocParsingMode = 0 /* ParseAll */;
|
|
9586
9594
|
setText(text, start, length2);
|
|
9587
9595
|
var scanner2 = {
|
|
9588
9596
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -9626,14 +9634,15 @@ ${lanes.join("\n")}
|
|
|
9626
9634
|
setText,
|
|
9627
9635
|
setScriptTarget,
|
|
9628
9636
|
setLanguageVariant,
|
|
9637
|
+
setScriptKind,
|
|
9638
|
+
setJSDocParsingMode,
|
|
9629
9639
|
setOnError,
|
|
9630
9640
|
resetTokenState,
|
|
9631
9641
|
setTextPos: resetTokenState,
|
|
9632
9642
|
setInJSDocType,
|
|
9633
9643
|
tryScan,
|
|
9634
9644
|
lookAhead,
|
|
9635
|
-
scanRange
|
|
9636
|
-
setSkipNonSemanticJSDoc
|
|
9645
|
+
scanRange
|
|
9637
9646
|
};
|
|
9638
9647
|
if (Debug.isDebugging) {
|
|
9639
9648
|
Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", {
|
|
@@ -10421,7 +10430,7 @@ ${lanes.join("\n")}
|
|
|
10421
10430
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
10422
10431
|
}
|
|
10423
10432
|
}
|
|
10424
|
-
if (isJSDoc2 && (
|
|
10433
|
+
if (isJSDoc2 && shouldParseJSDoc()) {
|
|
10425
10434
|
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
10426
10435
|
}
|
|
10427
10436
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
@@ -10680,6 +10689,21 @@ ${lanes.join("\n")}
|
|
|
10680
10689
|
}
|
|
10681
10690
|
}
|
|
10682
10691
|
}
|
|
10692
|
+
function shouldParseJSDoc() {
|
|
10693
|
+
switch (jsDocParsingMode) {
|
|
10694
|
+
case 0 /* ParseAll */:
|
|
10695
|
+
return true;
|
|
10696
|
+
case 1 /* ParseNone */:
|
|
10697
|
+
return false;
|
|
10698
|
+
}
|
|
10699
|
+
if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {
|
|
10700
|
+
return true;
|
|
10701
|
+
}
|
|
10702
|
+
if (jsDocParsingMode === 3 /* ParseForTypeInfo */) {
|
|
10703
|
+
return false;
|
|
10704
|
+
}
|
|
10705
|
+
return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));
|
|
10706
|
+
}
|
|
10683
10707
|
function reScanInvalidIdentifier() {
|
|
10684
10708
|
Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.");
|
|
10685
10709
|
pos = tokenStart = fullStartPos;
|
|
@@ -11094,8 +11118,11 @@ ${lanes.join("\n")}
|
|
|
11094
11118
|
function setLanguageVariant(variant) {
|
|
11095
11119
|
languageVariant = variant;
|
|
11096
11120
|
}
|
|
11097
|
-
function
|
|
11098
|
-
|
|
11121
|
+
function setScriptKind(kind) {
|
|
11122
|
+
scriptKind = kind;
|
|
11123
|
+
}
|
|
11124
|
+
function setJSDocParsingMode(kind) {
|
|
11125
|
+
jsDocParsingMode = kind;
|
|
11099
11126
|
}
|
|
11100
11127
|
function resetTokenState(position) {
|
|
11101
11128
|
Debug.assert(position >= 0);
|
|
@@ -11131,7 +11158,7 @@ ${lanes.join("\n")}
|
|
|
11131
11158
|
function utf16EncodeAsString(codePoint) {
|
|
11132
11159
|
return utf16EncodeAsStringWorker(codePoint);
|
|
11133
11160
|
}
|
|
11134
|
-
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine,
|
|
11161
|
+
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, jsDocSeeOrLink, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
|
|
11135
11162
|
var init_scanner = __esm({
|
|
11136
11163
|
"src/compiler/scanner.ts"() {
|
|
11137
11164
|
"use strict";
|
|
@@ -11294,7 +11321,7 @@ ${lanes.join("\n")}
|
|
|
11294
11321
|
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];
|
|
11295
11322
|
commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
11296
11323
|
commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
11297
|
-
|
|
11324
|
+
jsDocSeeOrLink = /@(?:see|link)/i;
|
|
11298
11325
|
tokenStrings = makeReverseMap(textToToken);
|
|
11299
11326
|
mergeConflictMarkerLength = "<<<<<<<".length;
|
|
11300
11327
|
shebangTriviaRegex = /^#!.*/;
|
|
@@ -28066,7 +28093,7 @@ ${lanes.join("\n")}
|
|
|
28066
28093
|
function setExternalModuleIndicator(sourceFile) {
|
|
28067
28094
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
28068
28095
|
}
|
|
28069
|
-
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind
|
|
28096
|
+
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
28070
28097
|
var _a, _b, _c, _d;
|
|
28071
28098
|
(_a = tracing) == null ? void 0 : _a.push(
|
|
28072
28099
|
tracing.Phase.Parse,
|
|
@@ -28081,7 +28108,8 @@ ${lanes.join("\n")}
|
|
|
28081
28108
|
const {
|
|
28082
28109
|
languageVersion,
|
|
28083
28110
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
28084
|
-
impliedNodeFormat: format
|
|
28111
|
+
impliedNodeFormat: format,
|
|
28112
|
+
jsDocParsingMode
|
|
28085
28113
|
} = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions };
|
|
28086
28114
|
if (languageVersion === 100 /* JSON */) {
|
|
28087
28115
|
result = Parser.parseSourceFile(
|
|
@@ -28093,7 +28121,7 @@ ${lanes.join("\n")}
|
|
|
28093
28121
|
setParentNodes,
|
|
28094
28122
|
6 /* JSON */,
|
|
28095
28123
|
noop,
|
|
28096
|
-
|
|
28124
|
+
jsDocParsingMode
|
|
28097
28125
|
);
|
|
28098
28126
|
} else {
|
|
28099
28127
|
const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
|
|
@@ -28109,7 +28137,7 @@ ${lanes.join("\n")}
|
|
|
28109
28137
|
setParentNodes,
|
|
28110
28138
|
scriptKind,
|
|
28111
28139
|
setIndicator,
|
|
28112
|
-
|
|
28140
|
+
jsDocParsingMode
|
|
28113
28141
|
);
|
|
28114
28142
|
}
|
|
28115
28143
|
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
@@ -28893,7 +28921,7 @@ ${lanes.join("\n")}
|
|
|
28893
28921
|
var contextFlags;
|
|
28894
28922
|
var topLevel = true;
|
|
28895
28923
|
var parseErrorBeforeNextFinishedNode = false;
|
|
28896
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride,
|
|
28924
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) {
|
|
28897
28925
|
var _a;
|
|
28898
28926
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
28899
28927
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -28915,9 +28943,8 @@ ${lanes.join("\n")}
|
|
|
28915
28943
|
result2.pragmas = emptyMap;
|
|
28916
28944
|
return result2;
|
|
28917
28945
|
}
|
|
28918
|
-
|
|
28919
|
-
|
|
28920
|
-
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
|
|
28946
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);
|
|
28947
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);
|
|
28921
28948
|
clearState();
|
|
28922
28949
|
return result;
|
|
28923
28950
|
}
|
|
@@ -28930,8 +28957,7 @@ ${lanes.join("\n")}
|
|
|
28930
28957
|
/*syntaxCursor*/
|
|
28931
28958
|
void 0,
|
|
28932
28959
|
1 /* JS */,
|
|
28933
|
-
/*
|
|
28934
|
-
false
|
|
28960
|
+
0 /* ParseAll */
|
|
28935
28961
|
);
|
|
28936
28962
|
nextToken();
|
|
28937
28963
|
const entityName = parseEntityName(
|
|
@@ -28944,15 +28970,7 @@ ${lanes.join("\n")}
|
|
|
28944
28970
|
}
|
|
28945
28971
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
28946
28972
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
28947
|
-
initializeState(
|
|
28948
|
-
fileName2,
|
|
28949
|
-
sourceText2,
|
|
28950
|
-
languageVersion2,
|
|
28951
|
-
syntaxCursor2,
|
|
28952
|
-
6 /* JSON */,
|
|
28953
|
-
/*skipNonSemanticJSDoc*/
|
|
28954
|
-
false
|
|
28955
|
-
);
|
|
28973
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */);
|
|
28956
28974
|
sourceFlags = contextFlags;
|
|
28957
28975
|
nextToken();
|
|
28958
28976
|
const pos = getNodePos();
|
|
@@ -29033,7 +29051,7 @@ ${lanes.join("\n")}
|
|
|
29033
29051
|
return result;
|
|
29034
29052
|
}
|
|
29035
29053
|
Parser2.parseJsonText = parseJsonText2;
|
|
29036
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind,
|
|
29054
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
|
|
29037
29055
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
29038
29056
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
29039
29057
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -29069,13 +29087,15 @@ ${lanes.join("\n")}
|
|
|
29069
29087
|
scanner2.setOnError(scanError);
|
|
29070
29088
|
scanner2.setScriptTarget(languageVersion);
|
|
29071
29089
|
scanner2.setLanguageVariant(languageVariant);
|
|
29072
|
-
scanner2.
|
|
29090
|
+
scanner2.setScriptKind(scriptKind);
|
|
29091
|
+
scanner2.setJSDocParsingMode(_jsDocParsingMode);
|
|
29073
29092
|
}
|
|
29074
29093
|
function clearState() {
|
|
29075
29094
|
scanner2.clearCommentDirectives();
|
|
29076
29095
|
scanner2.setText("");
|
|
29077
29096
|
scanner2.setOnError(void 0);
|
|
29078
|
-
scanner2.
|
|
29097
|
+
scanner2.setScriptKind(0 /* Unknown */);
|
|
29098
|
+
scanner2.setJSDocParsingMode(0 /* ParseAll */);
|
|
29079
29099
|
sourceText = void 0;
|
|
29080
29100
|
languageVersion = void 0;
|
|
29081
29101
|
syntaxCursor = void 0;
|
|
@@ -29089,7 +29109,7 @@ ${lanes.join("\n")}
|
|
|
29089
29109
|
notParenthesizedArrow = void 0;
|
|
29090
29110
|
topLevel = true;
|
|
29091
29111
|
}
|
|
29092
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2,
|
|
29112
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
|
|
29093
29113
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
29094
29114
|
if (isDeclarationFile) {
|
|
29095
29115
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -29108,7 +29128,7 @@ ${lanes.join("\n")}
|
|
|
29108
29128
|
sourceFile.identifierCount = identifierCount;
|
|
29109
29129
|
sourceFile.identifiers = identifiers;
|
|
29110
29130
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
29111
|
-
sourceFile.
|
|
29131
|
+
sourceFile.jsDocParsingMode = jsDocParsingMode;
|
|
29112
29132
|
if (jsDocDiagnostics) {
|
|
29113
29133
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
29114
29134
|
}
|
|
@@ -34543,8 +34563,7 @@ ${lanes.join("\n")}
|
|
|
34543
34563
|
/*syntaxCursor*/
|
|
34544
34564
|
void 0,
|
|
34545
34565
|
1 /* JS */,
|
|
34546
|
-
/*
|
|
34547
|
-
false
|
|
34566
|
+
0 /* ParseAll */
|
|
34548
34567
|
);
|
|
34549
34568
|
scanner2.setText(content, start, length2);
|
|
34550
34569
|
currentToken = scanner2.scan();
|
|
@@ -34609,8 +34628,7 @@ ${lanes.join("\n")}
|
|
|
34609
34628
|
/*syntaxCursor*/
|
|
34610
34629
|
void 0,
|
|
34611
34630
|
1 /* JS */,
|
|
34612
|
-
/*
|
|
34613
|
-
false
|
|
34631
|
+
0 /* ParseAll */
|
|
34614
34632
|
);
|
|
34615
34633
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
|
|
34616
34634
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -35566,7 +35584,7 @@ ${lanes.join("\n")}
|
|
|
35566
35584
|
true,
|
|
35567
35585
|
sourceFile.scriptKind,
|
|
35568
35586
|
sourceFile.setExternalModuleIndicator,
|
|
35569
|
-
sourceFile.
|
|
35587
|
+
sourceFile.jsDocParsingMode
|
|
35570
35588
|
);
|
|
35571
35589
|
}
|
|
35572
35590
|
const incrementalSourceFile = sourceFile;
|
|
@@ -35591,7 +35609,7 @@ ${lanes.join("\n")}
|
|
|
35591
35609
|
true,
|
|
35592
35610
|
sourceFile.scriptKind,
|
|
35593
35611
|
sourceFile.setExternalModuleIndicator,
|
|
35594
|
-
sourceFile.
|
|
35612
|
+
sourceFile.jsDocParsingMode
|
|
35595
35613
|
);
|
|
35596
35614
|
result.commentDirectives = getNewCommentDirectives(
|
|
35597
35615
|
sourceFile.commentDirectives,
|
|
@@ -40620,7 +40638,9 @@ ${lanes.join("\n")}
|
|
|
40620
40638
|
extensionsToExtensionsArray(extensions),
|
|
40621
40639
|
/*excludes*/
|
|
40622
40640
|
void 0,
|
|
40623
|
-
[
|
|
40641
|
+
[
|
|
40642
|
+
isDeclarationFileName(target) ? target.replace("*", "**/*") : changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))
|
|
40643
|
+
]
|
|
40624
40644
|
).forEach((entry) => {
|
|
40625
40645
|
entrypoints = appendIfUnique(entrypoints, {
|
|
40626
40646
|
path: entry,
|
|
@@ -55670,7 +55690,28 @@ ${lanes.join("\n")}
|
|
|
55670
55690
|
}
|
|
55671
55691
|
}
|
|
55672
55692
|
}
|
|
55673
|
-
|
|
55693
|
+
let resolved = combineSymbolTables(earlySymbols, lateSymbols);
|
|
55694
|
+
if (symbol.flags & 33554432 /* Transient */ && links.cjsExportMerged && symbol.declarations) {
|
|
55695
|
+
for (const decl of symbol.declarations) {
|
|
55696
|
+
const original = getSymbolLinks(decl.symbol)[resolutionKind];
|
|
55697
|
+
if (!resolved) {
|
|
55698
|
+
resolved = original;
|
|
55699
|
+
continue;
|
|
55700
|
+
}
|
|
55701
|
+
if (!original)
|
|
55702
|
+
continue;
|
|
55703
|
+
original.forEach((s, name) => {
|
|
55704
|
+
const existing = resolved.get(name);
|
|
55705
|
+
if (!existing)
|
|
55706
|
+
resolved.set(name, s);
|
|
55707
|
+
else if (existing === s)
|
|
55708
|
+
return;
|
|
55709
|
+
else
|
|
55710
|
+
resolved.set(name, mergeSymbol(existing, s));
|
|
55711
|
+
});
|
|
55712
|
+
}
|
|
55713
|
+
}
|
|
55714
|
+
links[resolutionKind] = resolved || emptySymbols;
|
|
55674
55715
|
}
|
|
55675
55716
|
return links[resolutionKind];
|
|
55676
55717
|
}
|
|
@@ -117858,7 +117899,7 @@ ${lanes.join("\n")}
|
|
|
117858
117899
|
function createCompilerHost(options, setParentNodes) {
|
|
117859
117900
|
return createCompilerHostWorker(options, setParentNodes);
|
|
117860
117901
|
}
|
|
117861
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes
|
|
117902
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
|
|
117862
117903
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
117863
117904
|
let text;
|
|
117864
117905
|
try {
|
|
@@ -117872,15 +117913,7 @@ ${lanes.join("\n")}
|
|
|
117872
117913
|
}
|
|
117873
117914
|
text = "";
|
|
117874
117915
|
}
|
|
117875
|
-
return text !== void 0 ? createSourceFile(
|
|
117876
|
-
fileName,
|
|
117877
|
-
text,
|
|
117878
|
-
languageVersionOrOptions,
|
|
117879
|
-
setParentNodes,
|
|
117880
|
-
/*scriptKind*/
|
|
117881
|
-
void 0,
|
|
117882
|
-
skipNonSemanticJSDocParsing
|
|
117883
|
-
) : void 0;
|
|
117916
|
+
return text !== void 0 ? createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : void 0;
|
|
117884
117917
|
};
|
|
117885
117918
|
}
|
|
117886
117919
|
function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {
|
|
@@ -117904,7 +117937,7 @@ ${lanes.join("\n")}
|
|
|
117904
117937
|
}
|
|
117905
117938
|
};
|
|
117906
117939
|
}
|
|
117907
|
-
function createCompilerHostWorker(options, setParentNodes,
|
|
117940
|
+
function createCompilerHostWorker(options, setParentNodes, system = sys) {
|
|
117908
117941
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
117909
117942
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
117910
117943
|
function directoryExists(directoryPath) {
|
|
@@ -117923,7 +117956,7 @@ ${lanes.join("\n")}
|
|
|
117923
117956
|
const newLine = getNewLineCharacter(options);
|
|
117924
117957
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
117925
117958
|
const compilerHost = {
|
|
117926
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes
|
|
117959
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes),
|
|
117927
117960
|
getDefaultLibLocation,
|
|
117928
117961
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
117929
117962
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -120185,7 +120218,7 @@ ${lanes.join("\n")}
|
|
|
120185
120218
|
const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2);
|
|
120186
120219
|
const languageVersion = getEmitScriptTarget(options2);
|
|
120187
120220
|
const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
|
|
120188
|
-
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 };
|
|
120221
|
+
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
|
|
120189
120222
|
}
|
|
120190
120223
|
function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
120191
120224
|
var _a2;
|
|
@@ -125060,8 +125093,7 @@ ${lanes.join("\n")}
|
|
|
125060
125093
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
125061
125094
|
getCompilerOptions,
|
|
125062
125095
|
/*setParentNodes*/
|
|
125063
|
-
void 0
|
|
125064
|
-
host.skipNonSemanticJSDocParsing
|
|
125096
|
+
void 0
|
|
125065
125097
|
),
|
|
125066
125098
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
125067
125099
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -125083,7 +125115,8 @@ ${lanes.join("\n")}
|
|
|
125083
125115
|
getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""),
|
|
125084
125116
|
createHash: maybeBind(host, host.createHash),
|
|
125085
125117
|
readDirectory: maybeBind(host, host.readDirectory),
|
|
125086
|
-
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit
|
|
125118
|
+
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
125119
|
+
jsDocParsingMode: host.jsDocParsingMode
|
|
125087
125120
|
};
|
|
125088
125121
|
return compilerHost;
|
|
125089
125122
|
}
|
|
@@ -125288,12 +125321,11 @@ ${lanes.join("\n")}
|
|
|
125288
125321
|
return void 0;
|
|
125289
125322
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
125290
125323
|
}
|
|
125291
|
-
function createIncrementalCompilerHost(options, system = sys
|
|
125324
|
+
function createIncrementalCompilerHost(options, system = sys) {
|
|
125292
125325
|
const host = createCompilerHostWorker(
|
|
125293
125326
|
options,
|
|
125294
125327
|
/*setParentNodes*/
|
|
125295
125328
|
void 0,
|
|
125296
|
-
skipNonSemanticJSDocParsing,
|
|
125297
125329
|
system
|
|
125298
125330
|
);
|
|
125299
125331
|
host.createHash = maybeBind(system, system.createHash);
|
|
@@ -133395,10 +133427,10 @@ ${lanes.join("\n")}
|
|
|
133395
133427
|
function isDocumentRegistryEntry(entry) {
|
|
133396
133428
|
return !!entry.sourceFile;
|
|
133397
133429
|
}
|
|
133398
|
-
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
133399
|
-
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
133430
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) {
|
|
133431
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode);
|
|
133400
133432
|
}
|
|
133401
|
-
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
133433
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) {
|
|
133402
133434
|
const buckets = /* @__PURE__ */ new Map();
|
|
133403
133435
|
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
133404
133436
|
function reportStats() {
|
|
@@ -133482,9 +133514,11 @@ ${lanes.join("\n")}
|
|
|
133482
133514
|
const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
|
|
133483
133515
|
languageVersion: scriptTarget,
|
|
133484
133516
|
impliedNodeFormat: host && getImpliedNodeFormatForFile(path, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),
|
|
133485
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings)
|
|
133517
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
|
|
133518
|
+
jsDocParsingMode
|
|
133486
133519
|
};
|
|
133487
133520
|
sourceFileOptions.languageVersion = scriptTarget;
|
|
133521
|
+
Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode);
|
|
133488
133522
|
const oldBucketCount = buckets.size;
|
|
133489
133523
|
const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat);
|
|
133490
133524
|
const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map());
|
|
@@ -134939,7 +134973,8 @@ ${lanes.join("\n")}
|
|
|
134939
134973
|
compilerHost,
|
|
134940
134974
|
options
|
|
134941
134975
|
),
|
|
134942
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(options)
|
|
134976
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(options),
|
|
134977
|
+
jsDocParsingMode: 1 /* ParseNone */
|
|
134943
134978
|
}
|
|
134944
134979
|
);
|
|
134945
134980
|
if (transpileOptions.moduleName) {
|
|
@@ -139113,12 +139148,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
139113
139148
|
const { file, startPosition } = context;
|
|
139114
139149
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
139115
139150
|
const maybeBinary = getParentBinaryExpression(node);
|
|
139151
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
139116
139152
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
139117
|
-
if (
|
|
139153
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
139154
|
+
return emptyArray;
|
|
139155
|
+
}
|
|
139156
|
+
if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
|
|
139118
139157
|
refactorInfo.actions.push(convertStringAction);
|
|
139119
139158
|
return [refactorInfo];
|
|
139120
139159
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
139121
|
-
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
139160
|
+
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });
|
|
139122
139161
|
return [refactorInfo];
|
|
139123
139162
|
}
|
|
139124
139163
|
return emptyArray;
|
|
@@ -141850,7 +141889,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141850
141889
|
const options = {
|
|
141851
141890
|
languageVersion: sourceFile.languageVersion,
|
|
141852
141891
|
impliedNodeFormat: sourceFile.impliedNodeFormat,
|
|
141853
|
-
setExternalModuleIndicator: sourceFile.setExternalModuleIndicator
|
|
141892
|
+
setExternalModuleIndicator: sourceFile.setExternalModuleIndicator,
|
|
141893
|
+
jsDocParsingMode: sourceFile.jsDocParsingMode
|
|
141854
141894
|
};
|
|
141855
141895
|
return createLanguageServiceSourceFile(
|
|
141856
141896
|
sourceFile.fileName,
|
|
@@ -141968,7 +142008,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141968
142008
|
resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences),
|
|
141969
142009
|
resolveLibrary: maybeBind(host, host.resolveLibrary),
|
|
141970
142010
|
useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),
|
|
141971
|
-
getParsedCommandLine
|
|
142011
|
+
getParsedCommandLine,
|
|
142012
|
+
jsDocParsingMode: host.jsDocParsingMode
|
|
141972
142013
|
};
|
|
141973
142014
|
const originalGetSourceFile = compilerHost.getSourceFile;
|
|
141974
142015
|
const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache(
|
|
@@ -143697,7 +143738,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
143697
143738
|
this.host,
|
|
143698
143739
|
this.host.getCompilationSettings()
|
|
143699
143740
|
),
|
|
143700
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings())
|
|
143741
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()),
|
|
143742
|
+
// These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll.
|
|
143743
|
+
jsDocParsingMode: 0 /* ParseAll */
|
|
143701
143744
|
};
|
|
143702
143745
|
sourceFile = createLanguageServiceSourceFile(
|
|
143703
143746
|
fileName,
|
|
@@ -143963,6 +144006,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
143963
144006
|
return map(typeDirectiveNames, (name) => getProperty(typeDirectivesForFile, isString(name) ? name : toFileNameLowerCase(name.fileName)));
|
|
143964
144007
|
};
|
|
143965
144008
|
}
|
|
144009
|
+
if ("jsDocParsingMode" in this.shimHost) {
|
|
144010
|
+
this.jsDocParsingMode = this.shimHost.jsDocParsingMode;
|
|
144011
|
+
}
|
|
143966
144012
|
}
|
|
143967
144013
|
log(s) {
|
|
143968
144014
|
if (this.loggingEnabled) {
|
|
@@ -160355,8 +160401,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160355
160401
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries };
|
|
160356
160402
|
}
|
|
160357
160403
|
case 2 /* Types */: {
|
|
160404
|
+
const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), "'") ? 39 /* singleQuote */ : 34 /* doubleQuote */;
|
|
160358
160405
|
const entries = completion.types.map((type) => ({
|
|
160359
|
-
name: type.value,
|
|
160406
|
+
name: escapeString(type.value, quoteChar),
|
|
160360
160407
|
kindModifiers: "" /* none */,
|
|
160361
160408
|
kind: "string" /* string */,
|
|
160362
160409
|
sortText: SortText.LocationPriority,
|
|
@@ -169059,7 +169106,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169059
169106
|
const sourceFile = createSourceFile(
|
|
169060
169107
|
"any file name",
|
|
169061
169108
|
nonFormattedText,
|
|
169062
|
-
99 /* ESNext */,
|
|
169109
|
+
{ languageVersion: 99 /* ESNext */, jsDocParsingMode: 1 /* ParseNone */ },
|
|
169063
169110
|
/*setParentNodes*/
|
|
169064
169111
|
true,
|
|
169065
169112
|
scriptKind
|
|
@@ -173878,6 +173925,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
173878
173925
|
this.directoryStructureHost = directoryStructureHost;
|
|
173879
173926
|
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
|
|
173880
173927
|
this.getCanonicalFileName = this.projectService.toCanonicalFileName;
|
|
173928
|
+
this.jsDocParsingMode = this.projectService.jsDocParsingMode;
|
|
173881
173929
|
this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
|
|
173882
173930
|
if (!this.compilerOptions) {
|
|
173883
173931
|
this.compilerOptions = getDefaultCompilerOptions2();
|
|
@@ -176441,6 +176489,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176441
176489
|
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
|
|
176442
176490
|
this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
|
|
176443
176491
|
this.session = opts.session;
|
|
176492
|
+
this.jsDocParsingMode = opts.jsDocParsingMode;
|
|
176444
176493
|
if (opts.serverMode !== void 0) {
|
|
176445
176494
|
this.serverMode = opts.serverMode;
|
|
176446
176495
|
} else {
|
|
@@ -176466,7 +176515,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176466
176515
|
hostInfo: "Unknown host",
|
|
176467
176516
|
extraFileExtensions: []
|
|
176468
176517
|
};
|
|
176469
|
-
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this);
|
|
176518
|
+
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this);
|
|
176470
176519
|
const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;
|
|
176471
176520
|
const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;
|
|
176472
176521
|
this.packageJsonCache = createPackageJsonCache(this);
|
|
@@ -183758,6 +183807,7 @@ ${e.message}`;
|
|
|
183758
183807
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
183759
183808
|
InternalSymbolName: () => InternalSymbolName,
|
|
183760
183809
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
183810
|
+
JSDocParsingMode: () => JSDocParsingMode,
|
|
183761
183811
|
JsDoc: () => ts_JsDoc_exports,
|
|
183762
183812
|
JsTyping: () => ts_JsTyping_exports,
|
|
183763
183813
|
JsxEmit: () => JsxEmit,
|
|
@@ -186157,6 +186207,7 @@ ${e.message}`;
|
|
|
186157
186207
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
186158
186208
|
InternalSymbolName: () => InternalSymbolName,
|
|
186159
186209
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
186210
|
+
JSDocParsingMode: () => JSDocParsingMode,
|
|
186160
186211
|
JsDoc: () => ts_JsDoc_exports,
|
|
186161
186212
|
JsTyping: () => ts_JsTyping_exports,
|
|
186162
186213
|
JsxEmit: () => JsxEmit,
|