@typescript-deploys/pr-build 5.3.0-pr-55600-27 → 5.3.0-pr-55856-6
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 +413 -1223
- package/lib/tsserver.js +636 -1307
- package/lib/typescript.d.ts +94 -19
- package/lib/typescript.js +636 -1308
- package/lib/typingsInstaller.js +124 -1042
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -103,6 +103,7 @@ __export(server_exports, {
|
|
|
103
103
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
104
104
|
InternalSymbolName: () => InternalSymbolName,
|
|
105
105
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
106
|
+
JSDocParsingMode: () => JSDocParsingMode,
|
|
106
107
|
JsDoc: () => ts_JsDoc_exports,
|
|
107
108
|
JsTyping: () => ts_JsTyping_exports,
|
|
108
109
|
JsxEmit: () => JsxEmit,
|
|
@@ -147,7 +148,6 @@ __export(server_exports, {
|
|
|
147
148
|
PrivateIdentifierKind: () => PrivateIdentifierKind,
|
|
148
149
|
ProcessLevel: () => ProcessLevel,
|
|
149
150
|
QuotePreference: () => QuotePreference,
|
|
150
|
-
RegularExpressionFlags: () => RegularExpressionFlags,
|
|
151
151
|
RelationComparisonResult: () => RelationComparisonResult,
|
|
152
152
|
Rename: () => ts_Rename_exports,
|
|
153
153
|
ScriptElementKind: () => ScriptElementKind,
|
|
@@ -274,7 +274,6 @@ __export(server_exports, {
|
|
|
274
274
|
changeExtension: () => changeExtension,
|
|
275
275
|
changesAffectModuleResolution: () => changesAffectModuleResolution,
|
|
276
276
|
changesAffectingProgramStructure: () => changesAffectingProgramStructure,
|
|
277
|
-
characterToRegularExpressionFlag: () => characterToRegularExpressionFlag,
|
|
278
277
|
childIsDecorated: () => childIsDecorated,
|
|
279
278
|
classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,
|
|
280
279
|
classHasClassThisAssignment: () => classHasClassThisAssignment,
|
|
@@ -432,6 +431,7 @@ __export(server_exports, {
|
|
|
432
431
|
createModuleNotFoundChain: () => createModuleNotFoundChain,
|
|
433
432
|
createModuleResolutionCache: () => createModuleResolutionCache,
|
|
434
433
|
createModuleResolutionLoader: () => createModuleResolutionLoader,
|
|
434
|
+
createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache,
|
|
435
435
|
createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,
|
|
436
436
|
createMultiMap: () => createMultiMap,
|
|
437
437
|
createNodeConverters: () => createNodeConverters,
|
|
@@ -860,6 +860,7 @@ __export(server_exports, {
|
|
|
860
860
|
getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,
|
|
861
861
|
getLeftmostAccessExpression: () => getLeftmostAccessExpression,
|
|
862
862
|
getLeftmostExpression: () => getLeftmostExpression,
|
|
863
|
+
getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,
|
|
863
864
|
getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,
|
|
864
865
|
getLineInfo: () => getLineInfo,
|
|
865
866
|
getLineOfLocalPosition: () => getLineOfLocalPosition,
|
|
@@ -1254,6 +1255,7 @@ __export(server_exports, {
|
|
|
1254
1255
|
isClassDeclaration: () => isClassDeclaration,
|
|
1255
1256
|
isClassElement: () => isClassElement,
|
|
1256
1257
|
isClassExpression: () => isClassExpression,
|
|
1258
|
+
isClassFieldAndNotAutoAccessor: () => isClassFieldAndNotAutoAccessor,
|
|
1257
1259
|
isClassLike: () => isClassLike,
|
|
1258
1260
|
isClassMemberModifier: () => isClassMemberModifier,
|
|
1259
1261
|
isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock,
|
|
@@ -2031,7 +2033,6 @@ __export(server_exports, {
|
|
|
2031
2033
|
reducePathComponents: () => reducePathComponents,
|
|
2032
2034
|
refactor: () => ts_refactor_exports,
|
|
2033
2035
|
regExpEscape: () => regExpEscape,
|
|
2034
|
-
regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter,
|
|
2035
2036
|
relativeComplement: () => relativeComplement,
|
|
2036
2037
|
removeAllComments: () => removeAllComments,
|
|
2037
2038
|
removeEmitHelper: () => removeEmitHelper,
|
|
@@ -2326,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2326
2327
|
|
|
2327
2328
|
// src/compiler/corePublic.ts
|
|
2328
2329
|
var versionMajorMinor = "5.3";
|
|
2329
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-insiders.20230925`;
|
|
2330
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2331
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2332
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6238,20 +6239,6 @@ var GeneratedIdentifierFlags = /* @__PURE__ */ ((GeneratedIdentifierFlags2) => {
|
|
|
6238
6239
|
GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["AllowNameSubstitution"] = 64] = "AllowNameSubstitution";
|
|
6239
6240
|
return GeneratedIdentifierFlags2;
|
|
6240
6241
|
})(GeneratedIdentifierFlags || {});
|
|
6241
|
-
var RegularExpressionFlags = /* @__PURE__ */ ((RegularExpressionFlags2) => {
|
|
6242
|
-
RegularExpressionFlags2[RegularExpressionFlags2["None"] = 0] = "None";
|
|
6243
|
-
RegularExpressionFlags2[RegularExpressionFlags2["HasIndices"] = 1] = "HasIndices";
|
|
6244
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Global"] = 2] = "Global";
|
|
6245
|
-
RegularExpressionFlags2[RegularExpressionFlags2["IgnoreCase"] = 4] = "IgnoreCase";
|
|
6246
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Multiline"] = 8] = "Multiline";
|
|
6247
|
-
RegularExpressionFlags2[RegularExpressionFlags2["DotAll"] = 16] = "DotAll";
|
|
6248
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Unicode"] = 32] = "Unicode";
|
|
6249
|
-
RegularExpressionFlags2[RegularExpressionFlags2["UnicodeSets"] = 64] = "UnicodeSets";
|
|
6250
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Sticky"] = 128] = "Sticky";
|
|
6251
|
-
RegularExpressionFlags2[RegularExpressionFlags2["UnicodeMode"] = 96] = "UnicodeMode";
|
|
6252
|
-
RegularExpressionFlags2[RegularExpressionFlags2["Modifiers"] = 28] = "Modifiers";
|
|
6253
|
-
return RegularExpressionFlags2;
|
|
6254
|
-
})(RegularExpressionFlags || {});
|
|
6255
6242
|
var TokenFlags = /* @__PURE__ */ ((TokenFlags2) => {
|
|
6256
6243
|
TokenFlags2[TokenFlags2["None"] = 0] = "None";
|
|
6257
6244
|
TokenFlags2[TokenFlags2["PrecedingLineBreak"] = 1] = "PrecedingLineBreak";
|
|
@@ -6960,8 +6947,6 @@ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => {
|
|
|
6960
6947
|
ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020";
|
|
6961
6948
|
ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021";
|
|
6962
6949
|
ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022";
|
|
6963
|
-
ScriptTarget11[ScriptTarget11["ES2023"] = 10] = "ES2023";
|
|
6964
|
-
ScriptTarget11[ScriptTarget11["ES2024"] = 11] = "ES2024";
|
|
6965
6950
|
ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext";
|
|
6966
6951
|
ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON";
|
|
6967
6952
|
ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest";
|
|
@@ -7436,6 +7421,13 @@ var commentPragmas = {
|
|
|
7436
7421
|
kind: 4 /* MultiLine */
|
|
7437
7422
|
}
|
|
7438
7423
|
};
|
|
7424
|
+
var JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode7) => {
|
|
7425
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseAll"] = 0] = "ParseAll";
|
|
7426
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseNone"] = 1] = "ParseNone";
|
|
7427
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseForTypeErrors"] = 2] = "ParseForTypeErrors";
|
|
7428
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseForTypeInfo"] = 3] = "ParseForTypeInfo";
|
|
7429
|
+
return JSDocParsingMode7;
|
|
7430
|
+
})(JSDocParsingMode || {});
|
|
7439
7431
|
|
|
7440
7432
|
// src/compiler/sys.ts
|
|
7441
7433
|
function generateDjb2Hash(data) {
|
|
@@ -9626,43 +9618,6 @@ var Diagnostics = {
|
|
|
9626
9618
|
The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
|
|
9627
9619
|
The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
|
|
9628
9620
|
_0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
|
|
9629
|
-
_0_is_not_a_valid_character_escape: diag(1496, 1 /* Error */, "_0_is_not_a_valid_character_escape_1496", "'\\{0}' is not a valid character escape."),
|
|
9630
|
-
Unknown_regular_expression_flag: diag(1497, 1 /* Error */, "Unknown_regular_expression_flag_1497", "Unknown regular expression flag."),
|
|
9631
|
-
Duplicate_regular_expression_flag: diag(1498, 1 /* Error */, "Duplicate_regular_expression_flag_1498", "Duplicate regular expression flag."),
|
|
9632
|
-
This_regular_expression_flag_is_only_available_when_targeting_0_or_later: diag(1499, 1 /* Error */, "This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1499", "This regular expression flag is only available when targeting '{0}' or later."),
|
|
9633
|
-
The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously: diag(1500, 1 /* Error */, "The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1500", "The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."),
|
|
9634
|
-
Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later: diag(1501, 1 /* Error */, "Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1501", "Named capturing groups are only available when targeting 'ES2018' or later."),
|
|
9635
|
-
Subpattern_flags_must_be_present_when_there_is_a_minus_sign: diag(1502, 1 /* Error */, "Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1502", "Subpattern flags must be present when there is a minus sign."),
|
|
9636
|
-
Incomplete_quantifier_Digit_expected: diag(1503, 1 /* Error */, "Incomplete_quantifier_Digit_expected_1503", "Incomplete quantifier. Digit expected."),
|
|
9637
|
-
Numbers_out_of_order_in_quantifier: diag(1504, 1 /* Error */, "Numbers_out_of_order_in_quantifier_1504", "Numbers out of order in quantifier."),
|
|
9638
|
-
There_is_nothing_available_for_repetition: diag(1505, 1 /* Error */, "There_is_nothing_available_for_repetition_1505", "There is nothing available for repetition."),
|
|
9639
|
-
Unexpected_0_Did_you_mean_to_escape_it_with_backslash: diag(1506, 1 /* Error */, "Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1506", "Unexpected '{0}'. Did you mean to escape it with backslash?"),
|
|
9640
|
-
This_regular_expression_flag_cannot_be_toggled_within_a_subpattern: diag(1507, 1 /* Error */, "This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1507", "This regular expression flag cannot be toggled within a subpattern."),
|
|
9641
|
-
k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets: diag(1508, 1 /* Error */, "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1508", "'\\k' must be followed by a capturing group name enclosed in angle brackets."),
|
|
9642
|
-
q_is_only_available_inside_character_class: diag(1509, 1 /* Error */, "q_is_only_available_inside_character_class_1509", "'\\q' is only available inside character class."),
|
|
9643
|
-
c_must_be_followed_by_an_ASCII_letter: diag(1510, 1 /* Error */, "c_must_be_followed_by_an_ASCII_letter_1510", "'\\c' must be followed by an ASCII letter."),
|
|
9644
|
-
Undetermined_character_escape: diag(1511, 1 /* Error */, "Undetermined_character_escape_1511", "Undetermined character escape."),
|
|
9645
|
-
Expected_a_capturing_group_name: diag(1512, 1 /* Error */, "Expected_a_capturing_group_name_1512", "Expected a capturing group name."),
|
|
9646
|
-
Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other: diag(1513, 1 /* Error */, "Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1513", "Named capturing groups with the same name must be mutually exclusive to each other."),
|
|
9647
|
-
A_character_class_range_must_not_be_bounded_by_another_character_class: diag(1514, 1 /* Error */, "A_character_class_range_must_not_be_bounded_by_another_character_class_1514", "A character class range must not be bounded by another character class."),
|
|
9648
|
-
Range_out_of_order_in_character_class: diag(1515, 1 /* Error */, "Range_out_of_order_in_character_class_1515", "Range out of order in character class."),
|
|
9649
|
-
Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class: diag(1516, 1 /* Error */, "Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1516", "Anything that would possibly match more than a single character is invalid inside a negated character class."),
|
|
9650
|
-
Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead: diag(1517, 1 /* Error */, "Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1517", "Operators must not be mixed within a character class. Wrap it in a nested class instead."),
|
|
9651
|
-
Expected_a_class_set_oprand: diag(1518, 1 /* Error */, "Expected_a_class_set_oprand_1518", "Expected a class set oprand."),
|
|
9652
|
-
q_must_be_followed_by_string_alternatives_enclosed_in_braces: diag(1519, 1 /* Error */, "q_must_be_followed_by_string_alternatives_enclosed_in_braces_1519", "'\\q' must be followed by string alternatives enclosed in braces."),
|
|
9653
|
-
A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash: diag(1520, 1 /* Error */, "A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1520", "A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"),
|
|
9654
|
-
Expected_a_Unicode_property_name: diag(1521, 1 /* Error */, "Expected_a_Unicode_property_name_1521", "Expected a Unicode property name."),
|
|
9655
|
-
Unknown_Unicode_property_name: diag(1522, 1 /* Error */, "Unknown_Unicode_property_name_1522", "Unknown Unicode property name."),
|
|
9656
|
-
Expected_a_Unicode_property_value: diag(1523, 1 /* Error */, "Expected_a_Unicode_property_value_1523", "Expected a Unicode property value."),
|
|
9657
|
-
Unknown_Unicode_property_value: diag(1524, 1 /* Error */, "Unknown_Unicode_property_value_1524", "Unknown Unicode property value."),
|
|
9658
|
-
Expected_a_Unicode_property_name_or_value: diag(1525, 1 /* Error */, "Expected_a_Unicode_property_name_or_value_1525", "Expected a Unicode property name or value."),
|
|
9659
|
-
Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set: diag(1526, 1 /* Error */, "Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1526", "Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."),
|
|
9660
|
-
Unknown_Unicode_property_name_or_value: diag(1527, 1 /* Error */, "Unknown_Unicode_property_name_or_value_1527", "Unknown Unicode property name or value."),
|
|
9661
|
-
Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: diag(1528, 1 /* Error */, "Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1528", "Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."),
|
|
9662
|
-
_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces: diag(1529, 1 /* Error */, "_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1529", "'\\{0}' must be followed by a Unicode property value expression enclosed in braces."),
|
|
9663
|
-
There_is_no_capturing_group_named_0_in_this_regular_expression: diag(1530, 1 /* Error */, "There_is_no_capturing_group_named_0_in_this_regular_expression_1530", "There is no capturing group named '{0}' in this regular expression."),
|
|
9664
|
-
A_decimal_escape_must_refer_to_an_existent_capturing_group_There_are_only_0_capturing_groups_in_this_regular_expression: diag(1531, 1 /* Error */, "A_decimal_escape_must_refer_to_an_existent_capturing_group_There_are_only_0_capturing_groups_in_this_1531", "A decimal escape must refer to an existent capturing group. There are only {0} capturing groups in this regular expression."),
|
|
9665
|
-
Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression: diag(1532, 1 /* Error */, "Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression_1532", "Decimal escapes are invalid when there are no capturing groups in a regular expression."),
|
|
9666
9621
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
9667
9622
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
9668
9623
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -10213,6 +10168,7 @@ var Diagnostics = {
|
|
|
10213
10168
|
await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."),
|
|
10214
10169
|
await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
10215
10170
|
Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
|
|
10171
|
+
Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."),
|
|
10216
10172
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
10217
10173
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
10218
10174
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -11260,7 +11216,7 @@ var Diagnostics = {
|
|
|
11260
11216
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
11261
11217
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
11262
11218
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
11263
|
-
|
|
11219
|
+
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"),
|
|
11264
11220
|
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"),
|
|
11265
11221
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
11266
11222
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -11496,26 +11452,6 @@ var textToToken = new Map(Object.entries({
|
|
|
11496
11452
|
"#": 63 /* HashToken */,
|
|
11497
11453
|
"`": 62 /* BacktickToken */
|
|
11498
11454
|
}));
|
|
11499
|
-
var charToRegExpFlag = new Map(Object.entries({
|
|
11500
|
-
d: 1 /* HasIndices */,
|
|
11501
|
-
g: 2 /* Global */,
|
|
11502
|
-
i: 4 /* IgnoreCase */,
|
|
11503
|
-
m: 8 /* Multiline */,
|
|
11504
|
-
s: 16 /* DotAll */,
|
|
11505
|
-
u: 32 /* Unicode */,
|
|
11506
|
-
v: 64 /* UnicodeSets */,
|
|
11507
|
-
y: 128 /* Sticky */
|
|
11508
|
-
}));
|
|
11509
|
-
var regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
|
|
11510
|
-
[1 /* HasIndices */, 9 /* ES2022 */],
|
|
11511
|
-
[2 /* Global */, 0 /* ES3 */],
|
|
11512
|
-
[4 /* IgnoreCase */, 0 /* ES3 */],
|
|
11513
|
-
[8 /* Multiline */, 0 /* ES3 */],
|
|
11514
|
-
[16 /* DotAll */, 5 /* ES2018 */],
|
|
11515
|
-
[32 /* Unicode */, 2 /* ES2015 */],
|
|
11516
|
-
[64 /* UnicodeSets */, 11 /* ES2024 */],
|
|
11517
|
-
[128 /* Sticky */, 2 /* ES2015 */]
|
|
11518
|
-
]);
|
|
11519
11455
|
var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 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, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
|
|
11520
11456
|
var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 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, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 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, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
|
|
11521
11457
|
var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
|
|
@@ -11524,7 +11460,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18
|
|
|
11524
11460
|
var unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999];
|
|
11525
11461
|
var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
11526
11462
|
var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
11527
|
-
var
|
|
11463
|
+
var jsDocSeeOrLink = /@(?:see|link)/i;
|
|
11528
11464
|
function lookupInUnicodeMap(code, map2) {
|
|
11529
11465
|
if (code < map2[0]) {
|
|
11530
11466
|
return false;
|
|
@@ -11566,16 +11502,6 @@ function tokenToString(t) {
|
|
|
11566
11502
|
function stringToToken(s) {
|
|
11567
11503
|
return textToToken.get(s);
|
|
11568
11504
|
}
|
|
11569
|
-
var regExpFlagChars = makeReverseMap(charToRegExpFlag);
|
|
11570
|
-
function regularExpressionFlagToCharacter(f) {
|
|
11571
|
-
return regExpFlagChars[f];
|
|
11572
|
-
}
|
|
11573
|
-
function characterToRegularExpressionFlag(c) {
|
|
11574
|
-
return charToRegExpFlag.get(c);
|
|
11575
|
-
}
|
|
11576
|
-
function regularExpressionFlagToFirstAvailableLanguageVersion(f) {
|
|
11577
|
-
return regExpFlagToFirstAvailableLanguageVersion.get(f);
|
|
11578
|
-
}
|
|
11579
11505
|
function computeLineStarts(text) {
|
|
11580
11506
|
const result = [];
|
|
11581
11507
|
let pos = 0;
|
|
@@ -11672,11 +11598,8 @@ function isDigit(ch) {
|
|
|
11672
11598
|
function isHexDigit(ch) {
|
|
11673
11599
|
return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */;
|
|
11674
11600
|
}
|
|
11675
|
-
function
|
|
11676
|
-
return
|
|
11677
|
-
}
|
|
11678
|
-
function isWordCharacter(ch) {
|
|
11679
|
-
return isASCIILetter(ch) || isDigit(ch) || ch === 95 /* _ */;
|
|
11601
|
+
function isCodePoint(code) {
|
|
11602
|
+
return code <= 1114111;
|
|
11680
11603
|
}
|
|
11681
11604
|
function isOctalDigit(ch) {
|
|
11682
11605
|
return ch >= 48 /* _0 */ && ch <= 55 /* _7 */;
|
|
@@ -12015,10 +11938,10 @@ function getShebang(text) {
|
|
|
12015
11938
|
}
|
|
12016
11939
|
}
|
|
12017
11940
|
function isIdentifierStart(ch, languageVersion) {
|
|
12018
|
-
return
|
|
11941
|
+
return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);
|
|
12019
11942
|
}
|
|
12020
11943
|
function isIdentifierPart(ch, languageVersion, identifierVariant) {
|
|
12021
|
-
return
|
|
11944
|
+
return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || // "-" and ":" are valid in JSX Identifiers
|
|
12022
11945
|
(identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);
|
|
12023
11946
|
}
|
|
12024
11947
|
function isIdentifierText(name, languageVersion, identifierVariant) {
|
|
@@ -12044,7 +11967,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12044
11967
|
var tokenFlags;
|
|
12045
11968
|
var commentDirectives;
|
|
12046
11969
|
var inJSDocType = 0;
|
|
12047
|
-
var
|
|
11970
|
+
var scriptKind = 0 /* Unknown */;
|
|
11971
|
+
var jsDocParsingMode = 0 /* ParseAll */;
|
|
12048
11972
|
setText(text, start2, length2);
|
|
12049
11973
|
var scanner2 = {
|
|
12050
11974
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -12088,14 +12012,15 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12088
12012
|
setText,
|
|
12089
12013
|
setScriptTarget,
|
|
12090
12014
|
setLanguageVariant,
|
|
12015
|
+
setScriptKind,
|
|
12016
|
+
setJSDocParsingMode,
|
|
12091
12017
|
setOnError,
|
|
12092
12018
|
resetTokenState,
|
|
12093
12019
|
setTextPos: resetTokenState,
|
|
12094
12020
|
setInJSDocType,
|
|
12095
12021
|
tryScan,
|
|
12096
12022
|
lookAhead,
|
|
12097
|
-
scanRange
|
|
12098
|
-
setSkipNonSemanticJSDoc
|
|
12023
|
+
scanRange
|
|
12099
12024
|
};
|
|
12100
12025
|
if (Debug.isDebugging) {
|
|
12101
12026
|
Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", {
|
|
@@ -12337,9 +12262,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12337
12262
|
result += text.substring(start3, pos);
|
|
12338
12263
|
result += scanEscapeSequence(
|
|
12339
12264
|
/*shouldEmitInvalidEscapeError*/
|
|
12340
|
-
true
|
|
12341
|
-
/*isRegularExpression*/
|
|
12342
|
-
false
|
|
12265
|
+
true
|
|
12343
12266
|
);
|
|
12344
12267
|
start3 = pos;
|
|
12345
12268
|
continue;
|
|
@@ -12383,11 +12306,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12383
12306
|
}
|
|
12384
12307
|
if (currChar === 92 /* backslash */) {
|
|
12385
12308
|
contents += text.substring(start3, pos);
|
|
12386
|
-
contents += scanEscapeSequence(
|
|
12387
|
-
shouldEmitInvalidEscapeError,
|
|
12388
|
-
/*isRegularExpression*/
|
|
12389
|
-
false
|
|
12390
|
-
);
|
|
12309
|
+
contents += scanEscapeSequence(shouldEmitInvalidEscapeError);
|
|
12391
12310
|
start3 = pos;
|
|
12392
12311
|
continue;
|
|
12393
12312
|
}
|
|
@@ -12407,7 +12326,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12407
12326
|
tokenValue = contents;
|
|
12408
12327
|
return resultingToken;
|
|
12409
12328
|
}
|
|
12410
|
-
function scanEscapeSequence(shouldEmitInvalidEscapeError
|
|
12329
|
+
function scanEscapeSequence(shouldEmitInvalidEscapeError) {
|
|
12411
12330
|
const start3 = pos;
|
|
12412
12331
|
pos++;
|
|
12413
12332
|
if (pos >= end) {
|
|
@@ -12435,7 +12354,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12435
12354
|
pos++;
|
|
12436
12355
|
}
|
|
12437
12356
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12438
|
-
if (
|
|
12357
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12439
12358
|
const code = parseInt(text.substring(start3 + 1, pos), 8);
|
|
12440
12359
|
error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + code.toString(16).padStart(2, "0"));
|
|
12441
12360
|
return String.fromCharCode(code);
|
|
@@ -12444,7 +12363,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12444
12363
|
case 56 /* _8 */:
|
|
12445
12364
|
case 57 /* _9 */:
|
|
12446
12365
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12447
|
-
if (
|
|
12366
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12448
12367
|
error2(Diagnostics.Escape_sequence_0_is_not_allowed, start3, pos - start3, text.substring(start3, pos));
|
|
12449
12368
|
return String.fromCharCode(ch);
|
|
12450
12369
|
}
|
|
@@ -12466,42 +12385,62 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12466
12385
|
case 34 /* doubleQuote */:
|
|
12467
12386
|
return '"';
|
|
12468
12387
|
case 117 /* u */:
|
|
12469
|
-
if (
|
|
12470
|
-
pos
|
|
12471
|
-
|
|
12388
|
+
if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) {
|
|
12389
|
+
pos++;
|
|
12390
|
+
const escapedValueString = scanMinimumNumberOfHexDigits(
|
|
12391
|
+
1,
|
|
12392
|
+
/*canHaveSeparators*/
|
|
12393
|
+
false
|
|
12394
|
+
);
|
|
12395
|
+
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
|
12396
|
+
if (escapedValue < 0) {
|
|
12397
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12398
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12399
|
+
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
12400
|
+
}
|
|
12401
|
+
return text.substring(start3, pos);
|
|
12402
|
+
}
|
|
12403
|
+
if (!isCodePoint(escapedValue)) {
|
|
12404
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12405
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12406
|
+
error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
|
|
12407
|
+
}
|
|
12408
|
+
return text.substring(start3, pos);
|
|
12409
|
+
}
|
|
12410
|
+
if (pos >= end) {
|
|
12411
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12412
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12413
|
+
error2(Diagnostics.Unexpected_end_of_text);
|
|
12414
|
+
}
|
|
12415
|
+
return text.substring(start3, pos);
|
|
12416
|
+
}
|
|
12417
|
+
if (text.charCodeAt(pos) !== 125 /* closeBrace */) {
|
|
12418
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12419
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12420
|
+
error2(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
12421
|
+
}
|
|
12422
|
+
return text.substring(start3, pos);
|
|
12423
|
+
}
|
|
12424
|
+
pos++;
|
|
12425
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
12426
|
+
return utf16EncodeAsString(escapedValue);
|
|
12472
12427
|
}
|
|
12473
12428
|
for (; pos < start3 + 6; pos++) {
|
|
12474
12429
|
if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
|
|
12475
12430
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12476
|
-
if (
|
|
12431
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12477
12432
|
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
12478
12433
|
}
|
|
12479
12434
|
return text.substring(start3, pos);
|
|
12480
12435
|
}
|
|
12481
12436
|
}
|
|
12482
12437
|
tokenFlags |= 1024 /* UnicodeEscape */;
|
|
12483
|
-
|
|
12484
|
-
const escapedValueString = String.fromCharCode(escapedValue);
|
|
12485
|
-
if (isRegularExpression && shouldEmitInvalidEscapeError && escapedValue >= 55296 && escapedValue <= 56319 && pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && text.charCodeAt(pos + 2) !== 123 /* openBrace */) {
|
|
12486
|
-
const nextStart = pos;
|
|
12487
|
-
let nextPos = pos + 2;
|
|
12488
|
-
for (; nextPos < nextStart + 6; nextPos++) {
|
|
12489
|
-
if (!isHexDigit(text.charCodeAt(pos))) {
|
|
12490
|
-
return escapedValueString;
|
|
12491
|
-
}
|
|
12492
|
-
}
|
|
12493
|
-
const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16);
|
|
12494
|
-
if (nextEscapedValue >= 56320 && nextEscapedValue <= 57343) {
|
|
12495
|
-
pos = nextPos;
|
|
12496
|
-
return escapedValueString + String.fromCharCode(nextEscapedValue);
|
|
12497
|
-
}
|
|
12498
|
-
}
|
|
12499
|
-
return escapedValueString;
|
|
12438
|
+
return String.fromCharCode(parseInt(text.substring(start3 + 2, pos), 16));
|
|
12500
12439
|
case 120 /* x */:
|
|
12501
12440
|
for (; pos < start3 + 4; pos++) {
|
|
12502
12441
|
if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
|
|
12503
12442
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
12504
|
-
if (
|
|
12443
|
+
if (shouldEmitInvalidEscapeError) {
|
|
12505
12444
|
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
12506
12445
|
}
|
|
12507
12446
|
return text.substring(start3, pos);
|
|
@@ -12518,16 +12457,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12518
12457
|
case 8233 /* paragraphSeparator */:
|
|
12519
12458
|
return "";
|
|
12520
12459
|
default:
|
|
12521
|
-
if (isRegularExpression && (shouldEmitInvalidEscapeError || isIdentifierPart(ch, languageVersion))) {
|
|
12522
|
-
error2(Diagnostics._0_is_not_a_valid_character_escape, pos - 2, 2, String.fromCharCode(ch));
|
|
12523
|
-
}
|
|
12524
12460
|
return String.fromCharCode(ch);
|
|
12525
12461
|
}
|
|
12526
12462
|
}
|
|
12527
|
-
function scanExtendedUnicodeEscape(
|
|
12528
|
-
const start3 = pos;
|
|
12529
|
-
pos += 3;
|
|
12530
|
-
const escapedStart = pos;
|
|
12463
|
+
function scanExtendedUnicodeEscape() {
|
|
12531
12464
|
const escapedValueString = scanMinimumNumberOfHexDigits(
|
|
12532
12465
|
1,
|
|
12533
12466
|
/*canHaveSeparators*/
|
|
@@ -12536,34 +12469,24 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12536
12469
|
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
|
12537
12470
|
let isInvalidExtendedEscape = false;
|
|
12538
12471
|
if (escapedValue < 0) {
|
|
12539
|
-
|
|
12540
|
-
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
12541
|
-
}
|
|
12472
|
+
error2(Diagnostics.Hexadecimal_digit_expected);
|
|
12542
12473
|
isInvalidExtendedEscape = true;
|
|
12543
12474
|
} else if (escapedValue > 1114111) {
|
|
12544
|
-
|
|
12545
|
-
error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, escapedStart, pos - escapedStart);
|
|
12546
|
-
}
|
|
12475
|
+
error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
|
|
12547
12476
|
isInvalidExtendedEscape = true;
|
|
12548
12477
|
}
|
|
12549
12478
|
if (pos >= end) {
|
|
12550
|
-
|
|
12551
|
-
error2(Diagnostics.Unexpected_end_of_text);
|
|
12552
|
-
}
|
|
12479
|
+
error2(Diagnostics.Unexpected_end_of_text);
|
|
12553
12480
|
isInvalidExtendedEscape = true;
|
|
12554
12481
|
} else if (text.charCodeAt(pos) === 125 /* closeBrace */) {
|
|
12555
12482
|
pos++;
|
|
12556
12483
|
} else {
|
|
12557
|
-
|
|
12558
|
-
error2(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
12559
|
-
}
|
|
12484
|
+
error2(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
12560
12485
|
isInvalidExtendedEscape = true;
|
|
12561
12486
|
}
|
|
12562
12487
|
if (isInvalidExtendedEscape) {
|
|
12563
|
-
|
|
12564
|
-
return text.substring(start3, pos);
|
|
12488
|
+
return "";
|
|
12565
12489
|
}
|
|
12566
|
-
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
12567
12490
|
return utf16EncodeAsString(escapedValue);
|
|
12568
12491
|
}
|
|
12569
12492
|
function peekUnicodeEscape() {
|
|
@@ -12605,6 +12528,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12605
12528
|
} else if (ch === 92 /* backslash */) {
|
|
12606
12529
|
ch = peekExtendedUnicodeEscape();
|
|
12607
12530
|
if (ch >= 0 && isIdentifierPart(ch, languageVersion)) {
|
|
12531
|
+
pos += 3;
|
|
12532
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
12608
12533
|
result += scanExtendedUnicodeEscape();
|
|
12609
12534
|
start3 = pos;
|
|
12610
12535
|
continue;
|
|
@@ -12883,7 +12808,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12883
12808
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
12884
12809
|
}
|
|
12885
12810
|
}
|
|
12886
|
-
if (isJSDoc2 && (
|
|
12811
|
+
if (isJSDoc2 && shouldParseJSDoc()) {
|
|
12887
12812
|
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
12888
12813
|
}
|
|
12889
12814
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
@@ -13075,6 +13000,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13075
13000
|
case 92 /* backslash */:
|
|
13076
13001
|
const extendedCookedChar = peekExtendedUnicodeEscape();
|
|
13077
13002
|
if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
|
|
13003
|
+
pos += 3;
|
|
13004
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
13078
13005
|
tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
13079
13006
|
return token = getIdentifierToken();
|
|
13080
13007
|
}
|
|
@@ -13090,7 +13017,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13090
13017
|
return token = 0 /* Unknown */;
|
|
13091
13018
|
case 35 /* hash */:
|
|
13092
13019
|
if (pos !== 0 && text[pos + 1] === "!") {
|
|
13093
|
-
error2(Diagnostics.can_only_be_used_at_the_start_of_a_file
|
|
13020
|
+
error2(Diagnostics.can_only_be_used_at_the_start_of_a_file);
|
|
13094
13021
|
pos++;
|
|
13095
13022
|
return token = 0 /* Unknown */;
|
|
13096
13023
|
}
|
|
@@ -13099,6 +13026,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13099
13026
|
pos++;
|
|
13100
13027
|
const extendedCookedChar2 = peekExtendedUnicodeEscape();
|
|
13101
13028
|
if (extendedCookedChar2 >= 0 && isIdentifierStart(extendedCookedChar2, languageVersion)) {
|
|
13029
|
+
pos += 3;
|
|
13030
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
13102
13031
|
tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
13103
13032
|
return token = 81 /* PrivateIdentifier */;
|
|
13104
13033
|
}
|
|
@@ -13138,6 +13067,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13138
13067
|
}
|
|
13139
13068
|
}
|
|
13140
13069
|
}
|
|
13070
|
+
function shouldParseJSDoc() {
|
|
13071
|
+
switch (jsDocParsingMode) {
|
|
13072
|
+
case 0 /* ParseAll */:
|
|
13073
|
+
return true;
|
|
13074
|
+
case 1 /* ParseNone */:
|
|
13075
|
+
return false;
|
|
13076
|
+
}
|
|
13077
|
+
if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {
|
|
13078
|
+
return true;
|
|
13079
|
+
}
|
|
13080
|
+
if (jsDocParsingMode === 3 /* ParseForTypeInfo */) {
|
|
13081
|
+
return false;
|
|
13082
|
+
}
|
|
13083
|
+
return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));
|
|
13084
|
+
}
|
|
13141
13085
|
function reScanInvalidIdentifier() {
|
|
13142
13086
|
Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.");
|
|
13143
13087
|
pos = tokenStart = fullStartPos;
|
|
@@ -13221,841 +13165,14 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13221
13165
|
}
|
|
13222
13166
|
p++;
|
|
13223
13167
|
}
|
|
13224
|
-
|
|
13225
|
-
const endOfBody = p - (isUnterminated ? 0 : 1);
|
|
13226
|
-
let regExpFlags = 0 /* None */;
|
|
13227
|
-
while (p < end) {
|
|
13228
|
-
const ch = text.charCodeAt(p);
|
|
13229
|
-
if (!isIdentifierPart(ch, languageVersion)) {
|
|
13230
|
-
break;
|
|
13231
|
-
}
|
|
13232
|
-
const flag = characterToRegularExpressionFlag(String.fromCharCode(ch));
|
|
13233
|
-
if (flag === void 0) {
|
|
13234
|
-
error2(Diagnostics.Unknown_regular_expression_flag, p, 1);
|
|
13235
|
-
} else if (regExpFlags & flag) {
|
|
13236
|
-
error2(Diagnostics.Duplicate_regular_expression_flag, p, 1);
|
|
13237
|
-
} else if (((regExpFlags | flag) & 96 /* UnicodeMode */) === 96 /* UnicodeMode */) {
|
|
13238
|
-
error2(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, p, 1);
|
|
13239
|
-
} else {
|
|
13240
|
-
regExpFlags |= flag;
|
|
13241
|
-
const availableFrom = regularExpressionFlagToFirstAvailableLanguageVersion(flag);
|
|
13242
|
-
if (languageVersion < availableFrom) {
|
|
13243
|
-
error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, p, 1, ScriptTarget[availableFrom]);
|
|
13244
|
-
}
|
|
13245
|
-
}
|
|
13168
|
+
while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) {
|
|
13246
13169
|
p++;
|
|
13247
13170
|
}
|
|
13248
|
-
pos =
|
|
13249
|
-
const saveTokenPos = tokenStart;
|
|
13250
|
-
const saveTokenFlags = tokenFlags;
|
|
13251
|
-
scanRegularExpressionWorker(text.slice(0, endOfBody), endOfBody, regExpFlags, isUnterminated);
|
|
13252
|
-
if (!isUnterminated) {
|
|
13253
|
-
pos = p;
|
|
13254
|
-
}
|
|
13255
|
-
tokenStart = saveTokenPos;
|
|
13256
|
-
tokenFlags = saveTokenFlags;
|
|
13171
|
+
pos = p;
|
|
13257
13172
|
tokenValue = text.substring(tokenStart, pos);
|
|
13258
13173
|
token = 14 /* RegularExpressionLiteral */;
|
|
13259
13174
|
}
|
|
13260
13175
|
return token;
|
|
13261
|
-
function scanRegularExpressionWorker(text2, end2, regExpFlags, isUnterminated) {
|
|
13262
|
-
const unicodeMode = !!(regExpFlags & 96 /* UnicodeMode */);
|
|
13263
|
-
const unicodeSetsMode = !!(regExpFlags & 64 /* UnicodeSets */);
|
|
13264
|
-
let mayContainStrings = false;
|
|
13265
|
-
let numberOfCapturingGroups = 0;
|
|
13266
|
-
const groupSpecifiers = /* @__PURE__ */ new Set();
|
|
13267
|
-
const groupNameReferences = [];
|
|
13268
|
-
const decimalEscapes = [];
|
|
13269
|
-
const namedCapturingGroups = [];
|
|
13270
|
-
function scanDisjunction(isInGroup) {
|
|
13271
|
-
while (true) {
|
|
13272
|
-
namedCapturingGroups.push(/* @__PURE__ */ new Set());
|
|
13273
|
-
scanAlternative(isInGroup);
|
|
13274
|
-
namedCapturingGroups.pop();
|
|
13275
|
-
if (text2.charCodeAt(pos) !== 124 /* bar */) {
|
|
13276
|
-
return;
|
|
13277
|
-
}
|
|
13278
|
-
pos++;
|
|
13279
|
-
}
|
|
13280
|
-
}
|
|
13281
|
-
function scanAlternative(isInGroup) {
|
|
13282
|
-
let isPreviousTermQuantifiable = false;
|
|
13283
|
-
while (pos < end2) {
|
|
13284
|
-
const start3 = pos;
|
|
13285
|
-
const ch = text2.charCodeAt(pos);
|
|
13286
|
-
switch (ch) {
|
|
13287
|
-
case 94 /* caret */:
|
|
13288
|
-
case 36 /* $ */:
|
|
13289
|
-
pos++;
|
|
13290
|
-
isPreviousTermQuantifiable = false;
|
|
13291
|
-
break;
|
|
13292
|
-
case 92 /* backslash */:
|
|
13293
|
-
pos++;
|
|
13294
|
-
switch (text2.charCodeAt(pos)) {
|
|
13295
|
-
case 98 /* b */:
|
|
13296
|
-
case 66 /* B */:
|
|
13297
|
-
pos++;
|
|
13298
|
-
isPreviousTermQuantifiable = false;
|
|
13299
|
-
break;
|
|
13300
|
-
default:
|
|
13301
|
-
scanAtomEscape();
|
|
13302
|
-
isPreviousTermQuantifiable = true;
|
|
13303
|
-
break;
|
|
13304
|
-
}
|
|
13305
|
-
break;
|
|
13306
|
-
case 40 /* openParen */:
|
|
13307
|
-
pos++;
|
|
13308
|
-
if (text2.charCodeAt(pos) === 63 /* question */) {
|
|
13309
|
-
pos++;
|
|
13310
|
-
switch (text2.charCodeAt(pos)) {
|
|
13311
|
-
case 61 /* equals */:
|
|
13312
|
-
case 33 /* exclamation */:
|
|
13313
|
-
pos++;
|
|
13314
|
-
isPreviousTermQuantifiable = false;
|
|
13315
|
-
break;
|
|
13316
|
-
case 60 /* lessThan */:
|
|
13317
|
-
const groupNameStart = pos;
|
|
13318
|
-
pos++;
|
|
13319
|
-
switch (text2.charCodeAt(pos)) {
|
|
13320
|
-
case 61 /* equals */:
|
|
13321
|
-
case 33 /* exclamation */:
|
|
13322
|
-
pos++;
|
|
13323
|
-
isPreviousTermQuantifiable = false;
|
|
13324
|
-
break;
|
|
13325
|
-
default:
|
|
13326
|
-
scanGroupName(
|
|
13327
|
-
/*isReference*/
|
|
13328
|
-
false
|
|
13329
|
-
);
|
|
13330
|
-
scanExpectedChar(62 /* greaterThan */);
|
|
13331
|
-
if (languageVersion < 5 /* ES2018 */) {
|
|
13332
|
-
error2(Diagnostics.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, groupNameStart, pos - groupNameStart);
|
|
13333
|
-
}
|
|
13334
|
-
numberOfCapturingGroups++;
|
|
13335
|
-
isPreviousTermQuantifiable = true;
|
|
13336
|
-
break;
|
|
13337
|
-
}
|
|
13338
|
-
break;
|
|
13339
|
-
default:
|
|
13340
|
-
const start4 = pos;
|
|
13341
|
-
const setFlags = scanPatternModifiers();
|
|
13342
|
-
if (text2.charCodeAt(pos) === 45 /* minus */) {
|
|
13343
|
-
pos++;
|
|
13344
|
-
scanPatternModifiers(setFlags);
|
|
13345
|
-
if (pos === start4 + 1) {
|
|
13346
|
-
error2(Diagnostics.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, start4, pos - start4);
|
|
13347
|
-
}
|
|
13348
|
-
}
|
|
13349
|
-
scanExpectedChar(58 /* colon */);
|
|
13350
|
-
isPreviousTermQuantifiable = true;
|
|
13351
|
-
break;
|
|
13352
|
-
}
|
|
13353
|
-
} else {
|
|
13354
|
-
numberOfCapturingGroups++;
|
|
13355
|
-
isPreviousTermQuantifiable = true;
|
|
13356
|
-
}
|
|
13357
|
-
scanDisjunction(
|
|
13358
|
-
/*isInGroup*/
|
|
13359
|
-
true
|
|
13360
|
-
);
|
|
13361
|
-
scanExpectedChar(41 /* closeParen */);
|
|
13362
|
-
break;
|
|
13363
|
-
case 123 /* openBrace */:
|
|
13364
|
-
pos++;
|
|
13365
|
-
const digitsStart = pos;
|
|
13366
|
-
scanDigits();
|
|
13367
|
-
const min2 = tokenValue;
|
|
13368
|
-
if (text2.charCodeAt(pos) === 44 /* comma */) {
|
|
13369
|
-
pos++;
|
|
13370
|
-
scanDigits();
|
|
13371
|
-
const max = tokenValue;
|
|
13372
|
-
if (!min2) {
|
|
13373
|
-
if (max || text2.charCodeAt(pos) === 125 /* closeBrace */) {
|
|
13374
|
-
error2(Diagnostics.Incomplete_quantifier_Digit_expected, digitsStart, 0);
|
|
13375
|
-
} else {
|
|
13376
|
-
if (unicodeMode) {
|
|
13377
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, start3, 1, String.fromCharCode(ch));
|
|
13378
|
-
}
|
|
13379
|
-
isPreviousTermQuantifiable = true;
|
|
13380
|
-
break;
|
|
13381
|
-
}
|
|
13382
|
-
}
|
|
13383
|
-
if (max && Number.parseInt(min2) > Number.parseInt(max)) {
|
|
13384
|
-
error2(Diagnostics.Numbers_out_of_order_in_quantifier, digitsStart, pos - digitsStart);
|
|
13385
|
-
}
|
|
13386
|
-
} else if (!min2) {
|
|
13387
|
-
if (unicodeMode) {
|
|
13388
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, start3, 1, String.fromCharCode(ch));
|
|
13389
|
-
}
|
|
13390
|
-
isPreviousTermQuantifiable = true;
|
|
13391
|
-
break;
|
|
13392
|
-
}
|
|
13393
|
-
scanExpectedChar(125 /* closeBrace */);
|
|
13394
|
-
pos--;
|
|
13395
|
-
case 42 /* asterisk */:
|
|
13396
|
-
case 43 /* plus */:
|
|
13397
|
-
case 63 /* question */:
|
|
13398
|
-
pos++;
|
|
13399
|
-
if (text2.charCodeAt(pos) === 63 /* question */) {
|
|
13400
|
-
pos++;
|
|
13401
|
-
}
|
|
13402
|
-
if (!isPreviousTermQuantifiable) {
|
|
13403
|
-
error2(Diagnostics.There_is_nothing_available_for_repetition, start3, pos - start3);
|
|
13404
|
-
}
|
|
13405
|
-
isPreviousTermQuantifiable = false;
|
|
13406
|
-
break;
|
|
13407
|
-
case 46 /* dot */:
|
|
13408
|
-
pos++;
|
|
13409
|
-
isPreviousTermQuantifiable = true;
|
|
13410
|
-
break;
|
|
13411
|
-
case 91 /* openBracket */:
|
|
13412
|
-
pos++;
|
|
13413
|
-
if (unicodeSetsMode) {
|
|
13414
|
-
scanClassSetExpression();
|
|
13415
|
-
} else {
|
|
13416
|
-
scanClassRanges();
|
|
13417
|
-
}
|
|
13418
|
-
scanExpectedChar(93 /* closeBracket */);
|
|
13419
|
-
isPreviousTermQuantifiable = true;
|
|
13420
|
-
break;
|
|
13421
|
-
case 41 /* closeParen */:
|
|
13422
|
-
if (isInGroup) {
|
|
13423
|
-
return;
|
|
13424
|
-
}
|
|
13425
|
-
case 93 /* closeBracket */:
|
|
13426
|
-
case 125 /* closeBrace */:
|
|
13427
|
-
if (isUnterminated && !isInGroup) {
|
|
13428
|
-
return;
|
|
13429
|
-
}
|
|
13430
|
-
if (unicodeMode) {
|
|
13431
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
13432
|
-
}
|
|
13433
|
-
pos++;
|
|
13434
|
-
isPreviousTermQuantifiable = true;
|
|
13435
|
-
break;
|
|
13436
|
-
case 47 /* slash */:
|
|
13437
|
-
case 124 /* bar */:
|
|
13438
|
-
return;
|
|
13439
|
-
default:
|
|
13440
|
-
scanSourceCharacter();
|
|
13441
|
-
isPreviousTermQuantifiable = true;
|
|
13442
|
-
break;
|
|
13443
|
-
}
|
|
13444
|
-
}
|
|
13445
|
-
}
|
|
13446
|
-
function scanPatternModifiers(currFlags = 0 /* None */) {
|
|
13447
|
-
while (pos < end2) {
|
|
13448
|
-
const ch = text2.charCodeAt(pos);
|
|
13449
|
-
if (!isIdentifierPart(ch, languageVersion)) {
|
|
13450
|
-
break;
|
|
13451
|
-
}
|
|
13452
|
-
const flag = characterToRegularExpressionFlag(String.fromCharCode(ch));
|
|
13453
|
-
if (flag === void 0) {
|
|
13454
|
-
error2(Diagnostics.Unknown_regular_expression_flag, pos, 1);
|
|
13455
|
-
} else if (currFlags & flag) {
|
|
13456
|
-
error2(Diagnostics.Duplicate_regular_expression_flag, pos, 1);
|
|
13457
|
-
} else if (!(flag & 28 /* Modifiers */)) {
|
|
13458
|
-
error2(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, 1);
|
|
13459
|
-
} else {
|
|
13460
|
-
currFlags |= flag;
|
|
13461
|
-
const availableFrom = regularExpressionFlagToFirstAvailableLanguageVersion(flag);
|
|
13462
|
-
if (languageVersion < availableFrom) {
|
|
13463
|
-
error2(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos, 1, ScriptTarget[availableFrom]);
|
|
13464
|
-
}
|
|
13465
|
-
}
|
|
13466
|
-
pos++;
|
|
13467
|
-
}
|
|
13468
|
-
return currFlags;
|
|
13469
|
-
}
|
|
13470
|
-
function scanAtomEscape() {
|
|
13471
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
13472
|
-
switch (text2.charCodeAt(pos)) {
|
|
13473
|
-
case 107 /* k */:
|
|
13474
|
-
pos++;
|
|
13475
|
-
if (text2.charCodeAt(pos) === 60 /* lessThan */) {
|
|
13476
|
-
pos++;
|
|
13477
|
-
scanGroupName(
|
|
13478
|
-
/*isReference*/
|
|
13479
|
-
true
|
|
13480
|
-
);
|
|
13481
|
-
scanExpectedChar(62 /* greaterThan */);
|
|
13482
|
-
} else if (unicodeMode) {
|
|
13483
|
-
error2(Diagnostics.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, pos - 2, 2);
|
|
13484
|
-
}
|
|
13485
|
-
break;
|
|
13486
|
-
case 113 /* q */:
|
|
13487
|
-
if (unicodeSetsMode) {
|
|
13488
|
-
pos++;
|
|
13489
|
-
error2(Diagnostics.q_is_only_available_inside_character_class, pos - 2, 2);
|
|
13490
|
-
break;
|
|
13491
|
-
}
|
|
13492
|
-
default:
|
|
13493
|
-
scanCharacterClassEscape() || scanDecimalEscape() || scanCharacterEscape();
|
|
13494
|
-
break;
|
|
13495
|
-
}
|
|
13496
|
-
}
|
|
13497
|
-
function scanDecimalEscape() {
|
|
13498
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
13499
|
-
const ch = text2.charCodeAt(pos);
|
|
13500
|
-
if (ch >= 49 /* _1 */ && ch <= 57 /* _9 */) {
|
|
13501
|
-
const start3 = pos;
|
|
13502
|
-
scanDigits();
|
|
13503
|
-
decimalEscapes.push({ pos: start3, end: pos, value: +tokenValue });
|
|
13504
|
-
return true;
|
|
13505
|
-
}
|
|
13506
|
-
return false;
|
|
13507
|
-
}
|
|
13508
|
-
function scanCharacterEscape() {
|
|
13509
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
13510
|
-
let ch = text2.charCodeAt(pos);
|
|
13511
|
-
switch (ch) {
|
|
13512
|
-
case 99 /* c */:
|
|
13513
|
-
pos++;
|
|
13514
|
-
ch = text2.charCodeAt(pos);
|
|
13515
|
-
if (isASCIILetter(ch)) {
|
|
13516
|
-
pos++;
|
|
13517
|
-
return String.fromCharCode(ch & 31);
|
|
13518
|
-
}
|
|
13519
|
-
if (unicodeMode) {
|
|
13520
|
-
error2(Diagnostics.c_must_be_followed_by_an_ASCII_letter, pos - 2, 2);
|
|
13521
|
-
}
|
|
13522
|
-
return String.fromCharCode(ch);
|
|
13523
|
-
case 94 /* caret */:
|
|
13524
|
-
case 36 /* $ */:
|
|
13525
|
-
case 47 /* slash */:
|
|
13526
|
-
case 92 /* backslash */:
|
|
13527
|
-
case 46 /* dot */:
|
|
13528
|
-
case 42 /* asterisk */:
|
|
13529
|
-
case 43 /* plus */:
|
|
13530
|
-
case 63 /* question */:
|
|
13531
|
-
case 40 /* openParen */:
|
|
13532
|
-
case 41 /* closeParen */:
|
|
13533
|
-
case 91 /* openBracket */:
|
|
13534
|
-
case 93 /* closeBracket */:
|
|
13535
|
-
case 123 /* openBrace */:
|
|
13536
|
-
case 125 /* closeBrace */:
|
|
13537
|
-
case 124 /* bar */:
|
|
13538
|
-
pos++;
|
|
13539
|
-
return String.fromCharCode(ch);
|
|
13540
|
-
default:
|
|
13541
|
-
if (pos >= end2) {
|
|
13542
|
-
error2(Diagnostics.Undetermined_character_escape, pos - 1, 1, ch);
|
|
13543
|
-
return "\\";
|
|
13544
|
-
}
|
|
13545
|
-
pos--;
|
|
13546
|
-
return scanEscapeSequence(
|
|
13547
|
-
/*shouldEmitInvalidEscapeError*/
|
|
13548
|
-
unicodeMode,
|
|
13549
|
-
/*isRegularExpression*/
|
|
13550
|
-
true
|
|
13551
|
-
);
|
|
13552
|
-
}
|
|
13553
|
-
}
|
|
13554
|
-
function scanGroupName(isReference) {
|
|
13555
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 60 /* lessThan */);
|
|
13556
|
-
tokenStart = pos;
|
|
13557
|
-
scanIdentifier(codePointAt(text2, pos), languageVersion);
|
|
13558
|
-
if (pos === tokenStart) {
|
|
13559
|
-
error2(Diagnostics.Expected_a_capturing_group_name);
|
|
13560
|
-
} else if (isReference) {
|
|
13561
|
-
groupNameReferences.push({ pos: tokenStart, end: pos, name: tokenValue });
|
|
13562
|
-
} else if (namedCapturingGroups.some((group2) => group2.has(tokenValue))) {
|
|
13563
|
-
error2(Diagnostics.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, tokenStart, pos - tokenStart);
|
|
13564
|
-
} else {
|
|
13565
|
-
last(namedCapturingGroups).add(tokenValue);
|
|
13566
|
-
groupSpecifiers.add(tokenValue);
|
|
13567
|
-
}
|
|
13568
|
-
}
|
|
13569
|
-
function isClassContentExit(ch) {
|
|
13570
|
-
return ch === 93 /* closeBracket */ || pos >= end2;
|
|
13571
|
-
}
|
|
13572
|
-
function scanClassRanges() {
|
|
13573
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 91 /* openBracket */);
|
|
13574
|
-
if (text2.charCodeAt(pos) === 94 /* caret */) {
|
|
13575
|
-
pos++;
|
|
13576
|
-
}
|
|
13577
|
-
while (pos < end2) {
|
|
13578
|
-
const ch = text2.charCodeAt(pos);
|
|
13579
|
-
if (isClassContentExit(ch)) {
|
|
13580
|
-
return;
|
|
13581
|
-
}
|
|
13582
|
-
const minStart = pos;
|
|
13583
|
-
const minCharacter = scanClassAtom();
|
|
13584
|
-
if (text2.charCodeAt(pos) === 45 /* minus */) {
|
|
13585
|
-
pos++;
|
|
13586
|
-
const ch2 = text2.charCodeAt(pos);
|
|
13587
|
-
if (isClassContentExit(ch2)) {
|
|
13588
|
-
return;
|
|
13589
|
-
}
|
|
13590
|
-
if (!minCharacter) {
|
|
13591
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, minStart, pos - 1 - minStart);
|
|
13592
|
-
}
|
|
13593
|
-
const maxStart = pos;
|
|
13594
|
-
const maxCharacter = scanClassAtom();
|
|
13595
|
-
if (!maxCharacter) {
|
|
13596
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, maxStart, pos - maxStart);
|
|
13597
|
-
continue;
|
|
13598
|
-
}
|
|
13599
|
-
if (!minCharacter) {
|
|
13600
|
-
continue;
|
|
13601
|
-
}
|
|
13602
|
-
const minCharacterValue = codePointAt(minCharacter, 0);
|
|
13603
|
-
const maxCharacterValue = codePointAt(maxCharacter, 0);
|
|
13604
|
-
if (minCharacter.length === charSize(minCharacterValue) && maxCharacter.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {
|
|
13605
|
-
error2(Diagnostics.Range_out_of_order_in_character_class, minStart, pos - minStart);
|
|
13606
|
-
}
|
|
13607
|
-
}
|
|
13608
|
-
}
|
|
13609
|
-
}
|
|
13610
|
-
function scanClassSetExpression() {
|
|
13611
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 91 /* openBracket */);
|
|
13612
|
-
let isCharacterComplement = false;
|
|
13613
|
-
if (text2.charCodeAt(pos) === 94 /* caret */) {
|
|
13614
|
-
pos++;
|
|
13615
|
-
isCharacterComplement = true;
|
|
13616
|
-
}
|
|
13617
|
-
let expressionMayContainStrings = false;
|
|
13618
|
-
let ch = text2.charCodeAt(pos);
|
|
13619
|
-
if (isClassContentExit(ch)) {
|
|
13620
|
-
return;
|
|
13621
|
-
}
|
|
13622
|
-
let start3 = pos;
|
|
13623
|
-
let oprand;
|
|
13624
|
-
switch (text2.slice(pos, pos + 2)) {
|
|
13625
|
-
case "--":
|
|
13626
|
-
case "&&":
|
|
13627
|
-
error2(Diagnostics.Expected_a_class_set_oprand);
|
|
13628
|
-
mayContainStrings = false;
|
|
13629
|
-
break;
|
|
13630
|
-
default:
|
|
13631
|
-
oprand = scanClassSetOprand();
|
|
13632
|
-
break;
|
|
13633
|
-
}
|
|
13634
|
-
switch (text2.charCodeAt(pos)) {
|
|
13635
|
-
case 45 /* minus */:
|
|
13636
|
-
if (text2.charCodeAt(pos + 1) === 45 /* minus */) {
|
|
13637
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
13638
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start3, pos - start3);
|
|
13639
|
-
}
|
|
13640
|
-
expressionMayContainStrings = mayContainStrings;
|
|
13641
|
-
scanClassSetSubExpression(3 /* ClassSubtraction */);
|
|
13642
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
13643
|
-
return;
|
|
13644
|
-
}
|
|
13645
|
-
break;
|
|
13646
|
-
case 38 /* ampersand */:
|
|
13647
|
-
if (text2.charCodeAt(pos + 1) === 38 /* ampersand */) {
|
|
13648
|
-
scanClassSetSubExpression(2 /* ClassIntersection */);
|
|
13649
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
13650
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start3, pos - start3);
|
|
13651
|
-
}
|
|
13652
|
-
expressionMayContainStrings = mayContainStrings;
|
|
13653
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
13654
|
-
return;
|
|
13655
|
-
} else {
|
|
13656
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
13657
|
-
}
|
|
13658
|
-
break;
|
|
13659
|
-
default:
|
|
13660
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
13661
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, start3, pos - start3);
|
|
13662
|
-
}
|
|
13663
|
-
expressionMayContainStrings = mayContainStrings;
|
|
13664
|
-
break;
|
|
13665
|
-
}
|
|
13666
|
-
while (pos < end2) {
|
|
13667
|
-
ch = text2.charCodeAt(pos);
|
|
13668
|
-
switch (ch) {
|
|
13669
|
-
case 45 /* minus */:
|
|
13670
|
-
pos++;
|
|
13671
|
-
ch = text2.charCodeAt(pos);
|
|
13672
|
-
if (isClassContentExit(ch)) {
|
|
13673
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
13674
|
-
return;
|
|
13675
|
-
}
|
|
13676
|
-
if (ch === 45 /* minus */) {
|
|
13677
|
-
pos++;
|
|
13678
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
13679
|
-
start3 = pos - 2;
|
|
13680
|
-
oprand = text2.slice(start3, pos);
|
|
13681
|
-
continue;
|
|
13682
|
-
} else {
|
|
13683
|
-
if (!oprand) {
|
|
13684
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, start3, pos - 1 - start3);
|
|
13685
|
-
}
|
|
13686
|
-
const secondStart = pos;
|
|
13687
|
-
const secondOprand = scanClassSetOprand();
|
|
13688
|
-
if (isCharacterComplement && mayContainStrings) {
|
|
13689
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, secondStart, pos - secondStart);
|
|
13690
|
-
}
|
|
13691
|
-
expressionMayContainStrings || (expressionMayContainStrings = mayContainStrings);
|
|
13692
|
-
if (!secondOprand) {
|
|
13693
|
-
error2(Diagnostics.A_character_class_range_must_not_be_bounded_by_another_character_class, secondStart, pos - secondStart);
|
|
13694
|
-
break;
|
|
13695
|
-
}
|
|
13696
|
-
if (!oprand) {
|
|
13697
|
-
break;
|
|
13698
|
-
}
|
|
13699
|
-
const minCharacterValue = codePointAt(oprand, 0);
|
|
13700
|
-
const maxCharacterValue = codePointAt(secondOprand, 0);
|
|
13701
|
-
if (oprand.length === charSize(minCharacterValue) && secondOprand.length === charSize(maxCharacterValue) && minCharacterValue > maxCharacterValue) {
|
|
13702
|
-
error2(Diagnostics.Range_out_of_order_in_character_class, start3, pos - start3);
|
|
13703
|
-
}
|
|
13704
|
-
}
|
|
13705
|
-
break;
|
|
13706
|
-
case 38 /* ampersand */:
|
|
13707
|
-
start3 = pos;
|
|
13708
|
-
pos++;
|
|
13709
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
13710
|
-
pos++;
|
|
13711
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
13712
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
13713
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
13714
|
-
pos++;
|
|
13715
|
-
}
|
|
13716
|
-
} else {
|
|
13717
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));
|
|
13718
|
-
}
|
|
13719
|
-
oprand = text2.slice(start3, pos);
|
|
13720
|
-
continue;
|
|
13721
|
-
}
|
|
13722
|
-
if (isClassContentExit(text2.charCodeAt(pos))) {
|
|
13723
|
-
break;
|
|
13724
|
-
}
|
|
13725
|
-
start3 = pos;
|
|
13726
|
-
switch (text2.slice(pos, pos + 2)) {
|
|
13727
|
-
case "--":
|
|
13728
|
-
case "&&":
|
|
13729
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos, 2);
|
|
13730
|
-
pos += 2;
|
|
13731
|
-
oprand = text2.slice(start3, pos);
|
|
13732
|
-
break;
|
|
13733
|
-
default:
|
|
13734
|
-
oprand = scanClassSetOprand();
|
|
13735
|
-
break;
|
|
13736
|
-
}
|
|
13737
|
-
}
|
|
13738
|
-
mayContainStrings = !isCharacterComplement && expressionMayContainStrings;
|
|
13739
|
-
}
|
|
13740
|
-
function scanClassSetSubExpression(expressionType) {
|
|
13741
|
-
let expressionMayContainStrings = mayContainStrings;
|
|
13742
|
-
while (pos < end2) {
|
|
13743
|
-
let ch = text2.charCodeAt(pos);
|
|
13744
|
-
if (isClassContentExit(ch)) {
|
|
13745
|
-
break;
|
|
13746
|
-
}
|
|
13747
|
-
switch (ch) {
|
|
13748
|
-
case 45 /* minus */:
|
|
13749
|
-
pos++;
|
|
13750
|
-
if (text2.charCodeAt(pos) === 45 /* minus */) {
|
|
13751
|
-
pos++;
|
|
13752
|
-
if (expressionType !== 3 /* ClassSubtraction */) {
|
|
13753
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
13754
|
-
}
|
|
13755
|
-
} else {
|
|
13756
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 1, 1);
|
|
13757
|
-
}
|
|
13758
|
-
break;
|
|
13759
|
-
case 38 /* ampersand */:
|
|
13760
|
-
pos++;
|
|
13761
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
13762
|
-
pos++;
|
|
13763
|
-
if (expressionType !== 2 /* ClassIntersection */) {
|
|
13764
|
-
error2(Diagnostics.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, pos - 2, 2);
|
|
13765
|
-
}
|
|
13766
|
-
if (text2.charCodeAt(pos) === 38 /* ampersand */) {
|
|
13767
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
13768
|
-
pos++;
|
|
13769
|
-
}
|
|
13770
|
-
} else {
|
|
13771
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos - 1, 1, String.fromCharCode(ch));
|
|
13772
|
-
}
|
|
13773
|
-
break;
|
|
13774
|
-
default:
|
|
13775
|
-
switch (expressionType) {
|
|
13776
|
-
case 3 /* ClassSubtraction */:
|
|
13777
|
-
error2(Diagnostics._0_expected, pos, 0, "--");
|
|
13778
|
-
break;
|
|
13779
|
-
case 2 /* ClassIntersection */:
|
|
13780
|
-
error2(Diagnostics._0_expected, pos, 0, "&&");
|
|
13781
|
-
break;
|
|
13782
|
-
default:
|
|
13783
|
-
break;
|
|
13784
|
-
}
|
|
13785
|
-
break;
|
|
13786
|
-
}
|
|
13787
|
-
ch = text2.charCodeAt(pos);
|
|
13788
|
-
if (isClassContentExit(ch)) {
|
|
13789
|
-
error2(Diagnostics.Expected_a_class_set_oprand);
|
|
13790
|
-
break;
|
|
13791
|
-
}
|
|
13792
|
-
scanClassSetOprand();
|
|
13793
|
-
expressionMayContainStrings && (expressionMayContainStrings = mayContainStrings);
|
|
13794
|
-
}
|
|
13795
|
-
mayContainStrings = expressionMayContainStrings;
|
|
13796
|
-
}
|
|
13797
|
-
function scanClassSetOprand() {
|
|
13798
|
-
mayContainStrings = false;
|
|
13799
|
-
switch (text2.charCodeAt(pos)) {
|
|
13800
|
-
case 91 /* openBracket */:
|
|
13801
|
-
pos++;
|
|
13802
|
-
scanClassSetExpression();
|
|
13803
|
-
scanExpectedChar(93 /* closeBracket */);
|
|
13804
|
-
return "";
|
|
13805
|
-
case 92 /* backslash */:
|
|
13806
|
-
pos++;
|
|
13807
|
-
if (scanCharacterClassEscape()) {
|
|
13808
|
-
return "";
|
|
13809
|
-
} else if (text2.charCodeAt(pos) === 113 /* q */) {
|
|
13810
|
-
pos++;
|
|
13811
|
-
if (text2.charCodeAt(pos) === 123 /* openBrace */) {
|
|
13812
|
-
pos++;
|
|
13813
|
-
scanClassStringDisjunctionContents();
|
|
13814
|
-
scanExpectedChar(125 /* closeBrace */);
|
|
13815
|
-
return "";
|
|
13816
|
-
} else {
|
|
13817
|
-
error2(Diagnostics.q_must_be_followed_by_string_alternatives_enclosed_in_braces, pos - 2, 2);
|
|
13818
|
-
return "q";
|
|
13819
|
-
}
|
|
13820
|
-
}
|
|
13821
|
-
pos--;
|
|
13822
|
-
default:
|
|
13823
|
-
return scanClassSetCharacter();
|
|
13824
|
-
}
|
|
13825
|
-
}
|
|
13826
|
-
function scanClassStringDisjunctionContents() {
|
|
13827
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 123 /* openBrace */);
|
|
13828
|
-
let characterCount = 0;
|
|
13829
|
-
while (pos < end2) {
|
|
13830
|
-
const ch = text2.charCodeAt(pos);
|
|
13831
|
-
switch (ch) {
|
|
13832
|
-
case 125 /* closeBrace */:
|
|
13833
|
-
if (characterCount !== 1) {
|
|
13834
|
-
mayContainStrings = true;
|
|
13835
|
-
}
|
|
13836
|
-
return;
|
|
13837
|
-
case 124 /* bar */:
|
|
13838
|
-
if (characterCount !== 1) {
|
|
13839
|
-
mayContainStrings = true;
|
|
13840
|
-
}
|
|
13841
|
-
pos++;
|
|
13842
|
-
start2 = pos;
|
|
13843
|
-
characterCount = 0;
|
|
13844
|
-
break;
|
|
13845
|
-
default:
|
|
13846
|
-
scanClassSetCharacter();
|
|
13847
|
-
characterCount++;
|
|
13848
|
-
break;
|
|
13849
|
-
}
|
|
13850
|
-
}
|
|
13851
|
-
}
|
|
13852
|
-
function scanClassSetCharacter() {
|
|
13853
|
-
const ch = text2.charCodeAt(pos);
|
|
13854
|
-
if (ch === 92 /* backslash */) {
|
|
13855
|
-
pos++;
|
|
13856
|
-
const ch2 = text2.charCodeAt(pos);
|
|
13857
|
-
switch (ch2) {
|
|
13858
|
-
case 98 /* b */:
|
|
13859
|
-
pos++;
|
|
13860
|
-
return "\b";
|
|
13861
|
-
case 38 /* ampersand */:
|
|
13862
|
-
case 45 /* minus */:
|
|
13863
|
-
case 33 /* exclamation */:
|
|
13864
|
-
case 35 /* hash */:
|
|
13865
|
-
case 37 /* percent */:
|
|
13866
|
-
case 44 /* comma */:
|
|
13867
|
-
case 58 /* colon */:
|
|
13868
|
-
case 59 /* semicolon */:
|
|
13869
|
-
case 60 /* lessThan */:
|
|
13870
|
-
case 61 /* equals */:
|
|
13871
|
-
case 62 /* greaterThan */:
|
|
13872
|
-
case 64 /* at */:
|
|
13873
|
-
case 96 /* backtick */:
|
|
13874
|
-
case 126 /* tilde */:
|
|
13875
|
-
pos++;
|
|
13876
|
-
return String.fromCharCode(ch2);
|
|
13877
|
-
default:
|
|
13878
|
-
return scanCharacterEscape();
|
|
13879
|
-
}
|
|
13880
|
-
} else if (ch === text2.charCodeAt(pos + 1)) {
|
|
13881
|
-
switch (ch) {
|
|
13882
|
-
case 38 /* ampersand */:
|
|
13883
|
-
case 33 /* exclamation */:
|
|
13884
|
-
case 35 /* hash */:
|
|
13885
|
-
case 37 /* percent */:
|
|
13886
|
-
case 42 /* asterisk */:
|
|
13887
|
-
case 43 /* plus */:
|
|
13888
|
-
case 44 /* comma */:
|
|
13889
|
-
case 46 /* dot */:
|
|
13890
|
-
case 58 /* colon */:
|
|
13891
|
-
case 59 /* semicolon */:
|
|
13892
|
-
case 60 /* lessThan */:
|
|
13893
|
-
case 61 /* equals */:
|
|
13894
|
-
case 62 /* greaterThan */:
|
|
13895
|
-
case 63 /* question */:
|
|
13896
|
-
case 64 /* at */:
|
|
13897
|
-
case 96 /* backtick */:
|
|
13898
|
-
case 126 /* tilde */:
|
|
13899
|
-
error2(Diagnostics.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, pos, 2);
|
|
13900
|
-
pos += 2;
|
|
13901
|
-
return text2.substring(pos - 2, pos);
|
|
13902
|
-
}
|
|
13903
|
-
}
|
|
13904
|
-
switch (ch) {
|
|
13905
|
-
case 47 /* slash */:
|
|
13906
|
-
case 40 /* openParen */:
|
|
13907
|
-
case 41 /* closeParen */:
|
|
13908
|
-
case 91 /* openBracket */:
|
|
13909
|
-
case 93 /* closeBracket */:
|
|
13910
|
-
case 123 /* openBrace */:
|
|
13911
|
-
case 125 /* closeBrace */:
|
|
13912
|
-
case 45 /* minus */:
|
|
13913
|
-
case 124 /* bar */:
|
|
13914
|
-
error2(Diagnostics.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, pos, 1, String.fromCharCode(ch));
|
|
13915
|
-
pos++;
|
|
13916
|
-
return String.fromCharCode(ch);
|
|
13917
|
-
}
|
|
13918
|
-
return scanSourceCharacter();
|
|
13919
|
-
}
|
|
13920
|
-
function scanClassAtom() {
|
|
13921
|
-
if (text2.charCodeAt(pos) === 92 /* backslash */) {
|
|
13922
|
-
pos++;
|
|
13923
|
-
const ch = text2.charCodeAt(pos);
|
|
13924
|
-
switch (ch) {
|
|
13925
|
-
case 98 /* b */:
|
|
13926
|
-
pos++;
|
|
13927
|
-
return "\b";
|
|
13928
|
-
case 45 /* minus */:
|
|
13929
|
-
pos++;
|
|
13930
|
-
return String.fromCharCode(ch);
|
|
13931
|
-
default:
|
|
13932
|
-
if (scanCharacterClassEscape()) {
|
|
13933
|
-
return "";
|
|
13934
|
-
}
|
|
13935
|
-
return scanCharacterEscape();
|
|
13936
|
-
}
|
|
13937
|
-
} else {
|
|
13938
|
-
return scanSourceCharacter();
|
|
13939
|
-
}
|
|
13940
|
-
}
|
|
13941
|
-
function scanCharacterClassEscape() {
|
|
13942
|
-
Debug.assertEqual(text2.charCodeAt(pos - 1), 92 /* backslash */);
|
|
13943
|
-
let isCharacterComplement = false;
|
|
13944
|
-
const start3 = pos - 1;
|
|
13945
|
-
const ch = text2.charCodeAt(pos);
|
|
13946
|
-
switch (ch) {
|
|
13947
|
-
case 100 /* d */:
|
|
13948
|
-
case 68 /* D */:
|
|
13949
|
-
case 115 /* s */:
|
|
13950
|
-
case 83 /* S */:
|
|
13951
|
-
case 119 /* w */:
|
|
13952
|
-
case 87 /* W */:
|
|
13953
|
-
pos++;
|
|
13954
|
-
return true;
|
|
13955
|
-
case 80 /* P */:
|
|
13956
|
-
isCharacterComplement = true;
|
|
13957
|
-
case 112 /* p */:
|
|
13958
|
-
pos++;
|
|
13959
|
-
if (text2.charCodeAt(pos) === 123 /* openBrace */) {
|
|
13960
|
-
pos++;
|
|
13961
|
-
const propertyNameOrValueStart = pos;
|
|
13962
|
-
const propertyNameOrValue = scanWordCharacters();
|
|
13963
|
-
if (text2.charCodeAt(pos) === 61 /* equals */) {
|
|
13964
|
-
const propertyName = nonBinaryUnicodeProperties.get(propertyNameOrValue);
|
|
13965
|
-
if (pos === propertyNameOrValueStart) {
|
|
13966
|
-
error2(Diagnostics.Expected_a_Unicode_property_name);
|
|
13967
|
-
} else if (propertyName === void 0) {
|
|
13968
|
-
error2(Diagnostics.Unknown_Unicode_property_name, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
13969
|
-
const suggestion = getSpellingSuggestion(propertyNameOrValue, nonBinaryUnicodeProperties.keys(), identity);
|
|
13970
|
-
if (suggestion) {
|
|
13971
|
-
error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
|
|
13972
|
-
}
|
|
13973
|
-
}
|
|
13974
|
-
pos++;
|
|
13975
|
-
const propertyValueStart = pos;
|
|
13976
|
-
const propertyValue = scanWordCharacters();
|
|
13977
|
-
if (pos === propertyValueStart) {
|
|
13978
|
-
error2(Diagnostics.Expected_a_Unicode_property_value);
|
|
13979
|
-
} else if (propertyName !== void 0 && !valuesOfNonBinaryUnicodeProperties[propertyName].has(propertyValue)) {
|
|
13980
|
-
error2(Diagnostics.Unknown_Unicode_property_value, propertyValueStart, pos - propertyValueStart);
|
|
13981
|
-
const suggestion = getSpellingSuggestion(propertyValue, valuesOfNonBinaryUnicodeProperties[propertyName], identity);
|
|
13982
|
-
if (suggestion) {
|
|
13983
|
-
error2(Diagnostics.Did_you_mean_0, propertyValueStart, pos - propertyValueStart, suggestion);
|
|
13984
|
-
}
|
|
13985
|
-
}
|
|
13986
|
-
} else {
|
|
13987
|
-
if (pos === propertyNameOrValueStart) {
|
|
13988
|
-
error2(Diagnostics.Expected_a_Unicode_property_name_or_value);
|
|
13989
|
-
} else if (binaryUnicodePropertiesOfStrings.has(propertyNameOrValue)) {
|
|
13990
|
-
if (!unicodeSetsMode) {
|
|
13991
|
-
error2(Diagnostics.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
13992
|
-
} else if (isCharacterComplement) {
|
|
13993
|
-
error2(Diagnostics.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
13994
|
-
} else {
|
|
13995
|
-
mayContainStrings = true;
|
|
13996
|
-
}
|
|
13997
|
-
} else if (!valuesOfNonBinaryUnicodeProperties.General_Category.has(propertyNameOrValue) && !binaryUnicodeProperties.has(propertyNameOrValue)) {
|
|
13998
|
-
error2(Diagnostics.Unknown_Unicode_property_name_or_value, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
|
13999
|
-
const suggestion = getSpellingSuggestion(propertyNameOrValue, [...valuesOfNonBinaryUnicodeProperties.General_Category, ...binaryUnicodeProperties, ...binaryUnicodePropertiesOfStrings], identity);
|
|
14000
|
-
if (suggestion) {
|
|
14001
|
-
error2(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
|
|
14002
|
-
}
|
|
14003
|
-
}
|
|
14004
|
-
}
|
|
14005
|
-
scanExpectedChar(125 /* closeBrace */);
|
|
14006
|
-
if (!unicodeMode) {
|
|
14007
|
-
error2(Diagnostics.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, start3, pos - start3);
|
|
14008
|
-
}
|
|
14009
|
-
} else if (unicodeMode) {
|
|
14010
|
-
error2(Diagnostics._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, pos - 2, 2, String.fromCharCode(ch));
|
|
14011
|
-
}
|
|
14012
|
-
return true;
|
|
14013
|
-
}
|
|
14014
|
-
return false;
|
|
14015
|
-
}
|
|
14016
|
-
function scanWordCharacters() {
|
|
14017
|
-
let value = "";
|
|
14018
|
-
while (pos < end2) {
|
|
14019
|
-
const ch = text2.charCodeAt(pos);
|
|
14020
|
-
if (!isWordCharacter(ch)) {
|
|
14021
|
-
break;
|
|
14022
|
-
}
|
|
14023
|
-
value += String.fromCharCode(ch);
|
|
14024
|
-
pos++;
|
|
14025
|
-
}
|
|
14026
|
-
return value;
|
|
14027
|
-
}
|
|
14028
|
-
function scanSourceCharacter() {
|
|
14029
|
-
const size = unicodeMode ? charSize(codePointAt(text2, pos)) : 1;
|
|
14030
|
-
pos += size;
|
|
14031
|
-
return text2.substring(pos - size, pos);
|
|
14032
|
-
}
|
|
14033
|
-
function scanExpectedChar(ch) {
|
|
14034
|
-
if (text2.charCodeAt(pos) === ch) {
|
|
14035
|
-
pos++;
|
|
14036
|
-
} else {
|
|
14037
|
-
error2(Diagnostics._0_expected, pos, 0, String.fromCharCode(ch));
|
|
14038
|
-
}
|
|
14039
|
-
}
|
|
14040
|
-
scanDisjunction(
|
|
14041
|
-
/*isInGroup*/
|
|
14042
|
-
false
|
|
14043
|
-
);
|
|
14044
|
-
forEach(groupNameReferences, (reference) => {
|
|
14045
|
-
if (!groupSpecifiers.has(reference.name)) {
|
|
14046
|
-
error2(Diagnostics.There_is_no_capturing_group_named_0_in_this_regular_expression, reference.pos, reference.end - reference.pos, reference.name);
|
|
14047
|
-
}
|
|
14048
|
-
});
|
|
14049
|
-
forEach(decimalEscapes, (escape) => {
|
|
14050
|
-
if (escape.value > numberOfCapturingGroups) {
|
|
14051
|
-
if (numberOfCapturingGroups) {
|
|
14052
|
-
error2(Diagnostics.A_decimal_escape_must_refer_to_an_existent_capturing_group_There_are_only_0_capturing_groups_in_this_regular_expression, escape.pos, escape.end - escape.pos, numberOfCapturingGroups);
|
|
14053
|
-
} else {
|
|
14054
|
-
error2(Diagnostics.Decimal_escapes_are_invalid_when_there_are_no_capturing_groups_in_a_regular_expression, escape.pos, escape.end - escape.pos);
|
|
14055
|
-
}
|
|
14056
|
-
}
|
|
14057
|
-
});
|
|
14058
|
-
}
|
|
14059
13176
|
}
|
|
14060
13177
|
function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
|
|
14061
13178
|
const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
|
|
@@ -14278,6 +13395,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
14278
13395
|
pos--;
|
|
14279
13396
|
const extendedCookedChar = peekExtendedUnicodeEscape();
|
|
14280
13397
|
if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
|
|
13398
|
+
pos += 3;
|
|
13399
|
+
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
14281
13400
|
tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
14282
13401
|
return token = getIdentifierToken();
|
|
14283
13402
|
}
|
|
@@ -14377,8 +13496,11 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
14377
13496
|
function setLanguageVariant(variant) {
|
|
14378
13497
|
languageVariant = variant;
|
|
14379
13498
|
}
|
|
14380
|
-
function
|
|
14381
|
-
|
|
13499
|
+
function setScriptKind(kind) {
|
|
13500
|
+
scriptKind = kind;
|
|
13501
|
+
}
|
|
13502
|
+
function setJSDocParsingMode(kind) {
|
|
13503
|
+
jsDocParsingMode = kind;
|
|
14382
13504
|
}
|
|
14383
13505
|
function resetTokenState(position) {
|
|
14384
13506
|
Debug.assert(position >= 0);
|
|
@@ -14415,22 +13537,6 @@ var utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fro
|
|
|
14415
13537
|
function utf16EncodeAsString(codePoint) {
|
|
14416
13538
|
return utf16EncodeAsStringWorker(codePoint);
|
|
14417
13539
|
}
|
|
14418
|
-
var nonBinaryUnicodeProperties = new Map(Object.entries({
|
|
14419
|
-
General_Category: "General_Category",
|
|
14420
|
-
gc: "General_Category",
|
|
14421
|
-
Script: "Script",
|
|
14422
|
-
sc: "Script",
|
|
14423
|
-
Script_Extensions: "Script_Extensions",
|
|
14424
|
-
scx: "Script_Extensions"
|
|
14425
|
-
}));
|
|
14426
|
-
var binaryUnicodeProperties = /* @__PURE__ */ new Set(["ASCII", "ASCII_Hex_Digit", "AHex", "Alphabetic", "Alpha", "Any", "Assigned", "Bidi_Control", "Bidi_C", "Bidi_Mirrored", "Bidi_M", "Case_Ignorable", "CI", "Cased", "Changes_When_Casefolded", "CWCF", "Changes_When_Casemapped", "CWCM", "Changes_When_Lowercased", "CWL", "Changes_When_NFKC_Casefolded", "CWKCF", "Changes_When_Titlecased", "CWT", "Changes_When_Uppercased", "CWU", "Dash", "Default_Ignorable_Code_Point", "DI", "Deprecated", "Dep", "Diacritic", "Dia", "Emoji", "Emoji_Component", "EComp", "Emoji_Modifier", "EMod", "Emoji_Modifier_Base", "EBase", "Emoji_Presentation", "EPres", "Extended_Pictographic", "ExtPict", "Extender", "Ext", "Grapheme_Base", "Gr_Base", "Grapheme_Extend", "Gr_Ext", "Hex_Digit", "Hex", "IDS_Binary_Operator", "IDSB", "IDS_Trinary_Operator", "IDST", "ID_Continue", "IDC", "ID_Start", "IDS", "Ideographic", "Ideo", "Join_Control", "Join_C", "Logical_Order_Exception", "LOE", "Lowercase", "Lower", "Math", "Noncharacter_Code_Point", "NChar", "Pattern_Syntax", "Pat_Syn", "Pattern_White_Space", "Pat_WS", "Quotation_Mark", "QMark", "Radical", "Regional_Indicator", "RI", "Sentence_Terminal", "STerm", "Soft_Dotted", "SD", "Terminal_Punctuation", "Term", "Unified_Ideograph", "UIdeo", "Uppercase", "Upper", "Variation_Selector", "VS", "White_Space", "space", "XID_Continue", "XIDC", "XID_Start", "XIDS"]);
|
|
14427
|
-
var binaryUnicodePropertiesOfStrings = /* @__PURE__ */ new Set(["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"]);
|
|
14428
|
-
var valuesOfNonBinaryUnicodeProperties = {
|
|
14429
|
-
General_Category: /* @__PURE__ */ new Set(["C", "Other", "Cc", "Control", "cntrl", "Cf", "Format", "Cn", "Unassigned", "Co", "Private_Use", "Cs", "Surrogate", "L", "Letter", "LC", "Cased_Letter", "Ll", "Lowercase_Letter", "Lm", "Modifier_Letter", "Lo", "Other_Letter", "Lt", "Titlecase_Letter", "Lu", "Uppercase_Letter", "M", "Mark", "Combining_Mark", "Mc", "Spacing_Mark", "Me", "Enclosing_Mark", "Mn", "Nonspacing_Mark", "N", "Number", "Nd", "Decimal_Number", "digit", "Nl", "Letter_Number", "No", "Other_Number", "P", "Punctuation", "punct", "Pc", "Connector_Punctuation", "Pd", "Dash_Punctuation", "Pe", "Close_Punctuation", "Pf", "Final_Punctuation", "Pi", "Initial_Punctuation", "Po", "Other_Punctuation", "Ps", "Open_Punctuation", "S", "Symbol", "Sc", "Currency_Symbol", "Sk", "Modifier_Symbol", "Sm", "Math_Symbol", "So", "Other_Symbol", "Z", "Separator", "Zl", "Line_Separator", "Zp", "Paragraph_Separator", "Zs", "Space_Separator"]),
|
|
14430
|
-
Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "Ahom", "Arab", "Arabic", "Armi", "Imperial_Aramaic", "Armn", "Armenian", "Avst", "Avestan", "Bali", "Balinese", "Bamu", "Bamum", "Bass", "Bassa_Vah", "Batk", "Batak", "Beng", "Bengali", "Bhks", "Bhaiksuki", "Bopo", "Bopomofo", "Brah", "Brahmi", "Brai", "Braille", "Bugi", "Buginese", "Buhd", "Buhid", "Cakm", "Chakma", "Cans", "Canadian_Aboriginal", "Cari", "Carian", "Cham", "Cham", "Cher", "Cherokee", "Chrs", "Chorasmian", "Copt", "Coptic", "Qaac", "Cpmn", "Cypro_Minoan", "Cprt", "Cypriot", "Cyrl", "Cyrillic", "Deva", "Devanagari", "Diak", "Dives_Akuru", "Dogr", "Dogra", "Dsrt", "Deseret", "Dupl", "Duployan", "Egyp", "Egyptian_Hieroglyphs", "Elba", "Elbasan", "Elym", "Elymaic", "Ethi", "Ethiopic", "Geor", "Georgian", "Glag", "Glagolitic", "Gong", "Gunjala_Gondi", "Gonm", "Masaram_Gondi", "Goth", "Gothic", "Gran", "Grantha", "Grek", "Greek", "Gujr", "Gujarati", "Guru", "Gurmukhi", "Hang", "Hangul", "Hani", "Han", "Hano", "Hanunoo", "Hatr", "Hatran", "Hebr", "Hebrew", "Hira", "Hiragana", "Hluw", "Anatolian_Hieroglyphs", "Hmng", "Pahawh_Hmong", "Hmnp", "Nyiakeng_Puachue_Hmong", "Hrkt", "Katakana_Or_Hiragana", "Hung", "Old_Hungarian", "Ital", "Old_Italic", "Java", "Javanese", "Kali", "Kayah_Li", "Kana", "Katakana", "Kawi", "Kawi", "Khar", "Kharoshthi", "Khmr", "Khmer", "Khoj", "Khojki", "Kits", "Khitan_Small_Script", "Knda", "Kannada", "Kthi", "Kaithi", "Lana", "Tai_Tham", "Laoo", "Lao", "Latn", "Latin", "Lepc", "Lepcha", "Limb", "Limbu", "Lina", "Linear_A", "Linb", "Linear_B", "Lisu", "Lisu", "Lyci", "Lycian", "Lydi", "Lydian", "Mahj", "Mahajani", "Maka", "Makasar", "Mand", "Mandaic", "Mani", "Manichaean", "Marc", "Marchen", "Medf", "Medefaidrin", "Mend", "Mende_Kikakui", "Merc", "Meroitic_Cursive", "Mero", "Meroitic_Hieroglyphs", "Mlym", "Malayalam", "Modi", "Modi", "Mong", "Mongolian", "Mroo", "Mro", "Mtei", "Meetei_Mayek", "Mult", "Multani", "Mymr", "Myanmar", "Nagm", "Nag_Mundari", "Nand", "Nandinagari", "Narb", "Old_North_Arabian", "Nbat", "Nabataean", "Newa", "Newa", "Nkoo", "Nko", "Nshu", "Nushu", "Ogam", "Ogham", "Olck", "Ol_Chiki", "Orkh", "Old_Turkic", "Orya", "Oriya", "Osge", "Osage", "Osma", "Osmanya", "Ougr", "Old_Uyghur", "Palm", "Palmyrene", "Pauc", "Pau_Cin_Hau", "Perm", "Old_Permic", "Phag", "Phags_Pa", "Phli", "Inscriptional_Pahlavi", "Phlp", "Psalter_Pahlavi", "Phnx", "Phoenician", "Plrd", "Miao", "Prti", "Inscriptional_Parthian", "Rjng", "Rejang", "Rohg", "Hanifi_Rohingya", "Runr", "Runic", "Samr", "Samaritan", "Sarb", "Old_South_Arabian", "Saur", "Saurashtra", "Sgnw", "SignWriting", "Shaw", "Shavian", "Shrd", "Sharada", "Sidd", "Siddham", "Sind", "Khudawadi", "Sinh", "Sinhala", "Sogd", "Sogdian", "Sogo", "Old_Sogdian", "Sora", "Sora_Sompeng", "Soyo", "Soyombo", "Sund", "Sundanese", "Sylo", "Syloti_Nagri", "Syrc", "Syriac", "Tagb", "Tagbanwa", "Takr", "Takri", "Tale", "Tai_Le", "Talu", "New_Tai_Lue", "Taml", "Tamil", "Tang", "Tangut", "Tavt", "Tai_Viet", "Telu", "Telugu", "Tfng", "Tifinagh", "Tglg", "Tagalog", "Thaa", "Thaana", "Thai", "Thai", "Tibt", "Tibetan", "Tirh", "Tirhuta", "Tnsa", "Tangsa", "Toto", "Toto", "Ugar", "Ugaritic", "Vaii", "Vai", "Vith", "Vithkuqi", "Wara", "Warang_Citi", "Wcho", "Wancho", "Xpeo", "Old_Persian", "Xsux", "Cuneiform", "Yezi", "Yezidi", "Yiii", "Yi", "Zanb", "Zanabazar_Square", "Zinh", "Inherited", "Qaai", "Zyyy", "Common", "Zzzz", "Unknown"]),
|
|
14431
|
-
Script_Extensions: /* @__PURE__ */ new Set()
|
|
14432
|
-
// Currently empty
|
|
14433
|
-
};
|
|
14434
13540
|
|
|
14435
13541
|
// src/compiler/utilitiesPublic.ts
|
|
14436
13542
|
function isExternalModuleNameRelative(moduleName) {
|
|
@@ -15369,6 +14475,9 @@ function isAccessor(node) {
|
|
|
15369
14475
|
function isAutoAccessorPropertyDeclaration(node) {
|
|
15370
14476
|
return isPropertyDeclaration(node) && hasAccessorModifier(node);
|
|
15371
14477
|
}
|
|
14478
|
+
function isClassFieldAndNotAutoAccessor(node) {
|
|
14479
|
+
return node.parent && isClassLike(node.parent) && isPropertyDeclaration(node) && !hasAccessorModifier(node);
|
|
14480
|
+
}
|
|
15372
14481
|
function isMethodOrAccessor(node) {
|
|
15373
14482
|
switch (node.kind) {
|
|
15374
14483
|
case 174 /* MethodDeclaration */:
|
|
@@ -16071,8 +15180,8 @@ function moduleResolutionIsEqualTo(oldResolution, newResolution) {
|
|
|
16071
15180
|
return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.node10Result === newResolution.node10Result;
|
|
16072
15181
|
}
|
|
16073
15182
|
function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) {
|
|
16074
|
-
var _a
|
|
16075
|
-
const node10Result = (
|
|
15183
|
+
var _a;
|
|
15184
|
+
const node10Result = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.node10Result;
|
|
16076
15185
|
const result = node10Result ? chainDiagnosticMessages(
|
|
16077
15186
|
/*details*/
|
|
16078
15187
|
void 0,
|
|
@@ -16114,14 +15223,14 @@ function packageIdToString(packageId) {
|
|
|
16114
15223
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
16115
15224
|
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
16116
15225
|
}
|
|
16117
|
-
function hasChangesInResolutions(names, newSourceFile, newResolutions,
|
|
15226
|
+
function hasChangesInResolutions(names, newSourceFile, newResolutions, getOldResolution, comparer, nameAndModeGetter) {
|
|
16118
15227
|
Debug.assert(names.length === newResolutions.length);
|
|
16119
15228
|
for (let i = 0; i < names.length; i++) {
|
|
16120
15229
|
const newResolution = newResolutions[i];
|
|
16121
15230
|
const entry = names[i];
|
|
16122
15231
|
const name = nameAndModeGetter.getName(entry);
|
|
16123
15232
|
const mode = nameAndModeGetter.getMode(entry, newSourceFile);
|
|
16124
|
-
const oldResolution =
|
|
15233
|
+
const oldResolution = getOldResolution(name, mode);
|
|
16125
15234
|
const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;
|
|
16126
15235
|
if (changed) {
|
|
16127
15236
|
return true;
|
|
@@ -21520,11 +20629,11 @@ function createSymlinkCache(cwd, getCanonicalFileName) {
|
|
|
21520
20629
|
(symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real);
|
|
21521
20630
|
}
|
|
21522
20631
|
},
|
|
21523
|
-
setSymlinksFromResolutions(
|
|
20632
|
+
setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, typeReferenceDirectives) {
|
|
21524
20633
|
Debug.assert(!hasProcessedResolutions);
|
|
21525
20634
|
hasProcessedResolutions = true;
|
|
21526
|
-
|
|
21527
|
-
|
|
20635
|
+
forEachResolvedModule((resolution) => processResolution(this, resolution.resolvedModule));
|
|
20636
|
+
forEachResolvedTypeReferenceDirective((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));
|
|
21528
20637
|
typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));
|
|
21529
20638
|
},
|
|
21530
20639
|
hasProcessedResolutions: () => hasProcessedResolutions
|
|
@@ -31565,7 +30674,7 @@ function gatherPossibleChildren(node) {
|
|
|
31565
30674
|
function setExternalModuleIndicator(sourceFile) {
|
|
31566
30675
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
31567
30676
|
}
|
|
31568
|
-
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind
|
|
30677
|
+
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
31569
30678
|
var _a, _b, _c, _d;
|
|
31570
30679
|
(_a = tracing) == null ? void 0 : _a.push(
|
|
31571
30680
|
tracing.Phase.Parse,
|
|
@@ -31580,7 +30689,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
31580
30689
|
const {
|
|
31581
30690
|
languageVersion,
|
|
31582
30691
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
31583
|
-
impliedNodeFormat: format
|
|
30692
|
+
impliedNodeFormat: format,
|
|
30693
|
+
jsDocParsingMode
|
|
31584
30694
|
} = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions };
|
|
31585
30695
|
if (languageVersion === 100 /* JSON */) {
|
|
31586
30696
|
result = Parser.parseSourceFile(
|
|
@@ -31592,7 +30702,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
31592
30702
|
setParentNodes,
|
|
31593
30703
|
6 /* JSON */,
|
|
31594
30704
|
noop,
|
|
31595
|
-
|
|
30705
|
+
jsDocParsingMode
|
|
31596
30706
|
);
|
|
31597
30707
|
} else {
|
|
31598
30708
|
const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
|
|
@@ -31608,7 +30718,7 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar
|
|
|
31608
30718
|
setParentNodes,
|
|
31609
30719
|
scriptKind,
|
|
31610
30720
|
setIndicator,
|
|
31611
|
-
|
|
30721
|
+
jsDocParsingMode
|
|
31612
30722
|
);
|
|
31613
30723
|
}
|
|
31614
30724
|
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
@@ -31742,7 +30852,7 @@ var Parser;
|
|
|
31742
30852
|
var contextFlags;
|
|
31743
30853
|
var topLevel = true;
|
|
31744
30854
|
var parseErrorBeforeNextFinishedNode = false;
|
|
31745
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride,
|
|
30855
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) {
|
|
31746
30856
|
var _a;
|
|
31747
30857
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
31748
30858
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -31764,9 +30874,8 @@ var Parser;
|
|
|
31764
30874
|
result2.pragmas = emptyMap;
|
|
31765
30875
|
return result2;
|
|
31766
30876
|
}
|
|
31767
|
-
|
|
31768
|
-
|
|
31769
|
-
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
|
|
30877
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);
|
|
30878
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);
|
|
31770
30879
|
clearState();
|
|
31771
30880
|
return result;
|
|
31772
30881
|
}
|
|
@@ -31779,8 +30888,7 @@ var Parser;
|
|
|
31779
30888
|
/*syntaxCursor*/
|
|
31780
30889
|
void 0,
|
|
31781
30890
|
1 /* JS */,
|
|
31782
|
-
/*
|
|
31783
|
-
false
|
|
30891
|
+
0 /* ParseAll */
|
|
31784
30892
|
);
|
|
31785
30893
|
nextToken();
|
|
31786
30894
|
const entityName = parseEntityName(
|
|
@@ -31793,15 +30901,7 @@ var Parser;
|
|
|
31793
30901
|
}
|
|
31794
30902
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
31795
30903
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
31796
|
-
initializeState(
|
|
31797
|
-
fileName2,
|
|
31798
|
-
sourceText2,
|
|
31799
|
-
languageVersion2,
|
|
31800
|
-
syntaxCursor2,
|
|
31801
|
-
6 /* JSON */,
|
|
31802
|
-
/*skipNonSemanticJSDoc*/
|
|
31803
|
-
false
|
|
31804
|
-
);
|
|
30904
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */);
|
|
31805
30905
|
sourceFlags = contextFlags;
|
|
31806
30906
|
nextToken();
|
|
31807
30907
|
const pos = getNodePos();
|
|
@@ -31882,7 +30982,7 @@ var Parser;
|
|
|
31882
30982
|
return result;
|
|
31883
30983
|
}
|
|
31884
30984
|
Parser2.parseJsonText = parseJsonText2;
|
|
31885
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind,
|
|
30985
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
|
|
31886
30986
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
31887
30987
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
31888
30988
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -31918,13 +31018,15 @@ var Parser;
|
|
|
31918
31018
|
scanner2.setOnError(scanError);
|
|
31919
31019
|
scanner2.setScriptTarget(languageVersion);
|
|
31920
31020
|
scanner2.setLanguageVariant(languageVariant);
|
|
31921
|
-
scanner2.
|
|
31021
|
+
scanner2.setScriptKind(scriptKind);
|
|
31022
|
+
scanner2.setJSDocParsingMode(_jsDocParsingMode);
|
|
31922
31023
|
}
|
|
31923
31024
|
function clearState() {
|
|
31924
31025
|
scanner2.clearCommentDirectives();
|
|
31925
31026
|
scanner2.setText("");
|
|
31926
31027
|
scanner2.setOnError(void 0);
|
|
31927
|
-
scanner2.
|
|
31028
|
+
scanner2.setScriptKind(0 /* Unknown */);
|
|
31029
|
+
scanner2.setJSDocParsingMode(0 /* ParseAll */);
|
|
31928
31030
|
sourceText = void 0;
|
|
31929
31031
|
languageVersion = void 0;
|
|
31930
31032
|
syntaxCursor = void 0;
|
|
@@ -31938,7 +31040,7 @@ var Parser;
|
|
|
31938
31040
|
notParenthesizedArrow = void 0;
|
|
31939
31041
|
topLevel = true;
|
|
31940
31042
|
}
|
|
31941
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2,
|
|
31043
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
|
|
31942
31044
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
31943
31045
|
if (isDeclarationFile) {
|
|
31944
31046
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -31957,7 +31059,7 @@ var Parser;
|
|
|
31957
31059
|
sourceFile.identifierCount = identifierCount;
|
|
31958
31060
|
sourceFile.identifiers = identifiers;
|
|
31959
31061
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
31960
|
-
sourceFile.
|
|
31062
|
+
sourceFile.jsDocParsingMode = jsDocParsingMode;
|
|
31961
31063
|
if (jsDocDiagnostics) {
|
|
31962
31064
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
31963
31065
|
}
|
|
@@ -32205,10 +31307,7 @@ var Parser;
|
|
|
32205
31307
|
function parseErrorAtPosition(start2, length2, message, ...args) {
|
|
32206
31308
|
const lastError = lastOrUndefined(parseDiagnostics);
|
|
32207
31309
|
let result;
|
|
32208
|
-
if (
|
|
32209
|
-
result = createDetachedDiagnostic(fileName, sourceText, start2, length2, message, ...args);
|
|
32210
|
-
addRelatedInfo(lastError, result);
|
|
32211
|
-
} else if (!lastError || start2 !== lastError.start) {
|
|
31310
|
+
if (!lastError || start2 !== lastError.start) {
|
|
32212
31311
|
result = createDetachedDiagnostic(fileName, sourceText, start2, length2, message, ...args);
|
|
32213
31312
|
parseDiagnostics.push(result);
|
|
32214
31313
|
}
|
|
@@ -32364,7 +31463,7 @@ var Parser;
|
|
|
32364
31463
|
parseErrorForInvalidName(Diagnostics.Type_alias_name_cannot_be_0, Diagnostics.Type_alias_must_be_given_a_name, 64 /* EqualsToken */);
|
|
32365
31464
|
return;
|
|
32366
31465
|
}
|
|
32367
|
-
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions,
|
|
31466
|
+
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, (n) => n) ?? getSpaceSuggestion(expressionText);
|
|
32368
31467
|
if (suggestion) {
|
|
32369
31468
|
parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);
|
|
32370
31469
|
return;
|
|
@@ -37395,8 +36494,7 @@ var Parser;
|
|
|
37395
36494
|
/*syntaxCursor*/
|
|
37396
36495
|
void 0,
|
|
37397
36496
|
1 /* JS */,
|
|
37398
|
-
/*
|
|
37399
|
-
false
|
|
36497
|
+
0 /* ParseAll */
|
|
37400
36498
|
);
|
|
37401
36499
|
scanner2.setText(content, start2, length2);
|
|
37402
36500
|
currentToken = scanner2.scan();
|
|
@@ -37461,8 +36559,7 @@ var Parser;
|
|
|
37461
36559
|
/*syntaxCursor*/
|
|
37462
36560
|
void 0,
|
|
37463
36561
|
1 /* JS */,
|
|
37464
|
-
/*
|
|
37465
|
-
false
|
|
36562
|
+
0 /* ParseAll */
|
|
37466
36563
|
);
|
|
37467
36564
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2));
|
|
37468
36565
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -38419,7 +37516,7 @@ var IncrementalParser;
|
|
|
38419
37516
|
true,
|
|
38420
37517
|
sourceFile.scriptKind,
|
|
38421
37518
|
sourceFile.setExternalModuleIndicator,
|
|
38422
|
-
sourceFile.
|
|
37519
|
+
sourceFile.jsDocParsingMode
|
|
38423
37520
|
);
|
|
38424
37521
|
}
|
|
38425
37522
|
const incrementalSourceFile = sourceFile;
|
|
@@ -38444,7 +37541,7 @@ var IncrementalParser;
|
|
|
38444
37541
|
true,
|
|
38445
37542
|
sourceFile.scriptKind,
|
|
38446
37543
|
sourceFile.setExternalModuleIndicator,
|
|
38447
|
-
sourceFile.
|
|
37544
|
+
sourceFile.jsDocParsingMode
|
|
38448
37545
|
);
|
|
38449
37546
|
result.commentDirectives = getNewCommentDirectives(
|
|
38450
37547
|
sourceFile.commentDirectives,
|
|
@@ -43700,7 +42797,9 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
|
|
|
43700
42797
|
extensionsToExtensionsArray(extensions),
|
|
43701
42798
|
/*excludes*/
|
|
43702
42799
|
void 0,
|
|
43703
|
-
[
|
|
42800
|
+
[
|
|
42801
|
+
isDeclarationFileName(target) ? target.replace("*", "**/*") : changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))
|
|
42802
|
+
]
|
|
43704
42803
|
).forEach((entry) => {
|
|
43705
42804
|
entrypoints = appendIfUnique(entrypoints, {
|
|
43706
42805
|
path: entry,
|
|
@@ -51907,7 +51006,7 @@ function createTypeChecker(host) {
|
|
|
51907
51006
|
return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0;
|
|
51908
51007
|
}
|
|
51909
51008
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
|
|
51910
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k
|
|
51009
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
51911
51010
|
if (startsWith(moduleReference, "@types/")) {
|
|
51912
51011
|
const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
51913
51012
|
const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
|
|
@@ -51925,7 +51024,7 @@ function createTypeChecker(host) {
|
|
|
51925
51024
|
const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = findAncestor(location, isImportCall)) == null ? void 0 : _a.arguments[0]) || ((_b = findAncestor(location, isImportDeclaration)) == null ? void 0 : _b.moduleSpecifier) || ((_c = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _c.moduleReference.expression) || ((_d = findAncestor(location, isExportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _e.name) || ((_f = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _f.argument.literal);
|
|
51926
51025
|
const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
|
|
51927
51026
|
const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);
|
|
51928
|
-
const resolvedModule = (
|
|
51027
|
+
const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule;
|
|
51929
51028
|
const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile);
|
|
51930
51029
|
const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName);
|
|
51931
51030
|
if (sourceFile) {
|
|
@@ -51933,7 +51032,7 @@ function createTypeChecker(host) {
|
|
|
51933
51032
|
error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);
|
|
51934
51033
|
}
|
|
51935
51034
|
if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) {
|
|
51936
|
-
const importOrExport = ((
|
|
51035
|
+
const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
|
|
51937
51036
|
if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) {
|
|
51938
51037
|
error2(
|
|
51939
51038
|
errorNode,
|
|
@@ -51942,7 +51041,7 @@ function createTypeChecker(host) {
|
|
|
51942
51041
|
);
|
|
51943
51042
|
}
|
|
51944
51043
|
} else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) {
|
|
51945
|
-
const importOrExport = ((
|
|
51044
|
+
const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
|
|
51946
51045
|
if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) {
|
|
51947
51046
|
const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference));
|
|
51948
51047
|
error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension);
|
|
@@ -51963,7 +51062,7 @@ function createTypeChecker(host) {
|
|
|
51963
51062
|
if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
|
|
51964
51063
|
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
|
|
51965
51064
|
const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
|
|
51966
|
-
const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (
|
|
51065
|
+
const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_j = overrideClauseHost.assertions) == null ? void 0 : _j.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause;
|
|
51967
51066
|
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) {
|
|
51968
51067
|
if (findAncestor(location, isImportEqualsDeclaration)) {
|
|
51969
51068
|
error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference);
|
|
@@ -52070,7 +51169,7 @@ function createTypeChecker(host) {
|
|
|
52070
51169
|
error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
52071
51170
|
} else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
52072
51171
|
const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
|
|
52073
|
-
const suggestedExt = (
|
|
51172
|
+
const suggestedExt = (_k = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _k[1];
|
|
52074
51173
|
if (suggestedExt) {
|
|
52075
51174
|
error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
|
|
52076
51175
|
} else {
|
|
@@ -58828,7 +57927,28 @@ function createTypeChecker(host) {
|
|
|
58828
57927
|
}
|
|
58829
57928
|
}
|
|
58830
57929
|
}
|
|
58831
|
-
|
|
57930
|
+
let resolved = combineSymbolTables(earlySymbols, lateSymbols);
|
|
57931
|
+
if (symbol.flags & 33554432 /* Transient */ && links.cjsExportMerged && symbol.declarations) {
|
|
57932
|
+
for (const decl of symbol.declarations) {
|
|
57933
|
+
const original = getSymbolLinks(decl.symbol)[resolutionKind];
|
|
57934
|
+
if (!resolved) {
|
|
57935
|
+
resolved = original;
|
|
57936
|
+
continue;
|
|
57937
|
+
}
|
|
57938
|
+
if (!original)
|
|
57939
|
+
continue;
|
|
57940
|
+
original.forEach((s, name) => {
|
|
57941
|
+
const existing = resolved.get(name);
|
|
57942
|
+
if (!existing)
|
|
57943
|
+
resolved.set(name, s);
|
|
57944
|
+
else if (existing === s)
|
|
57945
|
+
return;
|
|
57946
|
+
else
|
|
57947
|
+
resolved.set(name, mergeSymbol(existing, s));
|
|
57948
|
+
});
|
|
57949
|
+
}
|
|
57950
|
+
}
|
|
57951
|
+
links[resolutionKind] = resolved || emptySymbols;
|
|
58832
57952
|
}
|
|
58833
57953
|
return links[resolutionKind];
|
|
58834
57954
|
}
|
|
@@ -63210,7 +62330,7 @@ function createTypeChecker(host) {
|
|
|
63210
62330
|
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
|
|
63211
62331
|
}
|
|
63212
62332
|
function isPatternLiteralType(type) {
|
|
63213
|
-
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) &&
|
|
62333
|
+
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && everyContainedType(type.type, isPatternLiteralPlaceholderType);
|
|
63214
62334
|
}
|
|
63215
62335
|
function isGenericType(type) {
|
|
63216
62336
|
return !!getGenericObjectFlags(type);
|
|
@@ -74723,6 +73843,7 @@ function createTypeChecker(host) {
|
|
|
74723
73843
|
return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode);
|
|
74724
73844
|
}
|
|
74725
73845
|
function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) {
|
|
73846
|
+
var _a;
|
|
74726
73847
|
const flags = getDeclarationModifierFlagsFromSymbol(prop, writing);
|
|
74727
73848
|
if (isSuper) {
|
|
74728
73849
|
if (languageVersion < 2 /* ES2015 */) {
|
|
@@ -74739,6 +73860,12 @@ function createTypeChecker(host) {
|
|
|
74739
73860
|
}
|
|
74740
73861
|
return false;
|
|
74741
73862
|
}
|
|
73863
|
+
if (!(flags & 32 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassFieldAndNotAutoAccessor))) {
|
|
73864
|
+
if (errorNode) {
|
|
73865
|
+
error2(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop));
|
|
73866
|
+
}
|
|
73867
|
+
return false;
|
|
73868
|
+
}
|
|
74742
73869
|
}
|
|
74743
73870
|
if (flags & 256 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) {
|
|
74744
73871
|
const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
|
|
@@ -75144,11 +74271,17 @@ function createTypeChecker(host) {
|
|
|
75144
74271
|
return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);
|
|
75145
74272
|
}
|
|
75146
74273
|
function isUncheckedJSSuggestion(node, suggestion, excludeClasses) {
|
|
74274
|
+
var _a;
|
|
75147
74275
|
const file = getSourceFileOfNode(node);
|
|
75148
74276
|
if (file) {
|
|
75149
74277
|
if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) {
|
|
75150
74278
|
const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode);
|
|
75151
|
-
|
|
74279
|
+
const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a.length) || classOrConstructorParameterIsDecorated(
|
|
74280
|
+
/*useLegacyDecorators*/
|
|
74281
|
+
false,
|
|
74282
|
+
suggestion.valueDeclaration
|
|
74283
|
+
);
|
|
74284
|
+
return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */ && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && suggestionHasNoExtendsOrDecorators);
|
|
75152
74285
|
}
|
|
75153
74286
|
}
|
|
75154
74287
|
return false;
|
|
@@ -115036,6 +114169,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
|
|
|
115036
114169
|
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
115037
114170
|
extendedDiagnostics: compilerOptions.extendedDiagnostics,
|
|
115038
114171
|
onlyPrintJsDocStyle: true,
|
|
114172
|
+
omitBraceSourceMapPositions: true,
|
|
115039
114173
|
writeBundleFileInfo: !!bundleBuildInfo,
|
|
115040
114174
|
recordInternalSection: !!bundleBuildInfo,
|
|
115041
114175
|
relativeToBuildInfo
|
|
@@ -115446,6 +114580,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
115446
114580
|
onAfterEmitToken
|
|
115447
114581
|
} = handlers;
|
|
115448
114582
|
var extendedDiagnostics = !!printerOptions.extendedDiagnostics;
|
|
114583
|
+
var omitBraceSourcePositions = !!printerOptions.omitBraceSourceMapPositions;
|
|
115449
114584
|
var newLine = getNewLineCharacter(printerOptions);
|
|
115450
114585
|
var moduleKind = getEmitModuleKind(printerOptions);
|
|
115451
114586
|
var bundledHelpers = /* @__PURE__ */ new Map();
|
|
@@ -117441,7 +116576,11 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
117441
116576
|
decreaseIndent();
|
|
117442
116577
|
}
|
|
117443
116578
|
}
|
|
117444
|
-
|
|
116579
|
+
if (!omitBraceSourcePositions && (token === 19 /* OpenBraceToken */ || token === 20 /* CloseBraceToken */)) {
|
|
116580
|
+
pos = writeToken(token, pos, writer2, contextNode);
|
|
116581
|
+
} else {
|
|
116582
|
+
pos = writeTokenText(token, writer2, pos);
|
|
116583
|
+
}
|
|
117445
116584
|
if (isSimilarNode && contextNode.end !== pos) {
|
|
117446
116585
|
const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */;
|
|
117447
116586
|
emitTrailingCommentsOfPosition(
|
|
@@ -120673,7 +119812,7 @@ function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, ge
|
|
|
120673
119812
|
function createCompilerHost(options, setParentNodes) {
|
|
120674
119813
|
return createCompilerHostWorker(options, setParentNodes);
|
|
120675
119814
|
}
|
|
120676
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes
|
|
119815
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
|
|
120677
119816
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
120678
119817
|
let text;
|
|
120679
119818
|
try {
|
|
@@ -120687,15 +119826,7 @@ function createGetSourceFile(readFile, getCompilerOptions, setParentNodes, skipN
|
|
|
120687
119826
|
}
|
|
120688
119827
|
text = "";
|
|
120689
119828
|
}
|
|
120690
|
-
return text !== void 0 ? createSourceFile(
|
|
120691
|
-
fileName,
|
|
120692
|
-
text,
|
|
120693
|
-
languageVersionOrOptions,
|
|
120694
|
-
setParentNodes,
|
|
120695
|
-
/*scriptKind*/
|
|
120696
|
-
void 0,
|
|
120697
|
-
skipNonSemanticJSDocParsing
|
|
120698
|
-
) : void 0;
|
|
119829
|
+
return text !== void 0 ? createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : void 0;
|
|
120699
119830
|
};
|
|
120700
119831
|
}
|
|
120701
119832
|
function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {
|
|
@@ -120719,7 +119850,7 @@ function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryE
|
|
|
120719
119850
|
}
|
|
120720
119851
|
};
|
|
120721
119852
|
}
|
|
120722
|
-
function createCompilerHostWorker(options, setParentNodes,
|
|
119853
|
+
function createCompilerHostWorker(options, setParentNodes, system = sys) {
|
|
120723
119854
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
120724
119855
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
120725
119856
|
function directoryExists(directoryPath) {
|
|
@@ -120738,7 +119869,7 @@ function createCompilerHostWorker(options, setParentNodes, skipNonSemanticJSDocP
|
|
|
120738
119869
|
const newLine = getNewLineCharacter(options);
|
|
120739
119870
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
120740
119871
|
const compilerHost = {
|
|
120741
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes
|
|
119872
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes),
|
|
120742
119873
|
getDefaultLibLocation,
|
|
120743
119874
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
120744
119875
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -121222,14 +120353,14 @@ function isReferenceFileLocation(location) {
|
|
|
121222
120353
|
return location.pos !== void 0;
|
|
121223
120354
|
}
|
|
121224
120355
|
function getReferencedFileLocation(program, ref) {
|
|
121225
|
-
var _a, _b, _c, _d
|
|
120356
|
+
var _a, _b, _c, _d;
|
|
121226
120357
|
const file = Debug.checkDefined(program.getSourceFileByPath(ref.file));
|
|
121227
120358
|
const { kind, index } = ref;
|
|
121228
120359
|
let pos, end, packageId, resolutionMode;
|
|
121229
120360
|
switch (kind) {
|
|
121230
120361
|
case 3 /* Import */:
|
|
121231
120362
|
const importLiteral = getModuleNameStringLiteralAt(file, index);
|
|
121232
|
-
packageId = (
|
|
120363
|
+
packageId = (_b = (_a = program.getResolvedModule(file, importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.packageId;
|
|
121233
120364
|
if (importLiteral.pos === -1)
|
|
121234
120365
|
return { file, packageId, text: importLiteral.text };
|
|
121235
120366
|
pos = skipTrivia(file.text, importLiteral.pos);
|
|
@@ -121240,7 +120371,7 @@ function getReferencedFileLocation(program, ref) {
|
|
|
121240
120371
|
break;
|
|
121241
120372
|
case 5 /* TypeReferenceDirective */:
|
|
121242
120373
|
({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]);
|
|
121243
|
-
packageId = (
|
|
120374
|
+
packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file, toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId;
|
|
121244
120375
|
break;
|
|
121245
120376
|
case 7 /* LibReferenceDirective */:
|
|
121246
120377
|
({ pos, end } = file.libReferenceDirectives[index]);
|
|
@@ -121772,6 +120903,10 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121772
120903
|
resolvedModules,
|
|
121773
120904
|
resolvedTypeReferenceDirectiveNames,
|
|
121774
120905
|
resolvedLibReferences,
|
|
120906
|
+
getResolvedModule,
|
|
120907
|
+
getResolvedTypeReferenceDirective,
|
|
120908
|
+
forEachResolvedModule,
|
|
120909
|
+
forEachResolvedTypeReferenceDirective,
|
|
121775
120910
|
getCurrentPackagesMap: () => packageMap,
|
|
121776
120911
|
typesPackageExists,
|
|
121777
120912
|
packageBundlesTypes,
|
|
@@ -121815,19 +120950,35 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121815
120950
|
measure("Program", "beforeProgram", "afterProgram");
|
|
121816
120951
|
(_p = tracing) == null ? void 0 : _p.pop();
|
|
121817
120952
|
return program;
|
|
120953
|
+
function getResolvedModule(file, moduleName, mode) {
|
|
120954
|
+
var _a2;
|
|
120955
|
+
return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode);
|
|
120956
|
+
}
|
|
120957
|
+
function getResolvedTypeReferenceDirective(file, typeDirectiveName, mode) {
|
|
120958
|
+
var _a2;
|
|
120959
|
+
return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode);
|
|
120960
|
+
}
|
|
120961
|
+
function forEachResolvedModule(callback, file) {
|
|
120962
|
+
forEachResolution(resolvedModules, callback, file);
|
|
120963
|
+
}
|
|
120964
|
+
function forEachResolvedTypeReferenceDirective(callback, file) {
|
|
120965
|
+
forEachResolution(resolvedTypeReferenceDirectiveNames, callback, file);
|
|
120966
|
+
}
|
|
120967
|
+
function forEachResolution(resolutionCache, callback, file) {
|
|
120968
|
+
var _a2;
|
|
120969
|
+
if (file)
|
|
120970
|
+
(_a2 = resolutionCache == null ? void 0 : resolutionCache.get(file.path)) == null ? void 0 : _a2.forEach((resolution, name, mode) => callback(resolution, name, mode, file.path));
|
|
120971
|
+
else
|
|
120972
|
+
resolutionCache == null ? void 0 : resolutionCache.forEach((resolutions, filePath) => resolutions.forEach((resolution, name, mode) => callback(resolution, name, mode, filePath)));
|
|
120973
|
+
}
|
|
121818
120974
|
function getPackagesMap() {
|
|
121819
120975
|
if (packageMap)
|
|
121820
120976
|
return packageMap;
|
|
121821
120977
|
packageMap = /* @__PURE__ */ new Map();
|
|
121822
|
-
|
|
121823
|
-
(
|
|
121824
|
-
|
|
121825
|
-
|
|
121826
|
-
if (resolvedModule == null ? void 0 : resolvedModule.packageId)
|
|
121827
|
-
packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name));
|
|
121828
|
-
});
|
|
121829
|
-
}
|
|
121830
|
-
);
|
|
120978
|
+
forEachResolvedModule(({ resolvedModule }) => {
|
|
120979
|
+
if (resolvedModule == null ? void 0 : resolvedModule.packageId)
|
|
120980
|
+
packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name));
|
|
120981
|
+
});
|
|
121831
120982
|
return packageMap;
|
|
121832
120983
|
}
|
|
121833
120984
|
function typesPackageExists(packageName) {
|
|
@@ -121959,7 +121110,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121959
121110
|
return classifiableNames;
|
|
121960
121111
|
}
|
|
121961
121112
|
function resolveModuleNamesReusingOldState(moduleNames, file) {
|
|
121962
|
-
var _a2, _b2;
|
|
121963
121113
|
if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) {
|
|
121964
121114
|
return resolveModuleNamesWorker(
|
|
121965
121115
|
moduleNames,
|
|
@@ -121977,7 +121127,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121977
121127
|
const moduleName = moduleNames[i];
|
|
121978
121128
|
if (file === oldSourceFile && !hasInvalidatedResolutions(file.path)) {
|
|
121979
121129
|
const mode = getModeForUsageLocation(file, moduleName);
|
|
121980
|
-
const oldResolution =
|
|
121130
|
+
const oldResolution = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, mode);
|
|
121981
121131
|
if (oldResolution == null ? void 0 : oldResolution.resolvedModule) {
|
|
121982
121132
|
if (isTraceEnabled(options, host)) {
|
|
121983
121133
|
trace(
|
|
@@ -122024,8 +121174,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122024
121174
|
Debug.assert(j === resolutions.length);
|
|
122025
121175
|
return result;
|
|
122026
121176
|
function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) {
|
|
122027
|
-
var
|
|
122028
|
-
const resolutionToFile = (
|
|
121177
|
+
var _a2;
|
|
121178
|
+
const resolutionToFile = (_a2 = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation(file, moduleName))) == null ? void 0 : _a2.resolvedModule;
|
|
122029
121179
|
const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName);
|
|
122030
121180
|
if (resolutionToFile && resolvedFile) {
|
|
122031
121181
|
return false;
|
|
@@ -122041,7 +121191,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122041
121191
|
}
|
|
122042
121192
|
}
|
|
122043
121193
|
function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) {
|
|
122044
|
-
var _a2
|
|
121194
|
+
var _a2;
|
|
122045
121195
|
if (structureIsReused === 0 /* Not */) {
|
|
122046
121196
|
return resolveTypeReferenceDirectiveNamesWorker(
|
|
122047
121197
|
typeDirectiveNames,
|
|
@@ -122061,7 +121211,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122061
121211
|
if (canReuseResolutions) {
|
|
122062
121212
|
const typeDirectiveName = getTypeReferenceResolutionName(entry);
|
|
122063
121213
|
const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat);
|
|
122064
|
-
const oldResolution =
|
|
121214
|
+
const oldResolution = !isString(containingFile) ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingFile, typeDirectiveName, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode);
|
|
122065
121215
|
if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) {
|
|
122066
121216
|
if (isTraceEnabled(options, host)) {
|
|
122067
121217
|
trace(
|
|
@@ -122121,7 +121271,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122121
121271
|
);
|
|
122122
121272
|
}
|
|
122123
121273
|
function tryReuseStructureFromOldProgram() {
|
|
122124
|
-
var _a2
|
|
121274
|
+
var _a2;
|
|
122125
121275
|
if (!oldProgram) {
|
|
122126
121276
|
return 0 /* Not */;
|
|
122127
121277
|
}
|
|
@@ -122241,20 +121391,29 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122241
121391
|
const moduleNames = getModuleNames(newSourceFile);
|
|
122242
121392
|
const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
|
|
122243
121393
|
(resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions);
|
|
122244
|
-
const
|
|
122245
|
-
|
|
121394
|
+
const resolutionsChanged = hasChangesInResolutions(
|
|
121395
|
+
moduleNames,
|
|
121396
|
+
newSourceFile,
|
|
121397
|
+
resolutions,
|
|
121398
|
+
(name, mode) => oldProgram.getResolvedModule(newSourceFile, name, mode),
|
|
121399
|
+
moduleResolutionIsEqualTo,
|
|
121400
|
+
moduleResolutionNameAndModeGetter
|
|
121401
|
+
);
|
|
122246
121402
|
if (resolutionsChanged)
|
|
122247
121403
|
structureIsReused = 1 /* SafeModules */;
|
|
122248
121404
|
const typesReferenceDirectives = newSourceFile.typeReferenceDirectives;
|
|
122249
121405
|
const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile);
|
|
122250
121406
|
(resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, typeReferenceResolutions);
|
|
122251
|
-
const
|
|
122252
|
-
|
|
122253
|
-
|
|
121407
|
+
const typeReferenceResolutionsChanged = hasChangesInResolutions(
|
|
121408
|
+
typesReferenceDirectives,
|
|
121409
|
+
newSourceFile,
|
|
121410
|
+
typeReferenceResolutions,
|
|
121411
|
+
(name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(newSourceFile, name, mode),
|
|
121412
|
+
typeDirectiveIsEqualTo,
|
|
121413
|
+
typeReferenceResolutionNameAndModeGetter
|
|
121414
|
+
);
|
|
121415
|
+
if (typeReferenceResolutionsChanged)
|
|
122254
121416
|
structureIsReused = 1 /* SafeModules */;
|
|
122255
|
-
} else if (oldTypeResolutions) {
|
|
122256
|
-
(resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, oldTypeResolutions);
|
|
122257
|
-
}
|
|
122258
121417
|
}
|
|
122259
121418
|
if (structureIsReused !== 2 /* Completely */) {
|
|
122260
121419
|
return structureIsReused;
|
|
@@ -123124,7 +122283,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
123124
122283
|
const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2);
|
|
123125
122284
|
const languageVersion = getEmitScriptTarget(options2);
|
|
123126
122285
|
const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
|
|
123127
|
-
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 };
|
|
122286
|
+
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
|
|
123128
122287
|
}
|
|
123129
122288
|
function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
123130
122289
|
var _a2;
|
|
@@ -124401,7 +123560,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124401
123560
|
symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName);
|
|
124402
123561
|
}
|
|
124403
123562
|
if (files && !symlinks.hasProcessedResolutions()) {
|
|
124404
|
-
symlinks.setSymlinksFromResolutions(
|
|
123563
|
+
symlinks.setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, automaticTypeDirectiveResolutions);
|
|
124405
123564
|
}
|
|
124406
123565
|
return symlinks;
|
|
124407
123566
|
}
|
|
@@ -124763,7 +123922,6 @@ var BuilderState;
|
|
|
124763
123922
|
return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);
|
|
124764
123923
|
}
|
|
124765
123924
|
function getReferencedFiles(program, sourceFile, getCanonicalFileName) {
|
|
124766
|
-
var _a;
|
|
124767
123925
|
let referencedFiles;
|
|
124768
123926
|
if (sourceFile.imports && sourceFile.imports.length > 0) {
|
|
124769
123927
|
const checker = program.getTypeChecker();
|
|
@@ -124779,17 +123937,14 @@ var BuilderState;
|
|
|
124779
123937
|
addReferencedFile(referencedPath);
|
|
124780
123938
|
}
|
|
124781
123939
|
}
|
|
124782
|
-
|
|
124783
|
-
|
|
124784
|
-
|
|
124785
|
-
|
|
124786
|
-
|
|
124787
|
-
|
|
124788
|
-
|
|
124789
|
-
|
|
124790
|
-
addReferencedFile(typeFilePath);
|
|
124791
|
-
});
|
|
124792
|
-
}
|
|
123940
|
+
program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => {
|
|
123941
|
+
if (!resolvedTypeReferenceDirective) {
|
|
123942
|
+
return;
|
|
123943
|
+
}
|
|
123944
|
+
const fileName = resolvedTypeReferenceDirective.resolvedFileName;
|
|
123945
|
+
const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName);
|
|
123946
|
+
addReferencedFile(typeFilePath);
|
|
123947
|
+
}, sourceFile);
|
|
124793
123948
|
if (sourceFile.moduleAugmentations.length) {
|
|
124794
123949
|
const checker = program.getTypeChecker();
|
|
124795
123950
|
for (const moduleName of sourceFile.moduleAugmentations) {
|
|
@@ -126534,6 +125689,47 @@ function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirec
|
|
|
126534
125689
|
function getRootPathSplitLength(rootPath) {
|
|
126535
125690
|
return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0);
|
|
126536
125691
|
}
|
|
125692
|
+
function createModuleResolutionLoaderUsingGlobalCache(containingFile, redirectedReference, options, resolutionHost, moduleResolutionCache) {
|
|
125693
|
+
return {
|
|
125694
|
+
nameAndMode: moduleResolutionNameAndModeGetter,
|
|
125695
|
+
resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache(
|
|
125696
|
+
resolutionHost,
|
|
125697
|
+
moduleResolutionCache,
|
|
125698
|
+
moduleName,
|
|
125699
|
+
containingFile,
|
|
125700
|
+
options,
|
|
125701
|
+
redirectedReference,
|
|
125702
|
+
resoluionMode
|
|
125703
|
+
)
|
|
125704
|
+
};
|
|
125705
|
+
}
|
|
125706
|
+
function resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) {
|
|
125707
|
+
var _a;
|
|
125708
|
+
const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost;
|
|
125709
|
+
const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode);
|
|
125710
|
+
if (!resolutionHost.getGlobalCache) {
|
|
125711
|
+
return primaryResult;
|
|
125712
|
+
}
|
|
125713
|
+
const globalCache = resolutionHost.getGlobalCache();
|
|
125714
|
+
if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
|
125715
|
+
const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache(
|
|
125716
|
+
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
|
125717
|
+
resolutionHost.projectName,
|
|
125718
|
+
compilerOptions,
|
|
125719
|
+
host,
|
|
125720
|
+
globalCache,
|
|
125721
|
+
moduleResolutionCache
|
|
125722
|
+
);
|
|
125723
|
+
if (resolvedModule) {
|
|
125724
|
+
primaryResult.resolvedModule = resolvedModule;
|
|
125725
|
+
primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations);
|
|
125726
|
+
primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations);
|
|
125727
|
+
primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics);
|
|
125728
|
+
return primaryResult;
|
|
125729
|
+
}
|
|
125730
|
+
}
|
|
125731
|
+
return primaryResult;
|
|
125732
|
+
}
|
|
126537
125733
|
function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) {
|
|
126538
125734
|
let filesWithChangedSetOfUnresolvedImports;
|
|
126539
125735
|
let filesWithInvalidatedResolutions;
|
|
@@ -126580,6 +125776,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
126580
125776
|
const rootPathComponents = getPathComponents(rootPath);
|
|
126581
125777
|
const typeRootsWatches = /* @__PURE__ */ new Map();
|
|
126582
125778
|
return {
|
|
125779
|
+
rootDirForResolution,
|
|
125780
|
+
resolvedModuleNames,
|
|
125781
|
+
resolvedTypeReferenceDirectives,
|
|
125782
|
+
resolvedLibraries,
|
|
125783
|
+
resolvedFileToResolution,
|
|
125784
|
+
resolutionsWithFailedLookups,
|
|
125785
|
+
resolutionsWithOnlyAffectingLocations,
|
|
125786
|
+
directoryWatchesOfFailedLookups,
|
|
125787
|
+
fileWatchesOfAffectingLocations,
|
|
125788
|
+
watchFailedLookupLocationsOfExternalModuleResolutions,
|
|
126583
125789
|
getModuleResolutionCache: () => moduleResolutionCache,
|
|
126584
125790
|
startRecordingFilesWithChangedResolutions,
|
|
126585
125791
|
finishRecordingFilesWithChangedResolutions,
|
|
@@ -126682,7 +125888,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
126682
125888
|
if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) {
|
|
126683
125889
|
stopWatchFailedLookupLocationOfResolution(
|
|
126684
125890
|
resolution,
|
|
126685
|
-
resolutionHost.toPath(getInferredLibraryNameResolveFrom(
|
|
125891
|
+
resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)),
|
|
126686
125892
|
getResolvedModule
|
|
126687
125893
|
);
|
|
126688
125894
|
resolvedLibraries.delete(libFileName);
|
|
@@ -126724,58 +125930,22 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
126724
125930
|
}
|
|
126725
125931
|
});
|
|
126726
125932
|
}
|
|
126727
|
-
directoryWatchesOfFailedLookups.forEach(
|
|
126728
|
-
|
|
126729
|
-
directoryWatchesOfFailedLookups.delete(path);
|
|
126730
|
-
watcher.watcher.close();
|
|
126731
|
-
}
|
|
126732
|
-
});
|
|
126733
|
-
fileWatchesOfAffectingLocations.forEach((watcher, path) => {
|
|
126734
|
-
if (watcher.files === 0 && watcher.resolutions === 0) {
|
|
126735
|
-
fileWatchesOfAffectingLocations.delete(path);
|
|
126736
|
-
watcher.watcher.close();
|
|
126737
|
-
}
|
|
126738
|
-
});
|
|
125933
|
+
directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup);
|
|
125934
|
+
fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation);
|
|
126739
125935
|
hasChangedAutomaticTypeDirectiveNames = false;
|
|
126740
125936
|
}
|
|
126741
|
-
function
|
|
126742
|
-
|
|
126743
|
-
|
|
126744
|
-
|
|
126745
|
-
if (!resolutionHost.getGlobalCache) {
|
|
126746
|
-
return primaryResult;
|
|
125937
|
+
function closeDirectoryWatchesOfFailedLookup(watcher, path) {
|
|
125938
|
+
if (watcher.refCount === 0) {
|
|
125939
|
+
directoryWatchesOfFailedLookups.delete(path);
|
|
125940
|
+
watcher.watcher.close();
|
|
126747
125941
|
}
|
|
126748
|
-
const globalCache = resolutionHost.getGlobalCache();
|
|
126749
|
-
if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
|
126750
|
-
const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache(
|
|
126751
|
-
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
|
126752
|
-
resolutionHost.projectName,
|
|
126753
|
-
compilerOptions,
|
|
126754
|
-
host,
|
|
126755
|
-
globalCache,
|
|
126756
|
-
moduleResolutionCache
|
|
126757
|
-
);
|
|
126758
|
-
if (resolvedModule) {
|
|
126759
|
-
primaryResult.resolvedModule = resolvedModule;
|
|
126760
|
-
primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations);
|
|
126761
|
-
primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations);
|
|
126762
|
-
primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics);
|
|
126763
|
-
return primaryResult;
|
|
126764
|
-
}
|
|
126765
|
-
}
|
|
126766
|
-
return primaryResult;
|
|
126767
125942
|
}
|
|
126768
|
-
function
|
|
126769
|
-
|
|
126770
|
-
|
|
126771
|
-
|
|
126772
|
-
|
|
126773
|
-
|
|
126774
|
-
options,
|
|
126775
|
-
redirectedReference,
|
|
126776
|
-
resoluionMode
|
|
126777
|
-
)
|
|
126778
|
-
};
|
|
125943
|
+
function closeFileWatcherOfAffectingLocation(watcher, path) {
|
|
125944
|
+
var _a;
|
|
125945
|
+
if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {
|
|
125946
|
+
fileWatchesOfAffectingLocations.delete(path);
|
|
125947
|
+
watcher.watcher.close();
|
|
125948
|
+
}
|
|
126779
125949
|
}
|
|
126780
125950
|
function resolveNamesWithLocalCache({
|
|
126781
125951
|
entries,
|
|
@@ -126812,9 +125982,11 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
126812
125982
|
resolutionHost.onDiscoveredSymlink();
|
|
126813
125983
|
}
|
|
126814
125984
|
resolutionsInFile.set(name, mode, resolution);
|
|
126815
|
-
|
|
126816
|
-
|
|
126817
|
-
|
|
125985
|
+
if (resolution !== existingResolution) {
|
|
125986
|
+
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
125987
|
+
if (existingResolution) {
|
|
125988
|
+
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
|
125989
|
+
}
|
|
126818
125990
|
}
|
|
126819
125991
|
if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
|
|
126820
125992
|
filesWithChangedSetOfUnresolvedImports.push(path);
|
|
@@ -126903,10 +126075,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
126903
126075
|
options,
|
|
126904
126076
|
reusedNames,
|
|
126905
126077
|
perFileCache: resolvedModuleNames,
|
|
126906
|
-
loader:
|
|
126078
|
+
loader: createModuleResolutionLoaderUsingGlobalCache(
|
|
126907
126079
|
containingFile,
|
|
126908
126080
|
redirectedReference,
|
|
126909
|
-
options
|
|
126081
|
+
options,
|
|
126082
|
+
resolutionHost,
|
|
126083
|
+
moduleResolutionCache
|
|
126910
126084
|
),
|
|
126911
126085
|
getResolutionWithResolvedFileName: getResolvedModule,
|
|
126912
126086
|
shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
|
|
@@ -126960,7 +126134,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
126960
126134
|
);
|
|
126961
126135
|
if (resolution && !resolution.isInvalidated)
|
|
126962
126136
|
return resolution;
|
|
126963
|
-
return
|
|
126137
|
+
return resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, resolutionHost.getCompilationSettings());
|
|
126964
126138
|
}
|
|
126965
126139
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
126966
126140
|
return endsWith(dirPath, "/node_modules/@types");
|
|
@@ -127060,52 +126234,63 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127060
126234
|
return;
|
|
127061
126235
|
}
|
|
127062
126236
|
let locationToWatch = affectingLocation;
|
|
126237
|
+
let isSymlink = false;
|
|
126238
|
+
let symlinkWatcher;
|
|
127063
126239
|
if (resolutionHost.realpath) {
|
|
127064
126240
|
locationToWatch = resolutionHost.realpath(affectingLocation);
|
|
127065
126241
|
if (affectingLocation !== locationToWatch) {
|
|
127066
|
-
|
|
127067
|
-
|
|
127068
|
-
|
|
127069
|
-
|
|
127070
|
-
|
|
127071
|
-
|
|
127072
|
-
|
|
127073
|
-
|
|
127074
|
-
|
|
127075
|
-
|
|
127076
|
-
|
|
126242
|
+
isSymlink = true;
|
|
126243
|
+
symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch);
|
|
126244
|
+
}
|
|
126245
|
+
}
|
|
126246
|
+
const resolutions = forResolution ? 1 : 0;
|
|
126247
|
+
const files = forResolution ? 0 : 1;
|
|
126248
|
+
if (!isSymlink || !symlinkWatcher) {
|
|
126249
|
+
const watcher = {
|
|
126250
|
+
watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
126251
|
+
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
126252
|
+
invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap());
|
|
126253
|
+
resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
|
|
126254
|
+
}) : noopFileWatcher,
|
|
126255
|
+
resolutions: isSymlink ? 0 : resolutions,
|
|
126256
|
+
files: isSymlink ? 0 : files,
|
|
126257
|
+
symlinks: void 0
|
|
126258
|
+
};
|
|
126259
|
+
fileWatchesOfAffectingLocations.set(locationToWatch, watcher);
|
|
126260
|
+
if (isSymlink)
|
|
126261
|
+
symlinkWatcher = watcher;
|
|
127077
126262
|
}
|
|
127078
|
-
|
|
127079
|
-
|
|
127080
|
-
|
|
127081
|
-
|
|
127082
|
-
|
|
127083
|
-
|
|
127084
|
-
|
|
127085
|
-
|
|
127086
|
-
|
|
127087
|
-
|
|
127088
|
-
|
|
127089
|
-
|
|
127090
|
-
|
|
127091
|
-
|
|
127092
|
-
|
|
127093
|
-
|
|
127094
|
-
|
|
127095
|
-
actualWatcher.close();
|
|
127096
|
-
actualWatcher = noopFileWatcher;
|
|
127097
|
-
}
|
|
127098
|
-
} : actualWatcher,
|
|
127099
|
-
resolutions: forResolution ? 1 : 0,
|
|
127100
|
-
files: forResolution ? 0 : 1,
|
|
127101
|
-
paths
|
|
127102
|
-
};
|
|
127103
|
-
fileWatchesOfAffectingLocations.set(locationToWatch, watcher);
|
|
127104
|
-
if (affectingLocation !== locationToWatch) {
|
|
126263
|
+
if (isSymlink) {
|
|
126264
|
+
Debug.assert(!!symlinkWatcher);
|
|
126265
|
+
const watcher = {
|
|
126266
|
+
watcher: {
|
|
126267
|
+
close: () => {
|
|
126268
|
+
var _a;
|
|
126269
|
+
const symlinkWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch);
|
|
126270
|
+
if (((_a = symlinkWatcher2 == null ? void 0 : symlinkWatcher2.symlinks) == null ? void 0 : _a.delete(affectingLocation)) && !symlinkWatcher2.symlinks.size && !symlinkWatcher2.resolutions && !symlinkWatcher2.files) {
|
|
126271
|
+
fileWatchesOfAffectingLocations.delete(locationToWatch);
|
|
126272
|
+
symlinkWatcher2.watcher.close();
|
|
126273
|
+
}
|
|
126274
|
+
}
|
|
126275
|
+
},
|
|
126276
|
+
resolutions,
|
|
126277
|
+
files,
|
|
126278
|
+
symlinks: void 0
|
|
126279
|
+
};
|
|
127105
126280
|
fileWatchesOfAffectingLocations.set(affectingLocation, watcher);
|
|
127106
|
-
|
|
126281
|
+
(symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);
|
|
127107
126282
|
}
|
|
127108
126283
|
}
|
|
126284
|
+
function invalidateAffectingFileWatcher(path, packageJsonMap) {
|
|
126285
|
+
var _a;
|
|
126286
|
+
const watcher = fileWatchesOfAffectingLocations.get(path);
|
|
126287
|
+
if (watcher == null ? void 0 : watcher.resolutions)
|
|
126288
|
+
(affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path);
|
|
126289
|
+
if (watcher == null ? void 0 : watcher.files)
|
|
126290
|
+
(affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path);
|
|
126291
|
+
(_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap));
|
|
126292
|
+
packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path));
|
|
126293
|
+
}
|
|
127109
126294
|
function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) {
|
|
127110
126295
|
const program = resolutionHost.getCurrentProgram();
|
|
127111
126296
|
if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) {
|
|
@@ -127127,7 +126312,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127127
126312
|
directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive });
|
|
127128
126313
|
}
|
|
127129
126314
|
}
|
|
127130
|
-
function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) {
|
|
126315
|
+
function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove) {
|
|
127131
126316
|
const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);
|
|
127132
126317
|
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
|
127133
126318
|
failedLookupLocation,
|
|
@@ -127142,12 +126327,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127142
126327
|
if (dirPath === rootPath) {
|
|
127143
126328
|
removeAtRoot = true;
|
|
127144
126329
|
} else {
|
|
127145
|
-
removeDirectoryWatcher(dirPath);
|
|
126330
|
+
removeDirectoryWatcher(dirPath, syncDirWatcherRemove);
|
|
127146
126331
|
}
|
|
127147
126332
|
}
|
|
127148
126333
|
return removeAtRoot;
|
|
127149
126334
|
}
|
|
127150
|
-
function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) {
|
|
126335
|
+
function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) {
|
|
127151
126336
|
Debug.checkDefined(resolution.files).delete(filePath);
|
|
127152
126337
|
resolution.refCount--;
|
|
127153
126338
|
if (resolution.refCount) {
|
|
@@ -127165,13 +126350,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127165
126350
|
let removeAtRoot = false;
|
|
127166
126351
|
if (failedLookupLocations) {
|
|
127167
126352
|
for (const failedLookupLocation of failedLookupLocations) {
|
|
127168
|
-
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot);
|
|
126353
|
+
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove);
|
|
127169
126354
|
}
|
|
127170
126355
|
}
|
|
127171
126356
|
if (node10Result)
|
|
127172
|
-
removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot);
|
|
126357
|
+
removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove);
|
|
127173
126358
|
if (removeAtRoot)
|
|
127174
|
-
removeDirectoryWatcher(rootPath);
|
|
126359
|
+
removeDirectoryWatcher(rootPath, syncDirWatcherRemove);
|
|
127175
126360
|
} else if (affectingLocations == null ? void 0 : affectingLocations.length) {
|
|
127176
126361
|
resolutionsWithOnlyAffectingLocations.delete(resolution);
|
|
127177
126362
|
}
|
|
@@ -127179,12 +126364,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127179
126364
|
for (const affectingLocation of affectingLocations) {
|
|
127180
126365
|
const watcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
127181
126366
|
watcher.resolutions--;
|
|
126367
|
+
if (syncDirWatcherRemove)
|
|
126368
|
+
closeFileWatcherOfAffectingLocation(watcher, affectingLocation);
|
|
127182
126369
|
}
|
|
127183
126370
|
}
|
|
127184
126371
|
}
|
|
127185
|
-
function removeDirectoryWatcher(dirPath) {
|
|
126372
|
+
function removeDirectoryWatcher(dirPath, syncDirWatcherRemove) {
|
|
127186
126373
|
const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath);
|
|
127187
126374
|
dirWatcher.refCount--;
|
|
126375
|
+
if (syncDirWatcherRemove)
|
|
126376
|
+
closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath);
|
|
127188
126377
|
}
|
|
127189
126378
|
function createDirectoryWatcher(directory, dirPath, nonRecursive) {
|
|
127190
126379
|
return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => {
|
|
@@ -127195,10 +126384,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127195
126384
|
scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath);
|
|
127196
126385
|
}, nonRecursive ? 0 /* None */ : 1 /* Recursive */);
|
|
127197
126386
|
}
|
|
127198
|
-
function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) {
|
|
126387
|
+
function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) {
|
|
127199
126388
|
const resolutions = cache.get(filePath);
|
|
127200
126389
|
if (resolutions) {
|
|
127201
|
-
resolutions.forEach(
|
|
126390
|
+
resolutions.forEach(
|
|
126391
|
+
(resolution) => stopWatchFailedLookupLocationOfResolution(
|
|
126392
|
+
resolution,
|
|
126393
|
+
filePath,
|
|
126394
|
+
getResolutionWithResolvedFileName,
|
|
126395
|
+
syncDirWatcherRemove
|
|
126396
|
+
)
|
|
126397
|
+
);
|
|
127202
126398
|
cache.delete(filePath);
|
|
127203
126399
|
}
|
|
127204
126400
|
}
|
|
@@ -127213,9 +126409,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
127213
126409
|
return;
|
|
127214
126410
|
resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f)));
|
|
127215
126411
|
}
|
|
127216
|
-
function removeResolutionsOfFile(filePath) {
|
|
127217
|
-
removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule);
|
|
127218
|
-
removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective);
|
|
126412
|
+
function removeResolutionsOfFile(filePath, syncDirWatcherRemove) {
|
|
126413
|
+
removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove);
|
|
126414
|
+
removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove);
|
|
127219
126415
|
}
|
|
127220
126416
|
function invalidateResolutions(resolutions, canInvalidate) {
|
|
127221
126417
|
if (!resolutions)
|
|
@@ -127869,8 +127065,7 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
|
|
|
127869
127065
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
127870
127066
|
getCompilerOptions,
|
|
127871
127067
|
/*setParentNodes*/
|
|
127872
|
-
void 0
|
|
127873
|
-
host.skipNonSemanticJSDocParsing
|
|
127068
|
+
void 0
|
|
127874
127069
|
),
|
|
127875
127070
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
127876
127071
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -127892,7 +127087,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt
|
|
|
127892
127087
|
getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""),
|
|
127893
127088
|
createHash: maybeBind(host, host.createHash),
|
|
127894
127089
|
readDirectory: maybeBind(host, host.readDirectory),
|
|
127895
|
-
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit
|
|
127090
|
+
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
127091
|
+
jsDocParsingMode: host.jsDocParsingMode
|
|
127896
127092
|
};
|
|
127897
127093
|
return compilerHost;
|
|
127898
127094
|
}
|
|
@@ -128056,12 +127252,11 @@ function readBuilderProgram(compilerOptions, host) {
|
|
|
128056
127252
|
return void 0;
|
|
128057
127253
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
128058
127254
|
}
|
|
128059
|
-
function createIncrementalCompilerHost(options, system = sys
|
|
127255
|
+
function createIncrementalCompilerHost(options, system = sys) {
|
|
128060
127256
|
const host = createCompilerHostWorker(
|
|
128061
127257
|
options,
|
|
128062
127258
|
/*setParentNodes*/
|
|
128063
127259
|
void 0,
|
|
128064
|
-
skipNonSemanticJSDocParsing,
|
|
128065
127260
|
system
|
|
128066
127261
|
);
|
|
128067
127262
|
host.createHash = maybeBind(system, system.createHash);
|
|
@@ -128203,7 +127398,7 @@ function createWatchProgram(host) {
|
|
|
128203
127398
|
watchConfigFileWildCardDirectories();
|
|
128204
127399
|
if (configFileName)
|
|
128205
127400
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
128206
|
-
return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close };
|
|
127401
|
+
return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache };
|
|
128207
127402
|
function close() {
|
|
128208
127403
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
128209
127404
|
resolutionCache.clear();
|
|
@@ -128243,6 +127438,9 @@ function createWatchProgram(host) {
|
|
|
128243
127438
|
parsedConfigs = void 0;
|
|
128244
127439
|
}
|
|
128245
127440
|
}
|
|
127441
|
+
function getResolutionCache() {
|
|
127442
|
+
return resolutionCache;
|
|
127443
|
+
}
|
|
128246
127444
|
function getCurrentBuilderProgram() {
|
|
128247
127445
|
return builderProgram;
|
|
128248
127446
|
}
|
|
@@ -133613,7 +132811,7 @@ function indexInTextChange(change, name) {
|
|
|
133613
132811
|
return idx === -1 ? -1 : idx + 1;
|
|
133614
132812
|
}
|
|
133615
132813
|
function needsParentheses(expression) {
|
|
133616
|
-
return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || isAsExpression(expression) && isObjectLiteralExpression(expression.expression);
|
|
132814
|
+
return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || (isAsExpression(expression) || isSatisfiesExpression(expression)) && isObjectLiteralExpression(expression.expression);
|
|
133617
132815
|
}
|
|
133618
132816
|
function getContextualTypeFromParent(node, checker, contextFlags) {
|
|
133619
132817
|
const parent2 = walkUpParenthesizedExpressions(node.parent);
|
|
@@ -135985,10 +135183,10 @@ var DocumentHighlights;
|
|
|
135985
135183
|
function isDocumentRegistryEntry(entry) {
|
|
135986
135184
|
return !!entry.sourceFile;
|
|
135987
135185
|
}
|
|
135988
|
-
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
135989
|
-
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
135186
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) {
|
|
135187
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode);
|
|
135990
135188
|
}
|
|
135991
|
-
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
135189
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) {
|
|
135992
135190
|
const buckets = /* @__PURE__ */ new Map();
|
|
135993
135191
|
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
135994
135192
|
function reportStats() {
|
|
@@ -136072,9 +135270,11 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirec
|
|
|
136072
135270
|
const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
|
|
136073
135271
|
languageVersion: scriptTarget,
|
|
136074
135272
|
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),
|
|
136075
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings)
|
|
135273
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
|
|
135274
|
+
jsDocParsingMode
|
|
136076
135275
|
};
|
|
136077
135276
|
sourceFileOptions.languageVersion = scriptTarget;
|
|
135277
|
+
Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode);
|
|
136078
135278
|
const oldBucketCount = buckets.size;
|
|
136079
135279
|
const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat);
|
|
136080
135280
|
const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map());
|
|
@@ -136326,14 +135526,13 @@ function combinePathsSafe(pathA, pathB) {
|
|
|
136326
135526
|
return ensurePathIsNonModuleName(combineNormal(pathA, pathB));
|
|
136327
135527
|
}
|
|
136328
135528
|
function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) {
|
|
136329
|
-
var _a, _b;
|
|
136330
135529
|
if (importedModuleSymbol) {
|
|
136331
135530
|
const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName;
|
|
136332
135531
|
const newFileName = oldToNew(oldFileName);
|
|
136333
135532
|
return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true };
|
|
136334
135533
|
} else {
|
|
136335
135534
|
const mode = getModeForUsageLocation(importingSourceFile, importLiteral);
|
|
136336
|
-
const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ?
|
|
135535
|
+
const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? program.getResolvedModule(importingSourceFile, importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode);
|
|
136337
135536
|
return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles());
|
|
136338
135537
|
}
|
|
136339
135538
|
}
|
|
@@ -137228,7 +136427,7 @@ function createSourceFileLike(text, lineMap) {
|
|
|
137228
136427
|
// src/services/suggestionDiagnostics.ts
|
|
137229
136428
|
var visitedNestedConvertibleFunctions = /* @__PURE__ */ new Map();
|
|
137230
136429
|
function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) {
|
|
137231
|
-
var _a
|
|
136430
|
+
var _a;
|
|
137232
136431
|
program.getSemanticDiagnostics(sourceFile, cancellationToken);
|
|
137233
136432
|
const diags = [];
|
|
137234
136433
|
const checker = program.getTypeChecker();
|
|
@@ -137245,7 +136444,7 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) {
|
|
|
137245
136444
|
const name = importNameForConvertToDefaultImport(importNode);
|
|
137246
136445
|
if (!name)
|
|
137247
136446
|
continue;
|
|
137248
|
-
const module2 = (
|
|
136447
|
+
const module2 = (_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule;
|
|
137249
136448
|
const resolvedFile = module2 && program.getSourceFile(module2.resolvedFileName);
|
|
137250
136449
|
if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) {
|
|
137251
136450
|
diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import));
|
|
@@ -137495,7 +136694,8 @@ function transpileModule(input, transpileOptions) {
|
|
|
137495
136694
|
compilerHost,
|
|
137496
136695
|
options
|
|
137497
136696
|
),
|
|
137498
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(options)
|
|
136697
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(options),
|
|
136698
|
+
jsDocParsingMode: 1 /* ParseNone */
|
|
137499
136699
|
}
|
|
137500
136700
|
);
|
|
137501
136701
|
if (transpileOptions.moduleName) {
|
|
@@ -139648,10 +138848,10 @@ function getTargetFileImportsAndAddExportInOldFile(oldFile, targetFile, importsT
|
|
|
139648
138848
|
const targetSourceFile = program.getSourceFile(targetFile);
|
|
139649
138849
|
for (const oldStatement of oldFile.statements) {
|
|
139650
138850
|
forEachImportInStatement(oldStatement, (i) => {
|
|
139651
|
-
var _a
|
|
138851
|
+
var _a;
|
|
139652
138852
|
const moduleSpecifier = moduleSpecifierFromImport(i);
|
|
139653
|
-
const resolved =
|
|
139654
|
-
const fileName = (
|
|
138853
|
+
const resolved = program.getResolvedModule(oldFile, moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier));
|
|
138854
|
+
const fileName = (_a = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _a.resolvedFileName;
|
|
139655
138855
|
if (fileName && targetSourceFile) {
|
|
139656
138856
|
const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), targetSourceFile, targetSourceFile.path, fileName, createModuleSpecifierResolutionHost(program, host));
|
|
139657
138857
|
append(copiedOldImports, filterImport(i, makeStringLiteral(newModuleSpecifier, quotePreference), (name) => importsToCopy.has(checker.getSymbolAtLocation(name))));
|
|
@@ -140782,7 +139982,12 @@ function getConvertibleArrowFunctionAtPosition(file, startPosition, considerFunc
|
|
|
140782
139982
|
} else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock(func.body) && func.body.statements.length === 1) {
|
|
140783
139983
|
const firstStatement = first(func.body.statements);
|
|
140784
139984
|
if (isReturnStatement(firstStatement)) {
|
|
140785
|
-
|
|
139985
|
+
const expression = firstStatement.expression && isObjectLiteralExpression(getLeftmostExpression(
|
|
139986
|
+
firstStatement.expression,
|
|
139987
|
+
/*stopAtCallExpressions*/
|
|
139988
|
+
false
|
|
139989
|
+
)) ? factory.createParenthesizedExpression(firstStatement.expression) : firstStatement.expression;
|
|
139990
|
+
return { func, addBraces: false, expression, returnStatement: firstStatement };
|
|
140786
139991
|
}
|
|
140787
139992
|
}
|
|
140788
139993
|
return void 0;
|
|
@@ -141576,12 +140781,16 @@ function getRefactorActionsToConvertToTemplateString(context) {
|
|
|
141576
140781
|
const { file, startPosition } = context;
|
|
141577
140782
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
141578
140783
|
const maybeBinary = getParentBinaryExpression(node);
|
|
140784
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
141579
140785
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
141580
|
-
if (
|
|
140786
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
140787
|
+
return emptyArray;
|
|
140788
|
+
}
|
|
140789
|
+
if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
|
|
141581
140790
|
refactorInfo.actions.push(convertStringAction);
|
|
141582
140791
|
return [refactorInfo];
|
|
141583
140792
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
141584
|
-
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
140793
|
+
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });
|
|
141585
140794
|
return [refactorInfo];
|
|
141586
140795
|
}
|
|
141587
140796
|
return emptyArray;
|
|
@@ -144686,7 +143895,9 @@ var SyntaxTreeCache = class {
|
|
|
144686
143895
|
this.host,
|
|
144687
143896
|
this.host.getCompilationSettings()
|
|
144688
143897
|
),
|
|
144689
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings())
|
|
143898
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()),
|
|
143899
|
+
// These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll.
|
|
143900
|
+
jsDocParsingMode: 0 /* ParseAll */
|
|
144690
143901
|
};
|
|
144691
143902
|
sourceFile = createLanguageServiceSourceFile(
|
|
144692
143903
|
fileName,
|
|
@@ -144746,7 +143957,8 @@ function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version2, t
|
|
|
144746
143957
|
const options = {
|
|
144747
143958
|
languageVersion: sourceFile.languageVersion,
|
|
144748
143959
|
impliedNodeFormat: sourceFile.impliedNodeFormat,
|
|
144749
|
-
setExternalModuleIndicator: sourceFile.setExternalModuleIndicator
|
|
143960
|
+
setExternalModuleIndicator: sourceFile.setExternalModuleIndicator,
|
|
143961
|
+
jsDocParsingMode: sourceFile.jsDocParsingMode
|
|
144750
143962
|
};
|
|
144751
143963
|
return createLanguageServiceSourceFile(
|
|
144752
143964
|
sourceFile.fileName,
|
|
@@ -144948,7 +144160,8 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
144948
144160
|
resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences),
|
|
144949
144161
|
resolveLibrary: maybeBind(host, host.resolveLibrary),
|
|
144950
144162
|
useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),
|
|
144951
|
-
getParsedCommandLine
|
|
144163
|
+
getParsedCommandLine,
|
|
144164
|
+
jsDocParsingMode: host.jsDocParsingMode
|
|
144952
144165
|
};
|
|
144953
144166
|
const originalGetSourceFile = compilerHost.getSourceFile;
|
|
144954
144167
|
const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache(
|
|
@@ -146192,6 +145405,9 @@ var LanguageServiceShimHostAdapter = class {
|
|
|
146192
145405
|
return map(typeDirectiveNames, (name) => getProperty(typeDirectivesForFile, isString(name) ? name : toFileNameLowerCase(name.fileName)));
|
|
146193
145406
|
};
|
|
146194
145407
|
}
|
|
145408
|
+
if ("jsDocParsingMode" in this.shimHost) {
|
|
145409
|
+
this.jsDocParsingMode = this.shimHost.jsDocParsingMode;
|
|
145410
|
+
}
|
|
146195
145411
|
}
|
|
146196
145412
|
log(s) {
|
|
146197
145413
|
if (this.loggingEnabled) {
|
|
@@ -149933,9 +149149,9 @@ registerCodeFix({
|
|
|
149933
149149
|
}
|
|
149934
149150
|
});
|
|
149935
149151
|
function fixImportOfModuleExports(importingFile, exportingFile, program, changes, quotePreference) {
|
|
149936
|
-
var _a
|
|
149152
|
+
var _a;
|
|
149937
149153
|
for (const moduleSpecifier of importingFile.imports) {
|
|
149938
|
-
const imported = (
|
|
149154
|
+
const imported = (_a = program.getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule;
|
|
149939
149155
|
if (!imported || imported.resolvedFileName !== exportingFile.fileName) {
|
|
149940
149156
|
continue;
|
|
149941
149157
|
}
|
|
@@ -152056,11 +151272,11 @@ function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, pre
|
|
|
152056
151272
|
Debug.failBadSyntaxKind(aliasDeclaration);
|
|
152057
151273
|
}
|
|
152058
151274
|
function promoteImportClause(importClause) {
|
|
152059
|
-
var _a
|
|
151275
|
+
var _a;
|
|
152060
151276
|
changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile));
|
|
152061
151277
|
if (!compilerOptions.allowImportingTsExtensions) {
|
|
152062
151278
|
const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent);
|
|
152063
|
-
const resolvedModule = moduleSpecifier && ((
|
|
151279
|
+
const resolvedModule = moduleSpecifier && ((_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule);
|
|
152064
151280
|
if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) {
|
|
152065
151281
|
const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions));
|
|
152066
151282
|
changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension));
|
|
@@ -152728,7 +151944,7 @@ registerCodeFix({
|
|
|
152728
151944
|
}
|
|
152729
151945
|
});
|
|
152730
151946
|
function getInfo7(sourceFile, pos, program) {
|
|
152731
|
-
var _a, _b
|
|
151947
|
+
var _a, _b;
|
|
152732
151948
|
const token = getTokenAtPosition(sourceFile, pos);
|
|
152733
151949
|
if (isIdentifier(token)) {
|
|
152734
151950
|
const importDeclaration = findAncestor(token, isImportDeclaration);
|
|
@@ -152737,18 +151953,19 @@ function getInfo7(sourceFile, pos, program) {
|
|
|
152737
151953
|
const moduleSpecifier = isStringLiteral(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier.text : void 0;
|
|
152738
151954
|
if (moduleSpecifier === void 0)
|
|
152739
151955
|
return void 0;
|
|
152740
|
-
const resolvedModule = (
|
|
151956
|
+
const resolvedModule = (_a = program.getResolvedModule(
|
|
151957
|
+
sourceFile,
|
|
152741
151958
|
moduleSpecifier,
|
|
152742
151959
|
/*mode*/
|
|
152743
151960
|
void 0
|
|
152744
|
-
)) == null ? void 0 :
|
|
151961
|
+
)) == null ? void 0 : _a.resolvedModule;
|
|
152745
151962
|
if (resolvedModule === void 0)
|
|
152746
151963
|
return void 0;
|
|
152747
151964
|
const moduleSourceFile = program.getSourceFile(resolvedModule.resolvedFileName);
|
|
152748
151965
|
if (moduleSourceFile === void 0 || isSourceFileFromLibrary(program, moduleSourceFile))
|
|
152749
151966
|
return void 0;
|
|
152750
151967
|
const moduleSymbol = moduleSourceFile.symbol;
|
|
152751
|
-
const locals = (
|
|
151968
|
+
const locals = (_b = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _b.locals;
|
|
152752
151969
|
if (locals === void 0)
|
|
152753
151970
|
return void 0;
|
|
152754
151971
|
const localSymbol = locals.get(token.escapedText);
|
|
@@ -153003,10 +152220,10 @@ function convertSemanticMeaningToSymbolFlags(meaning) {
|
|
|
153003
152220
|
return flags;
|
|
153004
152221
|
}
|
|
153005
152222
|
function getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration) {
|
|
153006
|
-
var _a
|
|
152223
|
+
var _a;
|
|
153007
152224
|
if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier))
|
|
153008
152225
|
return void 0;
|
|
153009
|
-
const resolvedModule = (
|
|
152226
|
+
const resolvedModule = (_a = context.program.getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier))) == null ? void 0 : _a.resolvedModule;
|
|
153010
152227
|
if (!resolvedModule)
|
|
153011
152228
|
return void 0;
|
|
153012
152229
|
return context.program.getSourceFile(resolvedModule.resolvedFileName);
|
|
@@ -162004,8 +161221,9 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h
|
|
|
162004
161221
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries };
|
|
162005
161222
|
}
|
|
162006
161223
|
case 2 /* Types */: {
|
|
161224
|
+
const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), "'") ? 39 /* singleQuote */ : 34 /* doubleQuote */;
|
|
162007
161225
|
const entries = completion.types.map((type) => ({
|
|
162008
|
-
name: type.value,
|
|
161226
|
+
name: escapeString(type.value, quoteChar),
|
|
162009
161227
|
kindModifiers: "" /* none */,
|
|
162010
161228
|
kind: "string" /* string */,
|
|
162011
161229
|
sortText: SortText.LocationPriority,
|
|
@@ -162761,7 +161979,7 @@ function isPathRelativeToScript(path) {
|
|
|
162761
161979
|
}
|
|
162762
161980
|
return false;
|
|
162763
161981
|
}
|
|
162764
|
-
var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\
|
|
161982
|
+
var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
|
|
162765
161983
|
var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
|
|
162766
161984
|
function containsSlash(fragment) {
|
|
162767
161985
|
return fragment.includes(directorySeparator);
|
|
@@ -163809,7 +163027,7 @@ function declarationIsWriteAccess(decl) {
|
|
|
163809
163027
|
var Core;
|
|
163810
163028
|
((Core2) => {
|
|
163811
163029
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
163812
|
-
var _a, _b
|
|
163030
|
+
var _a, _b;
|
|
163813
163031
|
node = getAdjustedNode2(node, options);
|
|
163814
163032
|
if (isSourceFile(node)) {
|
|
163815
163033
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
@@ -163848,7 +163066,7 @@ var Core;
|
|
|
163848
163066
|
if (!options.implementations && isStringLiteralLike(node)) {
|
|
163849
163067
|
if (isModuleSpecifierLike(node)) {
|
|
163850
163068
|
const fileIncludeReasons = program.getFileIncludeReasons();
|
|
163851
|
-
const referencedFileName = (
|
|
163069
|
+
const referencedFileName = (_b = (_a = program.getResolvedModule(node.getSourceFile(), node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.resolvedFileName;
|
|
163852
163070
|
const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0;
|
|
163853
163071
|
if (referencedFile) {
|
|
163854
163072
|
return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }];
|
|
@@ -165251,7 +164469,7 @@ __export(ts_GoToDefinition_exports, {
|
|
|
165251
164469
|
|
|
165252
164470
|
// src/services/goToDefinition.ts
|
|
165253
164471
|
function getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) {
|
|
165254
|
-
var _a
|
|
164472
|
+
var _a;
|
|
165255
164473
|
const resolvedRef = getReferenceAtPosition(sourceFile, position, program);
|
|
165256
164474
|
const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray;
|
|
165257
164475
|
if (resolvedRef == null ? void 0 : resolvedRef.file) {
|
|
@@ -165324,7 +164542,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles
|
|
|
165324
164542
|
}
|
|
165325
164543
|
}
|
|
165326
164544
|
if (!symbol && isModuleSpecifierLike(fallbackNode)) {
|
|
165327
|
-
const ref = (
|
|
164545
|
+
const ref = (_a = program.getResolvedModule(sourceFile, fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _a.resolvedModule;
|
|
165328
164546
|
if (ref) {
|
|
165329
164547
|
return [{
|
|
165330
164548
|
name: fallbackNode.text,
|
|
@@ -165419,7 +164637,7 @@ function getDefinitionFromOverriddenMember(typeChecker, node) {
|
|
|
165419
164637
|
return getDefinitionFromSymbol(typeChecker, symbol, node);
|
|
165420
164638
|
}
|
|
165421
164639
|
function getReferenceAtPosition(sourceFile, position, program) {
|
|
165422
|
-
var _a, _b
|
|
164640
|
+
var _a, _b;
|
|
165423
164641
|
const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position);
|
|
165424
164642
|
if (referencePath) {
|
|
165425
164643
|
const file = program.getSourceFileFromReference(sourceFile, referencePath);
|
|
@@ -165436,11 +164654,11 @@ function getReferenceAtPosition(sourceFile, position, program) {
|
|
|
165436
164654
|
const file = program.getLibFileFromReference(libReferenceDirective);
|
|
165437
164655
|
return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false };
|
|
165438
164656
|
}
|
|
165439
|
-
|
|
165440
|
-
if (resolvedModules == null ? void 0 : resolvedModules.size()) {
|
|
164657
|
+
if (sourceFile.imports.length || sourceFile.moduleAugmentations.length) {
|
|
165441
164658
|
const node = getTouchingToken(sourceFile, position);
|
|
165442
|
-
|
|
165443
|
-
|
|
164659
|
+
let resolution;
|
|
164660
|
+
if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && (resolution = program.getResolvedModule(sourceFile, node.text, getModeForUsageLocation(sourceFile, node)))) {
|
|
164661
|
+
const verifiedFileName = (_b = resolution.resolvedModule) == null ? void 0 : _b.resolvedFileName;
|
|
165444
164662
|
const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text);
|
|
165445
164663
|
return {
|
|
165446
164664
|
file: program.getSourceFile(fileName),
|
|
@@ -170202,7 +169420,7 @@ var changesToText;
|
|
|
170202
169420
|
const sourceFile = createSourceFile(
|
|
170203
169421
|
"any file name",
|
|
170204
169422
|
nonFormattedText,
|
|
170205
|
-
99 /* ESNext */,
|
|
169423
|
+
{ languageVersion: 99 /* ESNext */, jsDocParsingMode: 1 /* ParseNone */ },
|
|
170206
169424
|
/*setParentNodes*/
|
|
170207
169425
|
true,
|
|
170208
169426
|
scriptKind
|
|
@@ -173487,6 +172705,7 @@ __export(ts_exports2, {
|
|
|
173487
172705
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
173488
172706
|
InternalSymbolName: () => InternalSymbolName,
|
|
173489
172707
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
172708
|
+
JSDocParsingMode: () => JSDocParsingMode,
|
|
173490
172709
|
JsDoc: () => ts_JsDoc_exports,
|
|
173491
172710
|
JsTyping: () => ts_JsTyping_exports,
|
|
173492
172711
|
JsxEmit: () => JsxEmit,
|
|
@@ -173531,7 +172750,6 @@ __export(ts_exports2, {
|
|
|
173531
172750
|
PrivateIdentifierKind: () => PrivateIdentifierKind,
|
|
173532
172751
|
ProcessLevel: () => ProcessLevel,
|
|
173533
172752
|
QuotePreference: () => QuotePreference,
|
|
173534
|
-
RegularExpressionFlags: () => RegularExpressionFlags,
|
|
173535
172753
|
RelationComparisonResult: () => RelationComparisonResult,
|
|
173536
172754
|
Rename: () => ts_Rename_exports,
|
|
173537
172755
|
ScriptElementKind: () => ScriptElementKind,
|
|
@@ -173658,7 +172876,6 @@ __export(ts_exports2, {
|
|
|
173658
172876
|
changeExtension: () => changeExtension,
|
|
173659
172877
|
changesAffectModuleResolution: () => changesAffectModuleResolution,
|
|
173660
172878
|
changesAffectingProgramStructure: () => changesAffectingProgramStructure,
|
|
173661
|
-
characterToRegularExpressionFlag: () => characterToRegularExpressionFlag,
|
|
173662
172879
|
childIsDecorated: () => childIsDecorated,
|
|
173663
172880
|
classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated,
|
|
173664
172881
|
classHasClassThisAssignment: () => classHasClassThisAssignment,
|
|
@@ -173816,6 +173033,7 @@ __export(ts_exports2, {
|
|
|
173816
173033
|
createModuleNotFoundChain: () => createModuleNotFoundChain,
|
|
173817
173034
|
createModuleResolutionCache: () => createModuleResolutionCache,
|
|
173818
173035
|
createModuleResolutionLoader: () => createModuleResolutionLoader,
|
|
173036
|
+
createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache,
|
|
173819
173037
|
createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,
|
|
173820
173038
|
createMultiMap: () => createMultiMap,
|
|
173821
173039
|
createNodeConverters: () => createNodeConverters,
|
|
@@ -174244,6 +173462,7 @@ __export(ts_exports2, {
|
|
|
174244
173462
|
getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,
|
|
174245
173463
|
getLeftmostAccessExpression: () => getLeftmostAccessExpression,
|
|
174246
173464
|
getLeftmostExpression: () => getLeftmostExpression,
|
|
173465
|
+
getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,
|
|
174247
173466
|
getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,
|
|
174248
173467
|
getLineInfo: () => getLineInfo,
|
|
174249
173468
|
getLineOfLocalPosition: () => getLineOfLocalPosition,
|
|
@@ -174638,6 +173857,7 @@ __export(ts_exports2, {
|
|
|
174638
173857
|
isClassDeclaration: () => isClassDeclaration,
|
|
174639
173858
|
isClassElement: () => isClassElement,
|
|
174640
173859
|
isClassExpression: () => isClassExpression,
|
|
173860
|
+
isClassFieldAndNotAutoAccessor: () => isClassFieldAndNotAutoAccessor,
|
|
174641
173861
|
isClassLike: () => isClassLike,
|
|
174642
173862
|
isClassMemberModifier: () => isClassMemberModifier,
|
|
174643
173863
|
isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock,
|
|
@@ -175415,7 +174635,6 @@ __export(ts_exports2, {
|
|
|
175415
174635
|
reducePathComponents: () => reducePathComponents,
|
|
175416
174636
|
refactor: () => ts_refactor_exports,
|
|
175417
174637
|
regExpEscape: () => regExpEscape,
|
|
175418
|
-
regularExpressionFlagToCharacter: () => regularExpressionFlagToCharacter,
|
|
175419
174638
|
relativeComplement: () => relativeComplement,
|
|
175420
174639
|
removeAllComments: () => removeAllComments,
|
|
175421
174640
|
removeEmitHelper: () => removeEmitHelper,
|
|
@@ -175857,9 +175076,12 @@ __export(ts_server_exports3, {
|
|
|
175857
175076
|
AutoImportProviderProject: () => AutoImportProviderProject,
|
|
175858
175077
|
AuxiliaryProject: () => AuxiliaryProject,
|
|
175859
175078
|
CharRangeSection: () => CharRangeSection,
|
|
175079
|
+
CloseFileWatcherEvent: () => CloseFileWatcherEvent,
|
|
175860
175080
|
CommandNames: () => CommandNames,
|
|
175861
175081
|
ConfigFileDiagEvent: () => ConfigFileDiagEvent,
|
|
175862
175082
|
ConfiguredProject: () => ConfiguredProject2,
|
|
175083
|
+
CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent,
|
|
175084
|
+
CreateFileWatcherEvent: () => CreateFileWatcherEvent,
|
|
175863
175085
|
Errors: () => Errors,
|
|
175864
175086
|
EventBeginInstallTypes: () => EventBeginInstallTypes,
|
|
175865
175087
|
EventEndInstallTypes: () => EventEndInstallTypes,
|
|
@@ -176615,6 +175837,7 @@ var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => {
|
|
|
176615
175837
|
CommandTypes2["ProvideCallHierarchyIncomingCalls"] = "provideCallHierarchyIncomingCalls";
|
|
176616
175838
|
CommandTypes2["ProvideCallHierarchyOutgoingCalls"] = "provideCallHierarchyOutgoingCalls";
|
|
176617
175839
|
CommandTypes2["ProvideInlayHints"] = "provideInlayHints";
|
|
175840
|
+
CommandTypes2["WatchChange"] = "watchChange";
|
|
176618
175841
|
return CommandTypes2;
|
|
176619
175842
|
})(CommandTypes || {});
|
|
176620
175843
|
var OrganizeImportsMode2 = /* @__PURE__ */ ((OrganizeImportsMode3) => {
|
|
@@ -177453,6 +176676,7 @@ var Project3 = class _Project {
|
|
|
177453
176676
|
this.directoryStructureHost = directoryStructureHost;
|
|
177454
176677
|
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
|
|
177455
176678
|
this.getCanonicalFileName = this.projectService.toCanonicalFileName;
|
|
176679
|
+
this.jsDocParsingMode = this.projectService.jsDocParsingMode;
|
|
177456
176680
|
this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
|
|
177457
176681
|
if (!this.compilerOptions) {
|
|
177458
176682
|
this.compilerOptions = getDefaultCompilerOptions2();
|
|
@@ -177577,8 +176801,8 @@ var Project3 = class _Project {
|
|
|
177577
176801
|
}
|
|
177578
176802
|
if (this.program && !this.symlinks.hasProcessedResolutions()) {
|
|
177579
176803
|
this.symlinks.setSymlinksFromResolutions(
|
|
177580
|
-
this.program.
|
|
177581
|
-
this.program.
|
|
176804
|
+
this.program.forEachResolvedModule,
|
|
176805
|
+
this.program.forEachResolvedTypeReferenceDirective,
|
|
177582
176806
|
this.program.getAutomaticTypeDirectiveResolutions()
|
|
177583
176807
|
);
|
|
177584
176808
|
}
|
|
@@ -178361,12 +177585,23 @@ var Project3 = class _Project {
|
|
|
178361
177585
|
for (const f of oldProgram.getSourceFiles()) {
|
|
178362
177586
|
const newFile = this.program.getSourceFileByPath(f.resolvedPath);
|
|
178363
177587
|
if (!newFile || f.resolvedPath === f.path && newFile.resolvedPath !== f.path) {
|
|
178364
|
-
this.detachScriptInfoFromProject(
|
|
177588
|
+
this.detachScriptInfoFromProject(
|
|
177589
|
+
f.fileName,
|
|
177590
|
+
!!this.program.getSourceFileByPath(f.path),
|
|
177591
|
+
/*syncDirWatcherRemove*/
|
|
177592
|
+
true
|
|
177593
|
+
);
|
|
178365
177594
|
}
|
|
178366
177595
|
}
|
|
178367
177596
|
oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => {
|
|
178368
177597
|
if (!this.program.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) {
|
|
178369
|
-
this.detachScriptInfoFromProject(
|
|
177598
|
+
this.detachScriptInfoFromProject(
|
|
177599
|
+
resolvedProjectReference.sourceFile.fileName,
|
|
177600
|
+
/*noRemoveResolution*/
|
|
177601
|
+
void 0,
|
|
177602
|
+
/*syncDirWatcherRemove*/
|
|
177603
|
+
true
|
|
177604
|
+
);
|
|
178370
177605
|
}
|
|
178371
177606
|
});
|
|
178372
177607
|
}
|
|
@@ -178406,6 +177641,7 @@ var Project3 = class _Project {
|
|
|
178406
177641
|
this.resolutionCache.updateTypeRootsWatch();
|
|
178407
177642
|
}
|
|
178408
177643
|
}
|
|
177644
|
+
this.projectService.verifyProgram(this);
|
|
178409
177645
|
if (this.exportMapCache && !this.exportMapCache.isEmpty()) {
|
|
178410
177646
|
this.exportMapCache.releaseSymbols();
|
|
178411
177647
|
if (this.hasAddedorRemovedFiles || oldProgram && !this.program.structureIsReused) {
|
|
@@ -178478,12 +177714,12 @@ var Project3 = class _Project {
|
|
|
178478
177714
|
sendPerformanceEvent(kind, durationMs) {
|
|
178479
177715
|
this.projectService.sendPerformanceEvent(kind, durationMs);
|
|
178480
177716
|
}
|
|
178481
|
-
detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution) {
|
|
177717
|
+
detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution, syncDirWatcherRemove) {
|
|
178482
177718
|
const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName);
|
|
178483
177719
|
if (scriptInfoToDetach) {
|
|
178484
177720
|
scriptInfoToDetach.detachFromProject(this);
|
|
178485
177721
|
if (!noRemoveResolution) {
|
|
178486
|
-
this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path);
|
|
177722
|
+
this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove);
|
|
178487
177723
|
}
|
|
178488
177724
|
}
|
|
178489
177725
|
}
|
|
@@ -178994,16 +178230,12 @@ function getUnresolvedImports(program, cachedUnresolvedImportsPerFile) {
|
|
|
178994
178230
|
}
|
|
178995
178231
|
function extractUnresolvedImportsFromSourceFile(program, file, ambientModules, cachedUnresolvedImportsPerFile) {
|
|
178996
178232
|
return getOrUpdate(cachedUnresolvedImportsPerFile, file.path, () => {
|
|
178997
|
-
var _a;
|
|
178998
|
-
const resolvedModules = (_a = program.resolvedModules) == null ? void 0 : _a.get(file.path);
|
|
178999
|
-
if (!resolvedModules)
|
|
179000
|
-
return emptyArray2;
|
|
179001
178233
|
let unresolvedImports;
|
|
179002
|
-
|
|
178234
|
+
program.forEachResolvedModule(({ resolvedModule }, name) => {
|
|
179003
178235
|
if ((!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && !ambientModules.some((m) => m === name)) {
|
|
179004
178236
|
unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName);
|
|
179005
178237
|
}
|
|
179006
|
-
});
|
|
178238
|
+
}, file);
|
|
179007
178239
|
return unresolvedImports || emptyArray2;
|
|
179008
178240
|
});
|
|
179009
178241
|
}
|
|
@@ -179246,11 +178478,12 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec
|
|
|
179246
178478
|
);
|
|
179247
178479
|
if (entrypoints) {
|
|
179248
178480
|
const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory);
|
|
179249
|
-
const
|
|
178481
|
+
const realPath2 = real ? hostProject.toPath(real) : void 0;
|
|
178482
|
+
const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory);
|
|
179250
178483
|
if (isSymlink) {
|
|
179251
178484
|
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
|
179252
178485
|
real,
|
|
179253
|
-
realPath:
|
|
178486
|
+
realPath: realPath2
|
|
179254
178487
|
});
|
|
179255
178488
|
}
|
|
179256
178489
|
return mapDefined(entrypoints, (entrypoint) => {
|
|
@@ -179662,6 +178895,9 @@ var ConfigFileDiagEvent = "configFileDiag";
|
|
|
179662
178895
|
var ProjectLanguageServiceStateEvent = "projectLanguageServiceState";
|
|
179663
178896
|
var ProjectInfoTelemetryEvent = "projectInfo";
|
|
179664
178897
|
var OpenFileInfoTelemetryEvent = "openFileInfo";
|
|
178898
|
+
var CreateFileWatcherEvent = "createFileWatcher";
|
|
178899
|
+
var CreateDirectoryWatcherEvent = "createDirectoryWatcher";
|
|
178900
|
+
var CloseFileWatcherEvent = "closeFileWatcher";
|
|
179665
178901
|
var ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*";
|
|
179666
178902
|
function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {
|
|
179667
178903
|
const map2 = /* @__PURE__ */ new Map();
|
|
@@ -179925,6 +179161,87 @@ function createProjectNameFactoryWithCounter(nameFactory) {
|
|
|
179925
179161
|
let nextId = 1;
|
|
179926
179162
|
return () => nameFactory(nextId++);
|
|
179927
179163
|
}
|
|
179164
|
+
function getHostWatcherMap() {
|
|
179165
|
+
return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() };
|
|
179166
|
+
}
|
|
179167
|
+
function createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) {
|
|
179168
|
+
if (!canUseWatchEvents || !service.eventHandler || !service.session)
|
|
179169
|
+
return void 0;
|
|
179170
|
+
const watchedFiles = getHostWatcherMap();
|
|
179171
|
+
const watchedDirectories = getHostWatcherMap();
|
|
179172
|
+
const watchedDirectoriesRecursive = getHostWatcherMap();
|
|
179173
|
+
let ids = 1;
|
|
179174
|
+
service.session.addProtocolHandler("watchChange" /* WatchChange */, (req) => {
|
|
179175
|
+
onWatchChange(req.arguments);
|
|
179176
|
+
return { responseRequired: false };
|
|
179177
|
+
});
|
|
179178
|
+
return {
|
|
179179
|
+
watchFile: watchFile2,
|
|
179180
|
+
watchDirectory,
|
|
179181
|
+
getCurrentDirectory: () => service.host.getCurrentDirectory(),
|
|
179182
|
+
useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames
|
|
179183
|
+
};
|
|
179184
|
+
function watchFile2(path, callback) {
|
|
179185
|
+
return getOrCreateFileWatcher(
|
|
179186
|
+
watchedFiles,
|
|
179187
|
+
path,
|
|
179188
|
+
callback,
|
|
179189
|
+
(id) => ({ eventName: CreateFileWatcherEvent, data: { id, path } })
|
|
179190
|
+
);
|
|
179191
|
+
}
|
|
179192
|
+
function watchDirectory(path, callback, recursive) {
|
|
179193
|
+
return getOrCreateFileWatcher(
|
|
179194
|
+
recursive ? watchedDirectoriesRecursive : watchedDirectories,
|
|
179195
|
+
path,
|
|
179196
|
+
callback,
|
|
179197
|
+
(id) => ({ eventName: CreateDirectoryWatcherEvent, data: { id, path, recursive: !!recursive } })
|
|
179198
|
+
);
|
|
179199
|
+
}
|
|
179200
|
+
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) {
|
|
179201
|
+
const key = service.toPath(path);
|
|
179202
|
+
let id = pathToId.get(key);
|
|
179203
|
+
if (!id)
|
|
179204
|
+
pathToId.set(key, id = ids++);
|
|
179205
|
+
let callbacks = idToCallbacks.get(id);
|
|
179206
|
+
if (!callbacks) {
|
|
179207
|
+
idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set());
|
|
179208
|
+
service.eventHandler(event(id));
|
|
179209
|
+
}
|
|
179210
|
+
callbacks.add(callback);
|
|
179211
|
+
return {
|
|
179212
|
+
close() {
|
|
179213
|
+
const callbacks2 = idToCallbacks.get(id);
|
|
179214
|
+
if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback)))
|
|
179215
|
+
return;
|
|
179216
|
+
if (callbacks2.size)
|
|
179217
|
+
return;
|
|
179218
|
+
idToCallbacks.delete(id);
|
|
179219
|
+
pathToId.delete(key);
|
|
179220
|
+
service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } });
|
|
179221
|
+
}
|
|
179222
|
+
};
|
|
179223
|
+
}
|
|
179224
|
+
function onWatchChange({ id, path, eventType }) {
|
|
179225
|
+
onFileWatcherCallback(id, path, eventType);
|
|
179226
|
+
onDirectoryWatcherCallback(watchedDirectories, id, path, eventType);
|
|
179227
|
+
onDirectoryWatcherCallback(watchedDirectoriesRecursive, id, path, eventType);
|
|
179228
|
+
}
|
|
179229
|
+
function onFileWatcherCallback(id, eventPath, eventType) {
|
|
179230
|
+
var _a;
|
|
179231
|
+
(_a = watchedFiles.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
|
179232
|
+
const eventKind = eventType === "create" ? 0 /* Created */ : eventType === "delete" ? 2 /* Deleted */ : 1 /* Changed */;
|
|
179233
|
+
callback(eventPath, eventKind);
|
|
179234
|
+
});
|
|
179235
|
+
}
|
|
179236
|
+
function onDirectoryWatcherCallback({ idToCallbacks }, id, eventPath, eventType) {
|
|
179237
|
+
var _a;
|
|
179238
|
+
if (eventType === "update")
|
|
179239
|
+
return;
|
|
179240
|
+
(_a = idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
|
179241
|
+
callback(eventPath);
|
|
179242
|
+
});
|
|
179243
|
+
}
|
|
179244
|
+
}
|
|
179928
179245
|
var _ProjectService = class _ProjectService {
|
|
179929
179246
|
constructor(opts) {
|
|
179930
179247
|
/**
|
|
@@ -180004,6 +179321,8 @@ var _ProjectService = class _ProjectService {
|
|
|
180004
179321
|
this.extendedConfigCache = /* @__PURE__ */ new Map();
|
|
180005
179322
|
/** @internal */
|
|
180006
179323
|
this.verifyDocumentRegistry = noop;
|
|
179324
|
+
/** @internal */
|
|
179325
|
+
this.verifyProgram = noop;
|
|
180007
179326
|
var _a;
|
|
180008
179327
|
this.host = opts.host;
|
|
180009
179328
|
this.logger = opts.logger;
|
|
@@ -180019,6 +179338,7 @@ var _ProjectService = class _ProjectService {
|
|
|
180019
179338
|
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
|
|
180020
179339
|
this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
|
|
180021
179340
|
this.session = opts.session;
|
|
179341
|
+
this.jsDocParsingMode = opts.jsDocParsingMode;
|
|
180022
179342
|
if (opts.serverMode !== void 0) {
|
|
180023
179343
|
this.serverMode = opts.serverMode;
|
|
180024
179344
|
} else {
|
|
@@ -180044,14 +179364,19 @@ var _ProjectService = class _ProjectService {
|
|
|
180044
179364
|
hostInfo: "Unknown host",
|
|
180045
179365
|
extraFileExtensions: []
|
|
180046
179366
|
};
|
|
180047
|
-
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this);
|
|
179367
|
+
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this);
|
|
180048
179368
|
const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;
|
|
180049
179369
|
const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;
|
|
180050
179370
|
this.packageJsonCache = createPackageJsonCache(this);
|
|
180051
179371
|
this.watchFactory = this.serverMode !== 0 /* Semantic */ ? {
|
|
180052
179372
|
watchFile: returnNoopFileWatcher,
|
|
180053
179373
|
watchDirectory: returnNoopFileWatcher
|
|
180054
|
-
} : getWatchFactory(
|
|
179374
|
+
} : getWatchFactory(
|
|
179375
|
+
createWatchFactoryHostUsingWatchEvents(this, opts.canUseWatchEvents) || this.host,
|
|
179376
|
+
watchLogLevel,
|
|
179377
|
+
log,
|
|
179378
|
+
getDetailWatchInfo
|
|
179379
|
+
);
|
|
180055
179380
|
(_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this);
|
|
180056
179381
|
}
|
|
180057
179382
|
toPath(fileName) {
|
|
@@ -184275,6 +183600,7 @@ var Session3 = class _Session {
|
|
|
184275
183600
|
typesMapLocation: opts.typesMapLocation,
|
|
184276
183601
|
serverMode: opts.serverMode,
|
|
184277
183602
|
session: this,
|
|
183603
|
+
canUseWatchEvents: opts.canUseWatchEvents,
|
|
184278
183604
|
incrementalVerifier: opts.incrementalVerifier
|
|
184279
183605
|
};
|
|
184280
183606
|
this.projectService = new ProjectService3(settings);
|
|
@@ -184328,43 +183654,41 @@ var Session3 = class _Session {
|
|
|
184328
183654
|
defaultEventHandler(event) {
|
|
184329
183655
|
switch (event.eventName) {
|
|
184330
183656
|
case ProjectsUpdatedInBackgroundEvent:
|
|
184331
|
-
|
|
184332
|
-
this.projectsUpdatedInBackgroundEvent(openFiles);
|
|
183657
|
+
this.projectsUpdatedInBackgroundEvent(event.data.openFiles);
|
|
184333
183658
|
break;
|
|
184334
183659
|
case ProjectLoadingStartEvent:
|
|
184335
|
-
|
|
184336
|
-
|
|
184337
|
-
|
|
184338
|
-
|
|
184339
|
-
);
|
|
183660
|
+
this.event({
|
|
183661
|
+
projectName: event.data.project.getProjectName(),
|
|
183662
|
+
reason: event.data.reason
|
|
183663
|
+
}, event.eventName);
|
|
184340
183664
|
break;
|
|
184341
183665
|
case ProjectLoadingFinishEvent:
|
|
184342
|
-
|
|
184343
|
-
|
|
183666
|
+
this.event({
|
|
183667
|
+
projectName: event.data.project.getProjectName()
|
|
183668
|
+
}, event.eventName);
|
|
184344
183669
|
break;
|
|
184345
183670
|
case LargeFileReferencedEvent:
|
|
184346
|
-
|
|
184347
|
-
|
|
183671
|
+
case CreateFileWatcherEvent:
|
|
183672
|
+
case CreateDirectoryWatcherEvent:
|
|
183673
|
+
case CloseFileWatcherEvent:
|
|
183674
|
+
this.event(event.data, event.eventName);
|
|
184348
183675
|
break;
|
|
184349
183676
|
case ConfigFileDiagEvent:
|
|
184350
|
-
const { triggerFile, configFileName: configFile, diagnostics } = event.data;
|
|
184351
|
-
const bakedDiags = map(diagnostics, (diagnostic) => formatDiagnosticToProtocol(
|
|
184352
|
-
diagnostic,
|
|
184353
|
-
/*includeFileName*/
|
|
184354
|
-
true
|
|
184355
|
-
));
|
|
184356
183677
|
this.event({
|
|
184357
|
-
triggerFile,
|
|
184358
|
-
configFile,
|
|
184359
|
-
diagnostics:
|
|
184360
|
-
|
|
183678
|
+
triggerFile: event.data.triggerFile,
|
|
183679
|
+
configFile: event.data.configFileName,
|
|
183680
|
+
diagnostics: map(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol(
|
|
183681
|
+
diagnostic,
|
|
183682
|
+
/*includeFileName*/
|
|
183683
|
+
true
|
|
183684
|
+
))
|
|
183685
|
+
}, event.eventName);
|
|
184361
183686
|
break;
|
|
184362
183687
|
case ProjectLanguageServiceStateEvent: {
|
|
184363
|
-
const eventName = ProjectLanguageServiceStateEvent;
|
|
184364
183688
|
this.event({
|
|
184365
183689
|
projectName: event.data.project.getProjectName(),
|
|
184366
183690
|
languageServiceEnabled: event.data.languageServiceEnabled
|
|
184367
|
-
}, eventName);
|
|
183691
|
+
}, event.eventName);
|
|
184368
183692
|
break;
|
|
184369
183693
|
}
|
|
184370
183694
|
case ProjectInfoTelemetryEvent: {
|
|
@@ -187159,9 +186483,12 @@ __export(ts_server_exports4, {
|
|
|
187159
186483
|
AutoImportProviderProject: () => AutoImportProviderProject,
|
|
187160
186484
|
AuxiliaryProject: () => AuxiliaryProject,
|
|
187161
186485
|
CharRangeSection: () => CharRangeSection,
|
|
186486
|
+
CloseFileWatcherEvent: () => CloseFileWatcherEvent,
|
|
187162
186487
|
CommandNames: () => CommandNames,
|
|
187163
186488
|
ConfigFileDiagEvent: () => ConfigFileDiagEvent,
|
|
187164
186489
|
ConfiguredProject: () => ConfiguredProject2,
|
|
186490
|
+
CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent,
|
|
186491
|
+
CreateFileWatcherEvent: () => CreateFileWatcherEvent,
|
|
187165
186492
|
Errors: () => Errors,
|
|
187166
186493
|
EventBeginInstallTypes: () => EventBeginInstallTypes,
|
|
187167
186494
|
EventEndInstallTypes: () => EventEndInstallTypes,
|
|
@@ -187978,6 +187305,7 @@ function start({ args, logger, cancellationToken, serverMode, unknownServerMode,
|
|
|
187978
187305
|
useInferredProjectPerProjectRoot: hasArgument("--useInferredProjectPerProjectRoot"),
|
|
187979
187306
|
suppressDiagnosticEvents: hasArgument("--suppressDiagnosticEvents"),
|
|
187980
187307
|
noGetErrOnBackgroundUpdate: hasArgument("--noGetErrOnBackgroundUpdate"),
|
|
187308
|
+
canUseWatchEvents: hasArgument("--canUseWatchEvents"),
|
|
187981
187309
|
serverMode
|
|
187982
187310
|
},
|
|
187983
187311
|
logger,
|
|
@@ -188055,6 +187383,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188055
187383
|
InternalEmitFlags,
|
|
188056
187384
|
InternalSymbolName,
|
|
188057
187385
|
InvalidatedProjectKind,
|
|
187386
|
+
JSDocParsingMode,
|
|
188058
187387
|
JsDoc,
|
|
188059
187388
|
JsTyping,
|
|
188060
187389
|
JsxEmit,
|
|
@@ -188099,7 +187428,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188099
187428
|
PrivateIdentifierKind,
|
|
188100
187429
|
ProcessLevel,
|
|
188101
187430
|
QuotePreference,
|
|
188102
|
-
RegularExpressionFlags,
|
|
188103
187431
|
RelationComparisonResult,
|
|
188104
187432
|
Rename,
|
|
188105
187433
|
ScriptElementKind,
|
|
@@ -188226,7 +187554,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188226
187554
|
changeExtension,
|
|
188227
187555
|
changesAffectModuleResolution,
|
|
188228
187556
|
changesAffectingProgramStructure,
|
|
188229
|
-
characterToRegularExpressionFlag,
|
|
188230
187557
|
childIsDecorated,
|
|
188231
187558
|
classElementOrClassElementParameterIsDecorated,
|
|
188232
187559
|
classHasClassThisAssignment,
|
|
@@ -188384,6 +187711,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188384
187711
|
createModuleNotFoundChain,
|
|
188385
187712
|
createModuleResolutionCache,
|
|
188386
187713
|
createModuleResolutionLoader,
|
|
187714
|
+
createModuleResolutionLoaderUsingGlobalCache,
|
|
188387
187715
|
createModuleSpecifierResolutionHost,
|
|
188388
187716
|
createMultiMap,
|
|
188389
187717
|
createNodeConverters,
|
|
@@ -188812,6 +188140,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188812
188140
|
getLeadingCommentRangesOfNode,
|
|
188813
188141
|
getLeftmostAccessExpression,
|
|
188814
188142
|
getLeftmostExpression,
|
|
188143
|
+
getLibraryNameFromLibFileName,
|
|
188815
188144
|
getLineAndCharacterOfPosition,
|
|
188816
188145
|
getLineInfo,
|
|
188817
188146
|
getLineOfLocalPosition,
|
|
@@ -189206,6 +188535,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
189206
188535
|
isClassDeclaration,
|
|
189207
188536
|
isClassElement,
|
|
189208
188537
|
isClassExpression,
|
|
188538
|
+
isClassFieldAndNotAutoAccessor,
|
|
189209
188539
|
isClassLike,
|
|
189210
188540
|
isClassMemberModifier,
|
|
189211
188541
|
isClassNamedEvaluationHelperBlock,
|
|
@@ -189983,7 +189313,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
189983
189313
|
reducePathComponents,
|
|
189984
189314
|
refactor,
|
|
189985
189315
|
regExpEscape,
|
|
189986
|
-
regularExpressionFlagToCharacter,
|
|
189987
189316
|
relativeComplement,
|
|
189988
189317
|
removeAllComments,
|
|
189989
189318
|
removeEmitHelper,
|