@typescript-deploys/pr-build 5.3.0-pr-55820-7 → 5.3.0-pr-54242-4
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/lib.es5.d.ts +9 -1
- package/lib/tsc.js +582 -487
- package/lib/tsserver.js +715 -561
- package/lib/typescript.d.ts +96 -32
- package/lib/typescript.js +709 -561
- package/lib/typingsInstaller.js +187 -125
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230922`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3497,7 +3497,7 @@ ${lanes.join("\n")}
|
|
|
3497
3497
|
const name = DiagnosticCategory[d.category];
|
|
3498
3498
|
return lowerCase ? name.toLowerCase() : name;
|
|
3499
3499
|
}
|
|
3500
|
-
var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
|
|
3500
|
+
var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, JSDocParsingMode;
|
|
3501
3501
|
var init_types = __esm({
|
|
3502
3502
|
"src/compiler/types.ts"() {
|
|
3503
3503
|
"use strict";
|
|
@@ -3802,9 +3802,12 @@ ${lanes.join("\n")}
|
|
|
3802
3802
|
SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause";
|
|
3803
3803
|
SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause";
|
|
3804
3804
|
SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause";
|
|
3805
|
-
SyntaxKind5[SyntaxKind5["
|
|
3806
|
-
SyntaxKind5[SyntaxKind5["
|
|
3807
|
-
SyntaxKind5[SyntaxKind5["
|
|
3805
|
+
SyntaxKind5[SyntaxKind5["ImportAttributes"] = 300] = "ImportAttributes";
|
|
3806
|
+
SyntaxKind5[SyntaxKind5["ImportAttribute"] = 301] = "ImportAttribute";
|
|
3807
|
+
SyntaxKind5[SyntaxKind5["ImportTypeAttributes"] = 302] = "ImportTypeAttributes";
|
|
3808
|
+
SyntaxKind5[SyntaxKind5["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause";
|
|
3809
|
+
SyntaxKind5[SyntaxKind5["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry";
|
|
3810
|
+
SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302 /* ImportTypeAttributes */] = "ImportTypeAssertionContainer";
|
|
3808
3811
|
SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment";
|
|
3809
3812
|
SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
|
|
3810
3813
|
SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 305] = "SpreadAssignment";
|
|
@@ -5102,7 +5105,8 @@ ${lanes.join("\n")}
|
|
|
5102
5105
|
ListFormat2[ListFormat2["ObjectBindingPatternElements"] = 525136] = "ObjectBindingPatternElements";
|
|
5103
5106
|
ListFormat2[ListFormat2["ArrayBindingPatternElements"] = 524880] = "ArrayBindingPatternElements";
|
|
5104
5107
|
ListFormat2[ListFormat2["ObjectLiteralExpressionProperties"] = 526226] = "ObjectLiteralExpressionProperties";
|
|
5105
|
-
ListFormat2[ListFormat2["
|
|
5108
|
+
ListFormat2[ListFormat2["ImportAttributes"] = 526226] = "ImportAttributes";
|
|
5109
|
+
ListFormat2[ListFormat2["ImportClauseEntries"] = 526226 /* ImportAttributes */] = "ImportClauseEntries";
|
|
5106
5110
|
ListFormat2[ListFormat2["ArrayLiteralExpressionElements"] = 8914] = "ArrayLiteralExpressionElements";
|
|
5107
5111
|
ListFormat2[ListFormat2["CommaListElements"] = 528] = "CommaListElements";
|
|
5108
5112
|
ListFormat2[ListFormat2["CallExpressionArguments"] = 2576] = "CallExpressionArguments";
|
|
@@ -5183,6 +5187,13 @@ ${lanes.join("\n")}
|
|
|
5183
5187
|
kind: 4 /* MultiLine */
|
|
5184
5188
|
}
|
|
5185
5189
|
};
|
|
5190
|
+
JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode7) => {
|
|
5191
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseAll"] = 0] = "ParseAll";
|
|
5192
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseNone"] = 1] = "ParseNone";
|
|
5193
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseForTypeErrors"] = 2] = "ParseForTypeErrors";
|
|
5194
|
+
JSDocParsingMode7[JSDocParsingMode7["ParseForTypeInfo"] = 3] = "ParseForTypeInfo";
|
|
5195
|
+
return JSDocParsingMode7;
|
|
5196
|
+
})(JSDocParsingMode || {});
|
|
5186
5197
|
}
|
|
5187
5198
|
});
|
|
5188
5199
|
|
|
@@ -6993,6 +7004,7 @@ ${lanes.join("\n")}
|
|
|
6993
7004
|
_0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."),
|
|
6994
7005
|
A_file_cannot_have_a_reference_to_itself: diag(1006, 1 /* Error */, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."),
|
|
6995
7006
|
The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, 1 /* Error */, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."),
|
|
7007
|
+
The_assert_keyword_in_import_attributes_is_deprecated_and_has_been_replaced_by_the_with_keyword: diag(1008, 1 /* Error */, "The_assert_keyword_in_import_attributes_is_deprecated_and_has_been_replaced_by_the_with_keyword_1008", "The 'assert' keyword in import attributes is deprecated and has been replaced by the 'with' keyword."),
|
|
6996
7008
|
Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
|
|
6997
7009
|
Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."),
|
|
6998
7010
|
An_element_access_expression_should_take_an_argument: diag(1011, 1 /* Error */, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."),
|
|
@@ -7356,7 +7368,7 @@ ${lanes.join("\n")}
|
|
|
7356
7368
|
_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),
|
|
7357
7369
|
_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),
|
|
7358
7370
|
Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
|
|
7359
|
-
|
|
7371
|
+
Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),
|
|
7360
7372
|
Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
|
|
7361
7373
|
resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."),
|
|
7362
7374
|
resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
|
|
@@ -7368,6 +7380,9 @@ ${lanes.join("\n")}
|
|
|
7368
7380
|
File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`),
|
|
7369
7381
|
File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`),
|
|
7370
7382
|
File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"),
|
|
7383
|
+
resolution_mode_attribute_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1462, 1 /* Error */, "resolution_mode_attribute_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1462", "'resolution-mode' attribute are only supported when `moduleResolution` is `node16` or `nodenext`."),
|
|
7384
|
+
resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "`resolution-mode` is the only valid key for type import attributes."),
|
|
7385
|
+
Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - `resolution-mode` - with value `import` or `require`."),
|
|
7371
7386
|
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
7372
7387
|
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: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "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."),
|
|
7373
7388
|
catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -7394,6 +7409,7 @@ ${lanes.join("\n")}
|
|
|
7394
7409
|
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."),
|
|
7395
7410
|
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."),
|
|
7396
7411
|
_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."),
|
|
7412
|
+
Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal or number literal expected."),
|
|
7397
7413
|
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."),
|
|
7398
7414
|
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."),
|
|
7399
7415
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -7923,6 +7939,7 @@ ${lanes.join("\n")}
|
|
|
7923
7939
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
7924
7940
|
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
|
|
7925
7941
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
7942
|
+
Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823", "Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
|
|
7926
7943
|
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
7927
7944
|
Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
|
|
7928
7945
|
Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
|
|
@@ -7931,7 +7948,6 @@ ${lanes.join("\n")}
|
|
|
7931
7948
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
7932
7949
|
This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
|
|
7933
7950
|
An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
|
|
7934
|
-
The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
7935
7951
|
_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
|
|
7936
7952
|
We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
|
|
7937
7953
|
Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
@@ -7944,6 +7960,9 @@ ${lanes.join("\n")}
|
|
|
7944
7960
|
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."),
|
|
7945
7961
|
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."),
|
|
7946
7962
|
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."),
|
|
7963
|
+
Import_attributes_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls: diag(2855, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls_2855", "Import attributes are not allowed on statements that transpile to CommonJS 'require' calls."),
|
|
7964
|
+
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2856, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2856", "Import attributes cannot be used with type-only imports or exports."),
|
|
7965
|
+
Import_attribute_values_must_be_string_literal_expressions: diag(2857, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2857", "Import attribute values must be string literal expressions."),
|
|
7947
7966
|
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}'."),
|
|
7948
7967
|
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}'."),
|
|
7949
7968
|
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}'."),
|
|
@@ -8052,7 +8071,6 @@ ${lanes.join("\n")}
|
|
|
8052
8071
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
8053
8072
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
8054
8073
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
8055
|
-
resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
8056
8074
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
8057
8075
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
8058
8076
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -9582,7 +9600,8 @@ ${lanes.join("\n")}
|
|
|
9582
9600
|
var tokenFlags;
|
|
9583
9601
|
var commentDirectives;
|
|
9584
9602
|
var inJSDocType = 0;
|
|
9585
|
-
var
|
|
9603
|
+
var scriptKind = 0 /* Unknown */;
|
|
9604
|
+
var jsDocParsingMode = 0 /* ParseAll */;
|
|
9586
9605
|
setText(text, start, length2);
|
|
9587
9606
|
var scanner2 = {
|
|
9588
9607
|
getTokenFullStart: () => fullStartPos,
|
|
@@ -9626,14 +9645,15 @@ ${lanes.join("\n")}
|
|
|
9626
9645
|
setText,
|
|
9627
9646
|
setScriptTarget,
|
|
9628
9647
|
setLanguageVariant,
|
|
9648
|
+
setScriptKind,
|
|
9649
|
+
setJSDocParsingMode,
|
|
9629
9650
|
setOnError,
|
|
9630
9651
|
resetTokenState,
|
|
9631
9652
|
setTextPos: resetTokenState,
|
|
9632
9653
|
setInJSDocType,
|
|
9633
9654
|
tryScan,
|
|
9634
9655
|
lookAhead,
|
|
9635
|
-
scanRange
|
|
9636
|
-
setSkipNonSemanticJSDoc
|
|
9656
|
+
scanRange
|
|
9637
9657
|
};
|
|
9638
9658
|
if (Debug.isDebugging) {
|
|
9639
9659
|
Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", {
|
|
@@ -10421,7 +10441,7 @@ ${lanes.join("\n")}
|
|
|
10421
10441
|
tokenFlags |= 1 /* PrecedingLineBreak */;
|
|
10422
10442
|
}
|
|
10423
10443
|
}
|
|
10424
|
-
if (isJSDoc2 && (
|
|
10444
|
+
if (isJSDoc2 && shouldParseJSDoc()) {
|
|
10425
10445
|
tokenFlags |= 2 /* PrecedingJSDocComment */;
|
|
10426
10446
|
}
|
|
10427
10447
|
commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
|
|
@@ -10680,6 +10700,21 @@ ${lanes.join("\n")}
|
|
|
10680
10700
|
}
|
|
10681
10701
|
}
|
|
10682
10702
|
}
|
|
10703
|
+
function shouldParseJSDoc() {
|
|
10704
|
+
switch (jsDocParsingMode) {
|
|
10705
|
+
case 0 /* ParseAll */:
|
|
10706
|
+
return true;
|
|
10707
|
+
case 1 /* ParseNone */:
|
|
10708
|
+
return false;
|
|
10709
|
+
}
|
|
10710
|
+
if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) {
|
|
10711
|
+
return true;
|
|
10712
|
+
}
|
|
10713
|
+
if (jsDocParsingMode === 3 /* ParseForTypeInfo */) {
|
|
10714
|
+
return false;
|
|
10715
|
+
}
|
|
10716
|
+
return jsDocSeeOrLink.test(text.slice(fullStartPos, pos));
|
|
10717
|
+
}
|
|
10683
10718
|
function reScanInvalidIdentifier() {
|
|
10684
10719
|
Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'.");
|
|
10685
10720
|
pos = tokenStart = fullStartPos;
|
|
@@ -11094,8 +11129,11 @@ ${lanes.join("\n")}
|
|
|
11094
11129
|
function setLanguageVariant(variant) {
|
|
11095
11130
|
languageVariant = variant;
|
|
11096
11131
|
}
|
|
11097
|
-
function
|
|
11098
|
-
|
|
11132
|
+
function setScriptKind(kind) {
|
|
11133
|
+
scriptKind = kind;
|
|
11134
|
+
}
|
|
11135
|
+
function setJSDocParsingMode(kind) {
|
|
11136
|
+
jsDocParsingMode = kind;
|
|
11099
11137
|
}
|
|
11100
11138
|
function resetTokenState(position) {
|
|
11101
11139
|
Debug.assert(position >= 0);
|
|
@@ -11131,7 +11169,7 @@ ${lanes.join("\n")}
|
|
|
11131
11169
|
function utf16EncodeAsString(codePoint) {
|
|
11132
11170
|
return utf16EncodeAsStringWorker(codePoint);
|
|
11133
11171
|
}
|
|
11134
|
-
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine,
|
|
11172
|
+
var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, jsDocSeeOrLink, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
|
|
11135
11173
|
var init_scanner = __esm({
|
|
11136
11174
|
"src/compiler/scanner.ts"() {
|
|
11137
11175
|
"use strict";
|
|
@@ -11294,7 +11332,7 @@ ${lanes.join("\n")}
|
|
|
11294
11332
|
unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999];
|
|
11295
11333
|
commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
11296
11334
|
commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
11297
|
-
|
|
11335
|
+
jsDocSeeOrLink = /@(?:see|link)/i;
|
|
11298
11336
|
tokenStrings = makeReverseMap(textToToken);
|
|
11299
11337
|
mergeConflictMarkerLength = "<<<<<<<".length;
|
|
11300
11338
|
shebangTriviaRegex = /^#!.*/;
|
|
@@ -12114,12 +12152,12 @@ ${lanes.join("\n")}
|
|
|
12114
12152
|
function isTypeOnlyImportOrExportDeclaration(node) {
|
|
12115
12153
|
return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node);
|
|
12116
12154
|
}
|
|
12117
|
-
function isAssertionKey(node) {
|
|
12118
|
-
return isStringLiteral(node) || isIdentifier(node);
|
|
12119
|
-
}
|
|
12120
12155
|
function isStringTextContainingNode(node) {
|
|
12121
12156
|
return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind);
|
|
12122
12157
|
}
|
|
12158
|
+
function isImportAttributeName(node) {
|
|
12159
|
+
return isStringLiteral(node) || isIdentifier(node);
|
|
12160
|
+
}
|
|
12123
12161
|
function isGeneratedIdentifier(node) {
|
|
12124
12162
|
var _a;
|
|
12125
12163
|
return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0;
|
|
@@ -12943,8 +12981,8 @@ ${lanes.join("\n")}
|
|
|
12943
12981
|
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;
|
|
12944
12982
|
}
|
|
12945
12983
|
function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) {
|
|
12946
|
-
var _a
|
|
12947
|
-
const node10Result = (
|
|
12984
|
+
var _a;
|
|
12985
|
+
const node10Result = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.node10Result;
|
|
12948
12986
|
const result = node10Result ? chainDiagnosticMessages(
|
|
12949
12987
|
/*details*/
|
|
12950
12988
|
void 0,
|
|
@@ -12986,14 +13024,14 @@ ${lanes.join("\n")}
|
|
|
12986
13024
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
12987
13025
|
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;
|
|
12988
13026
|
}
|
|
12989
|
-
function hasChangesInResolutions(names, newSourceFile, newResolutions,
|
|
13027
|
+
function hasChangesInResolutions(names, newSourceFile, newResolutions, getOldResolution, comparer, nameAndModeGetter) {
|
|
12990
13028
|
Debug.assert(names.length === newResolutions.length);
|
|
12991
13029
|
for (let i = 0; i < names.length; i++) {
|
|
12992
13030
|
const newResolution = newResolutions[i];
|
|
12993
13031
|
const entry = names[i];
|
|
12994
13032
|
const name = nameAndModeGetter.getName(entry);
|
|
12995
13033
|
const mode = nameAndModeGetter.getMode(entry, newSourceFile);
|
|
12996
|
-
const oldResolution =
|
|
13034
|
+
const oldResolution = getOldResolution(name, mode);
|
|
12997
13035
|
const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;
|
|
12998
13036
|
if (changed) {
|
|
12999
13037
|
return true;
|
|
@@ -15983,9 +16021,6 @@ ${lanes.join("\n")}
|
|
|
15983
16021
|
function getIndentSize() {
|
|
15984
16022
|
return indentStrings[1].length;
|
|
15985
16023
|
}
|
|
15986
|
-
function isNightly() {
|
|
15987
|
-
return version.includes("-dev") || version.includes("-insiders");
|
|
15988
|
-
}
|
|
15989
16024
|
function createTextWriter(newLine) {
|
|
15990
16025
|
var output;
|
|
15991
16026
|
var indent3;
|
|
@@ -17887,11 +17922,11 @@ ${lanes.join("\n")}
|
|
|
17887
17922
|
(symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real);
|
|
17888
17923
|
}
|
|
17889
17924
|
},
|
|
17890
|
-
setSymlinksFromResolutions(
|
|
17925
|
+
setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, typeReferenceDirectives) {
|
|
17891
17926
|
Debug.assert(!hasProcessedResolutions);
|
|
17892
17927
|
hasProcessedResolutions = true;
|
|
17893
|
-
|
|
17894
|
-
|
|
17928
|
+
forEachResolvedModule((resolution) => processResolution(this, resolution.resolvedModule));
|
|
17929
|
+
forEachResolvedTypeReferenceDirective((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));
|
|
17895
17930
|
typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));
|
|
17896
17931
|
},
|
|
17897
17932
|
hasProcessedResolutions: () => hasProcessedResolutions
|
|
@@ -18850,6 +18885,13 @@ ${lanes.join("\n")}
|
|
|
18850
18885
|
function isExpandoPropertyDeclaration(declaration) {
|
|
18851
18886
|
return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
|
|
18852
18887
|
}
|
|
18888
|
+
function hasResolutionModeOverride(node) {
|
|
18889
|
+
var _a;
|
|
18890
|
+
if (node === void 0) {
|
|
18891
|
+
return false;
|
|
18892
|
+
}
|
|
18893
|
+
return !!getResolutionModeOverride(isImportTypeNode(node) ? (_a = node.attributes) == null ? void 0 : _a.attributes : node.attributes);
|
|
18894
|
+
}
|
|
18853
18895
|
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
|
|
18854
18896
|
var init_utilities = __esm({
|
|
18855
18897
|
"src/compiler/utilities.ts"() {
|
|
@@ -20319,6 +20361,12 @@ ${lanes.join("\n")}
|
|
|
20319
20361
|
updateAssertEntry,
|
|
20320
20362
|
createImportTypeAssertionContainer,
|
|
20321
20363
|
updateImportTypeAssertionContainer,
|
|
20364
|
+
createImportTypeAttributes,
|
|
20365
|
+
updateImportTypeAttributes,
|
|
20366
|
+
createImportAttributes,
|
|
20367
|
+
updateImportAttributes,
|
|
20368
|
+
createImportAttribute,
|
|
20369
|
+
updateImportAttribute,
|
|
20322
20370
|
createNamespaceImport,
|
|
20323
20371
|
updateNamespaceImport,
|
|
20324
20372
|
createNamespaceExport,
|
|
@@ -21587,18 +21635,18 @@ ${lanes.join("\n")}
|
|
|
21587
21635
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
21588
21636
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
21589
21637
|
}
|
|
21590
|
-
function createImportTypeNode(argument,
|
|
21638
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
21591
21639
|
const node = createBaseNode(205 /* ImportType */);
|
|
21592
21640
|
node.argument = argument;
|
|
21593
|
-
node.assertions =
|
|
21641
|
+
node.attributes = node.assertions = attributes;
|
|
21594
21642
|
node.qualifier = qualifier;
|
|
21595
21643
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
21596
21644
|
node.isTypeOf = isTypeOf;
|
|
21597
21645
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
21598
21646
|
return node;
|
|
21599
21647
|
}
|
|
21600
|
-
function updateImportTypeNode(node, argument,
|
|
21601
|
-
return node.argument !== argument || node.
|
|
21648
|
+
function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
|
|
21649
|
+
return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node;
|
|
21602
21650
|
}
|
|
21603
21651
|
function createParenthesizedType(type) {
|
|
21604
21652
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -22728,19 +22776,19 @@ ${lanes.join("\n")}
|
|
|
22728
22776
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
22729
22777
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
22730
22778
|
}
|
|
22731
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
22779
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
22732
22780
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
22733
22781
|
node.modifiers = asNodeArray(modifiers);
|
|
22734
22782
|
node.importClause = importClause;
|
|
22735
22783
|
node.moduleSpecifier = moduleSpecifier;
|
|
22736
|
-
node.assertClause =
|
|
22784
|
+
node.attributes = node.assertClause = attributes;
|
|
22737
22785
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
22738
22786
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22739
22787
|
node.jsDoc = void 0;
|
|
22740
22788
|
return node;
|
|
22741
22789
|
}
|
|
22742
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
22743
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
22790
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
|
|
22791
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
|
|
22744
22792
|
}
|
|
22745
22793
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
22746
22794
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -22761,6 +22809,7 @@ ${lanes.join("\n")}
|
|
|
22761
22809
|
const node = createBaseNode(300 /* AssertClause */);
|
|
22762
22810
|
node.elements = createNodeArray(elements);
|
|
22763
22811
|
node.multiLine = multiLine;
|
|
22812
|
+
node.token = 132 /* AssertKeyword */;
|
|
22764
22813
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
22765
22814
|
return node;
|
|
22766
22815
|
}
|
|
@@ -22786,6 +22835,36 @@ ${lanes.join("\n")}
|
|
|
22786
22835
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
22787
22836
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
22788
22837
|
}
|
|
22838
|
+
function createImportTypeAttributes(attributes, multiLine) {
|
|
22839
|
+
const node = createBaseNode(302 /* ImportTypeAttributes */);
|
|
22840
|
+
node.attributes = node.assertClause = attributes;
|
|
22841
|
+
node.multiLine = multiLine;
|
|
22842
|
+
return node;
|
|
22843
|
+
}
|
|
22844
|
+
function updateImportTypeAttributes(node, attributes, multiLine) {
|
|
22845
|
+
return node.attributes !== attributes || node.multiLine !== multiLine ? update(createImportTypeAttributes(attributes, multiLine), node) : node;
|
|
22846
|
+
}
|
|
22847
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
22848
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
22849
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
22850
|
+
node.elements = createNodeArray(elements);
|
|
22851
|
+
node.multiLine = multiLine;
|
|
22852
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
22853
|
+
return node;
|
|
22854
|
+
}
|
|
22855
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
22856
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
22857
|
+
}
|
|
22858
|
+
function createImportAttribute(name, value) {
|
|
22859
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
22860
|
+
node.name = name;
|
|
22861
|
+
node.value = value;
|
|
22862
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
22863
|
+
return node;
|
|
22864
|
+
}
|
|
22865
|
+
function updateImportAttribute(node, name, value) {
|
|
22866
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
22867
|
+
}
|
|
22789
22868
|
function createNamespaceImport(name) {
|
|
22790
22869
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
22791
22870
|
node.name = name;
|
|
@@ -22846,20 +22925,20 @@ ${lanes.join("\n")}
|
|
|
22846
22925
|
function updateExportAssignment(node, modifiers, expression) {
|
|
22847
22926
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node;
|
|
22848
22927
|
}
|
|
22849
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
22928
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
22850
22929
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
22851
22930
|
node.modifiers = asNodeArray(modifiers);
|
|
22852
22931
|
node.isTypeOnly = isTypeOnly;
|
|
22853
22932
|
node.exportClause = exportClause;
|
|
22854
22933
|
node.moduleSpecifier = moduleSpecifier;
|
|
22855
|
-
node.assertClause =
|
|
22934
|
+
node.attributes = node.assertClause = attributes;
|
|
22856
22935
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
22857
22936
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22858
22937
|
node.jsDoc = void 0;
|
|
22859
22938
|
return node;
|
|
22860
22939
|
}
|
|
22861
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
22862
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
22940
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
22941
|
+
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node;
|
|
22863
22942
|
}
|
|
22864
22943
|
function finishUpdateExportDeclaration(updated, original) {
|
|
22865
22944
|
if (updated !== original) {
|
|
@@ -24186,7 +24265,7 @@ ${lanes.join("\n")}
|
|
|
24186
24265
|
} else {
|
|
24187
24266
|
modifierArray = modifiers;
|
|
24188
24267
|
}
|
|
24189
|
-
return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.
|
|
24268
|
+
return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node);
|
|
24190
24269
|
}
|
|
24191
24270
|
function updateModifierLike(node, modifierArray) {
|
|
24192
24271
|
return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node);
|
|
@@ -26556,12 +26635,21 @@ ${lanes.join("\n")}
|
|
|
26556
26635
|
function isImportTypeAssertionContainer(node) {
|
|
26557
26636
|
return node.kind === 302 /* ImportTypeAssertionContainer */;
|
|
26558
26637
|
}
|
|
26638
|
+
function isImportTypeAttributes(node) {
|
|
26639
|
+
return node.kind === 302 /* ImportTypeAttributes */;
|
|
26640
|
+
}
|
|
26559
26641
|
function isAssertClause(node) {
|
|
26560
26642
|
return node.kind === 300 /* AssertClause */;
|
|
26561
26643
|
}
|
|
26562
26644
|
function isAssertEntry(node) {
|
|
26563
26645
|
return node.kind === 301 /* AssertEntry */;
|
|
26564
26646
|
}
|
|
26647
|
+
function isImportAttributes(node) {
|
|
26648
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
26649
|
+
}
|
|
26650
|
+
function isImportAttribute(node) {
|
|
26651
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
26652
|
+
}
|
|
26565
26653
|
function isNamespaceImport(node) {
|
|
26566
26654
|
return node.kind === 274 /* NamespaceImport */;
|
|
26567
26655
|
}
|
|
@@ -27289,7 +27377,7 @@ ${lanes.join("\n")}
|
|
|
27289
27377
|
namedBindings
|
|
27290
27378
|
),
|
|
27291
27379
|
nodeFactory.createStringLiteral(externalHelpersModuleNameText),
|
|
27292
|
-
/*
|
|
27380
|
+
/*attributes*/
|
|
27293
27381
|
void 0
|
|
27294
27382
|
);
|
|
27295
27383
|
addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */);
|
|
@@ -28066,7 +28154,7 @@ ${lanes.join("\n")}
|
|
|
28066
28154
|
function setExternalModuleIndicator(sourceFile) {
|
|
28067
28155
|
sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile);
|
|
28068
28156
|
}
|
|
28069
|
-
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind
|
|
28157
|
+
function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) {
|
|
28070
28158
|
var _a, _b, _c, _d;
|
|
28071
28159
|
(_a = tracing) == null ? void 0 : _a.push(
|
|
28072
28160
|
tracing.Phase.Parse,
|
|
@@ -28081,7 +28169,8 @@ ${lanes.join("\n")}
|
|
|
28081
28169
|
const {
|
|
28082
28170
|
languageVersion,
|
|
28083
28171
|
setExternalModuleIndicator: overrideSetExternalModuleIndicator,
|
|
28084
|
-
impliedNodeFormat: format
|
|
28172
|
+
impliedNodeFormat: format,
|
|
28173
|
+
jsDocParsingMode
|
|
28085
28174
|
} = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions };
|
|
28086
28175
|
if (languageVersion === 100 /* JSON */) {
|
|
28087
28176
|
result = Parser.parseSourceFile(
|
|
@@ -28093,7 +28182,7 @@ ${lanes.join("\n")}
|
|
|
28093
28182
|
setParentNodes,
|
|
28094
28183
|
6 /* JSON */,
|
|
28095
28184
|
noop,
|
|
28096
|
-
|
|
28185
|
+
jsDocParsingMode
|
|
28097
28186
|
);
|
|
28098
28187
|
} else {
|
|
28099
28188
|
const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => {
|
|
@@ -28109,7 +28198,7 @@ ${lanes.join("\n")}
|
|
|
28109
28198
|
setParentNodes,
|
|
28110
28199
|
scriptKind,
|
|
28111
28200
|
setIndicator,
|
|
28112
|
-
|
|
28201
|
+
jsDocParsingMode
|
|
28113
28202
|
);
|
|
28114
28203
|
}
|
|
28115
28204
|
(_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile();
|
|
@@ -28465,10 +28554,10 @@ ${lanes.join("\n")}
|
|
|
28465
28554
|
return visitNode2(cbNode, node.typeParameter);
|
|
28466
28555
|
},
|
|
28467
28556
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
28468
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
28557
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
28469
28558
|
},
|
|
28470
|
-
[302 /*
|
|
28471
|
-
return visitNode2(cbNode, node.
|
|
28559
|
+
[302 /* ImportTypeAttributes */]: function forEachChildInImportTypeAttributes(node, cbNode, _cbNodes) {
|
|
28560
|
+
return visitNode2(cbNode, node.attributes);
|
|
28472
28561
|
},
|
|
28473
28562
|
[196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator,
|
|
28474
28563
|
[198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator,
|
|
@@ -28639,15 +28728,15 @@ ${lanes.join("\n")}
|
|
|
28639
28728
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
28640
28729
|
},
|
|
28641
28730
|
[272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
28642
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
28731
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
28643
28732
|
},
|
|
28644
28733
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
28645
28734
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
28646
28735
|
},
|
|
28647
|
-
[300 /*
|
|
28736
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
28648
28737
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
28649
28738
|
},
|
|
28650
|
-
[301 /*
|
|
28739
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
28651
28740
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
28652
28741
|
},
|
|
28653
28742
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -28662,7 +28751,7 @@ ${lanes.join("\n")}
|
|
|
28662
28751
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
28663
28752
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
28664
28753
|
[278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
28665
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
28754
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
28666
28755
|
},
|
|
28667
28756
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
28668
28757
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -28893,7 +28982,7 @@ ${lanes.join("\n")}
|
|
|
28893
28982
|
var contextFlags;
|
|
28894
28983
|
var topLevel = true;
|
|
28895
28984
|
var parseErrorBeforeNextFinishedNode = false;
|
|
28896
|
-
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride,
|
|
28985
|
+
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) {
|
|
28897
28986
|
var _a;
|
|
28898
28987
|
scriptKind2 = ensureScriptKind(fileName2, scriptKind2);
|
|
28899
28988
|
if (scriptKind2 === 6 /* JSON */) {
|
|
@@ -28915,9 +29004,8 @@ ${lanes.join("\n")}
|
|
|
28915
29004
|
result2.pragmas = emptyMap;
|
|
28916
29005
|
return result2;
|
|
28917
29006
|
}
|
|
28918
|
-
|
|
28919
|
-
|
|
28920
|
-
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, skipNonSemanticJSDoc);
|
|
29007
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode);
|
|
29008
|
+
const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode);
|
|
28921
29009
|
clearState();
|
|
28922
29010
|
return result;
|
|
28923
29011
|
}
|
|
@@ -28930,8 +29018,7 @@ ${lanes.join("\n")}
|
|
|
28930
29018
|
/*syntaxCursor*/
|
|
28931
29019
|
void 0,
|
|
28932
29020
|
1 /* JS */,
|
|
28933
|
-
/*
|
|
28934
|
-
false
|
|
29021
|
+
0 /* ParseAll */
|
|
28935
29022
|
);
|
|
28936
29023
|
nextToken();
|
|
28937
29024
|
const entityName = parseEntityName(
|
|
@@ -28944,15 +29031,7 @@ ${lanes.join("\n")}
|
|
|
28944
29031
|
}
|
|
28945
29032
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
28946
29033
|
function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
|
|
28947
|
-
initializeState(
|
|
28948
|
-
fileName2,
|
|
28949
|
-
sourceText2,
|
|
28950
|
-
languageVersion2,
|
|
28951
|
-
syntaxCursor2,
|
|
28952
|
-
6 /* JSON */,
|
|
28953
|
-
/*skipNonSemanticJSDoc*/
|
|
28954
|
-
false
|
|
28955
|
-
);
|
|
29034
|
+
initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */);
|
|
28956
29035
|
sourceFlags = contextFlags;
|
|
28957
29036
|
nextToken();
|
|
28958
29037
|
const pos = getNodePos();
|
|
@@ -29033,7 +29112,7 @@ ${lanes.join("\n")}
|
|
|
29033
29112
|
return result;
|
|
29034
29113
|
}
|
|
29035
29114
|
Parser2.parseJsonText = parseJsonText2;
|
|
29036
|
-
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind,
|
|
29115
|
+
function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) {
|
|
29037
29116
|
NodeConstructor2 = objectAllocator.getNodeConstructor();
|
|
29038
29117
|
TokenConstructor2 = objectAllocator.getTokenConstructor();
|
|
29039
29118
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
@@ -29069,13 +29148,15 @@ ${lanes.join("\n")}
|
|
|
29069
29148
|
scanner2.setOnError(scanError);
|
|
29070
29149
|
scanner2.setScriptTarget(languageVersion);
|
|
29071
29150
|
scanner2.setLanguageVariant(languageVariant);
|
|
29072
|
-
scanner2.
|
|
29151
|
+
scanner2.setScriptKind(scriptKind);
|
|
29152
|
+
scanner2.setJSDocParsingMode(_jsDocParsingMode);
|
|
29073
29153
|
}
|
|
29074
29154
|
function clearState() {
|
|
29075
29155
|
scanner2.clearCommentDirectives();
|
|
29076
29156
|
scanner2.setText("");
|
|
29077
29157
|
scanner2.setOnError(void 0);
|
|
29078
|
-
scanner2.
|
|
29158
|
+
scanner2.setScriptKind(0 /* Unknown */);
|
|
29159
|
+
scanner2.setJSDocParsingMode(0 /* ParseAll */);
|
|
29079
29160
|
sourceText = void 0;
|
|
29080
29161
|
languageVersion = void 0;
|
|
29081
29162
|
syntaxCursor = void 0;
|
|
@@ -29089,7 +29170,7 @@ ${lanes.join("\n")}
|
|
|
29089
29170
|
notParenthesizedArrow = void 0;
|
|
29090
29171
|
topLevel = true;
|
|
29091
29172
|
}
|
|
29092
|
-
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2,
|
|
29173
|
+
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
|
|
29093
29174
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
|
29094
29175
|
if (isDeclarationFile) {
|
|
29095
29176
|
contextFlags |= 33554432 /* Ambient */;
|
|
@@ -29108,7 +29189,7 @@ ${lanes.join("\n")}
|
|
|
29108
29189
|
sourceFile.identifierCount = identifierCount;
|
|
29109
29190
|
sourceFile.identifiers = identifiers;
|
|
29110
29191
|
sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile);
|
|
29111
|
-
sourceFile.
|
|
29192
|
+
sourceFile.jsDocParsingMode = jsDocParsingMode;
|
|
29112
29193
|
if (jsDocDiagnostics) {
|
|
29113
29194
|
sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile);
|
|
29114
29195
|
}
|
|
@@ -29764,7 +29845,7 @@ ${lanes.join("\n")}
|
|
|
29764
29845
|
function isLiteralPropertyName() {
|
|
29765
29846
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
29766
29847
|
}
|
|
29767
|
-
function
|
|
29848
|
+
function isImportAttributeName2() {
|
|
29768
29849
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
29769
29850
|
}
|
|
29770
29851
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -29883,8 +29964,8 @@ ${lanes.join("\n")}
|
|
|
29883
29964
|
return isLiteralPropertyName();
|
|
29884
29965
|
case 9 /* ObjectBindingElements */:
|
|
29885
29966
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
29886
|
-
case 24 /*
|
|
29887
|
-
return
|
|
29967
|
+
case 24 /* ImportAttributes */:
|
|
29968
|
+
return isImportAttributeName2();
|
|
29888
29969
|
case 7 /* HeritageClauseElement */:
|
|
29889
29970
|
if (token() === 19 /* OpenBraceToken */) {
|
|
29890
29971
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -29987,7 +30068,7 @@ ${lanes.join("\n")}
|
|
|
29987
30068
|
case 12 /* ObjectLiteralMembers */:
|
|
29988
30069
|
case 9 /* ObjectBindingElements */:
|
|
29989
30070
|
case 23 /* ImportOrExportSpecifiers */:
|
|
29990
|
-
case 24 /*
|
|
30071
|
+
case 24 /* ImportAttributes */:
|
|
29991
30072
|
return token() === 20 /* CloseBraceToken */;
|
|
29992
30073
|
case 3 /* SwitchClauseStatements */:
|
|
29993
30074
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -30293,7 +30374,7 @@ ${lanes.join("\n")}
|
|
|
30293
30374
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
30294
30375
|
case 14 /* JsxChildren */:
|
|
30295
30376
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
30296
|
-
case 24 /*
|
|
30377
|
+
case 24 /* ImportAttributes */:
|
|
30297
30378
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
30298
30379
|
case 25 /* JSDocComment */:
|
|
30299
30380
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -31168,16 +31249,22 @@ ${lanes.join("\n")}
|
|
|
31168
31249
|
nextToken();
|
|
31169
31250
|
return token() === 102 /* ImportKeyword */;
|
|
31170
31251
|
}
|
|
31171
|
-
function
|
|
31252
|
+
function parseImportTypeAttributes() {
|
|
31172
31253
|
const pos = getNodePos();
|
|
31173
31254
|
const openBracePosition = scanner2.getTokenStart();
|
|
31174
31255
|
parseExpected(19 /* OpenBraceToken */);
|
|
31175
31256
|
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
31176
|
-
|
|
31257
|
+
const currentToken2 = token();
|
|
31258
|
+
if (currentToken2 !== 118 /* WithKeyword */ && currentToken2 !== 132 /* AssertKeyword */) {
|
|
31259
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
31260
|
+
} else {
|
|
31261
|
+
nextToken();
|
|
31262
|
+
}
|
|
31177
31263
|
parseExpected(59 /* ColonToken */);
|
|
31178
|
-
const
|
|
31179
|
-
|
|
31180
|
-
|
|
31264
|
+
const attributes = parseImportAttributes(
|
|
31265
|
+
currentToken2,
|
|
31266
|
+
/*shouldAdvance*/
|
|
31267
|
+
false
|
|
31181
31268
|
);
|
|
31182
31269
|
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
31183
31270
|
const lastError = lastOrUndefined(parseDiagnostics);
|
|
@@ -31188,7 +31275,7 @@ ${lanes.join("\n")}
|
|
|
31188
31275
|
);
|
|
31189
31276
|
}
|
|
31190
31277
|
}
|
|
31191
|
-
return finishNode(factory2.
|
|
31278
|
+
return finishNode(factory2.createImportTypeAttributes(attributes, multiLine), pos);
|
|
31192
31279
|
}
|
|
31193
31280
|
function parseImportType() {
|
|
31194
31281
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
@@ -31197,14 +31284,14 @@ ${lanes.join("\n")}
|
|
|
31197
31284
|
parseExpected(102 /* ImportKeyword */);
|
|
31198
31285
|
parseExpected(21 /* OpenParenToken */);
|
|
31199
31286
|
const type = parseType();
|
|
31200
|
-
let
|
|
31287
|
+
let attributes;
|
|
31201
31288
|
if (parseOptional(28 /* CommaToken */)) {
|
|
31202
|
-
|
|
31289
|
+
attributes = parseImportTypeAttributes();
|
|
31203
31290
|
}
|
|
31204
31291
|
parseExpected(22 /* CloseParenToken */);
|
|
31205
31292
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
31206
31293
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
31207
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
31294
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
31208
31295
|
}
|
|
31209
31296
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
31210
31297
|
nextToken();
|
|
@@ -34266,15 +34353,16 @@ ${lanes.join("\n")}
|
|
|
34266
34353
|
parseExpected(161 /* FromKeyword */);
|
|
34267
34354
|
}
|
|
34268
34355
|
const moduleSpecifier = parseModuleSpecifier();
|
|
34269
|
-
|
|
34270
|
-
|
|
34271
|
-
|
|
34356
|
+
const currentToken2 = token();
|
|
34357
|
+
let attributes;
|
|
34358
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
|
|
34359
|
+
attributes = parseImportAttributes(currentToken2);
|
|
34272
34360
|
}
|
|
34273
34361
|
parseSemicolon();
|
|
34274
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
34362
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
34275
34363
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
34276
34364
|
}
|
|
34277
|
-
function
|
|
34365
|
+
function parseImportAttribute() {
|
|
34278
34366
|
const pos = getNodePos();
|
|
34279
34367
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
34280
34368
|
parseExpected(59 /* ColonToken */);
|
|
@@ -34282,19 +34370,19 @@ ${lanes.join("\n")}
|
|
|
34282
34370
|
/*allowReturnTypeInArrowFunction*/
|
|
34283
34371
|
true
|
|
34284
34372
|
);
|
|
34285
|
-
return finishNode(factory2.
|
|
34373
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
34286
34374
|
}
|
|
34287
|
-
function
|
|
34375
|
+
function parseImportAttributes(token2, shouldAdvance = true) {
|
|
34288
34376
|
const pos = getNodePos();
|
|
34289
|
-
if (
|
|
34290
|
-
|
|
34377
|
+
if (shouldAdvance) {
|
|
34378
|
+
nextToken();
|
|
34291
34379
|
}
|
|
34292
34380
|
const openBracePosition = scanner2.getTokenStart();
|
|
34293
34381
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
34294
34382
|
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
34295
34383
|
const elements = parseDelimitedList(
|
|
34296
|
-
24 /*
|
|
34297
|
-
|
|
34384
|
+
24 /* ImportAttributes */,
|
|
34385
|
+
parseImportAttribute,
|
|
34298
34386
|
/*considerSemicolonAsDelimiter*/
|
|
34299
34387
|
true
|
|
34300
34388
|
);
|
|
@@ -34307,7 +34395,7 @@ ${lanes.join("\n")}
|
|
|
34307
34395
|
);
|
|
34308
34396
|
}
|
|
34309
34397
|
}
|
|
34310
|
-
return finishNode(factory2.
|
|
34398
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
34311
34399
|
} else {
|
|
34312
34400
|
const elements = createNodeArray(
|
|
34313
34401
|
[],
|
|
@@ -34317,10 +34405,11 @@ ${lanes.join("\n")}
|
|
|
34317
34405
|
/*hasTrailingComma*/
|
|
34318
34406
|
false
|
|
34319
34407
|
);
|
|
34320
|
-
return finishNode(factory2.
|
|
34408
|
+
return finishNode(factory2.createImportAttributes(
|
|
34321
34409
|
elements,
|
|
34322
34410
|
/*multiLine*/
|
|
34323
|
-
false
|
|
34411
|
+
false,
|
|
34412
|
+
token2
|
|
34324
34413
|
), pos);
|
|
34325
34414
|
}
|
|
34326
34415
|
}
|
|
@@ -34452,7 +34541,7 @@ ${lanes.join("\n")}
|
|
|
34452
34541
|
);
|
|
34453
34542
|
let exportClause;
|
|
34454
34543
|
let moduleSpecifier;
|
|
34455
|
-
let
|
|
34544
|
+
let attributes;
|
|
34456
34545
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
34457
34546
|
const namespaceExportPos = getNodePos();
|
|
34458
34547
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -34468,12 +34557,13 @@ ${lanes.join("\n")}
|
|
|
34468
34557
|
moduleSpecifier = parseModuleSpecifier();
|
|
34469
34558
|
}
|
|
34470
34559
|
}
|
|
34471
|
-
|
|
34472
|
-
|
|
34560
|
+
const currentToken2 = token();
|
|
34561
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
|
|
34562
|
+
attributes = parseImportAttributes(currentToken2);
|
|
34473
34563
|
}
|
|
34474
34564
|
parseSemicolon();
|
|
34475
34565
|
setAwaitContext(savedAwaitContext);
|
|
34476
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
34566
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
34477
34567
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
34478
34568
|
}
|
|
34479
34569
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -34523,7 +34613,7 @@ ${lanes.join("\n")}
|
|
|
34523
34613
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
34524
34614
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
34525
34615
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
34526
|
-
ParsingContext2[ParsingContext2["
|
|
34616
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
34527
34617
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
34528
34618
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
34529
34619
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -34543,8 +34633,7 @@ ${lanes.join("\n")}
|
|
|
34543
34633
|
/*syntaxCursor*/
|
|
34544
34634
|
void 0,
|
|
34545
34635
|
1 /* JS */,
|
|
34546
|
-
/*
|
|
34547
|
-
false
|
|
34636
|
+
0 /* ParseAll */
|
|
34548
34637
|
);
|
|
34549
34638
|
scanner2.setText(content, start, length2);
|
|
34550
34639
|
currentToken = scanner2.scan();
|
|
@@ -34609,8 +34698,7 @@ ${lanes.join("\n")}
|
|
|
34609
34698
|
/*syntaxCursor*/
|
|
34610
34699
|
void 0,
|
|
34611
34700
|
1 /* JS */,
|
|
34612
|
-
/*
|
|
34613
|
-
false
|
|
34701
|
+
0 /* ParseAll */
|
|
34614
34702
|
);
|
|
34615
34703
|
const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2));
|
|
34616
34704
|
const sourceFile = { languageVariant: 0 /* Standard */, text: content };
|
|
@@ -35566,7 +35654,7 @@ ${lanes.join("\n")}
|
|
|
35566
35654
|
true,
|
|
35567
35655
|
sourceFile.scriptKind,
|
|
35568
35656
|
sourceFile.setExternalModuleIndicator,
|
|
35569
|
-
sourceFile.
|
|
35657
|
+
sourceFile.jsDocParsingMode
|
|
35570
35658
|
);
|
|
35571
35659
|
}
|
|
35572
35660
|
const incrementalSourceFile = sourceFile;
|
|
@@ -35591,7 +35679,7 @@ ${lanes.join("\n")}
|
|
|
35591
35679
|
true,
|
|
35592
35680
|
sourceFile.scriptKind,
|
|
35593
35681
|
sourceFile.setExternalModuleIndicator,
|
|
35594
|
-
sourceFile.
|
|
35682
|
+
sourceFile.jsDocParsingMode
|
|
35595
35683
|
);
|
|
35596
35684
|
result.commentDirectives = getNewCommentDirectives(
|
|
35597
35685
|
sourceFile.commentDirectives,
|
|
@@ -48751,7 +48839,7 @@ ${lanes.join("\n")}
|
|
|
48751
48839
|
return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0;
|
|
48752
48840
|
}
|
|
48753
48841
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
|
|
48754
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
48842
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
48755
48843
|
if (startsWith(moduleReference, "@types/")) {
|
|
48756
48844
|
const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
48757
48845
|
const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
|
|
@@ -48769,7 +48857,7 @@ ${lanes.join("\n")}
|
|
|
48769
48857
|
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);
|
|
48770
48858
|
const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
|
|
48771
48859
|
const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);
|
|
48772
|
-
const resolvedModule = (
|
|
48860
|
+
const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule;
|
|
48773
48861
|
const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile);
|
|
48774
48862
|
const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName);
|
|
48775
48863
|
if (sourceFile) {
|
|
@@ -48777,7 +48865,7 @@ ${lanes.join("\n")}
|
|
|
48777
48865
|
error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);
|
|
48778
48866
|
}
|
|
48779
48867
|
if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) {
|
|
48780
|
-
const importOrExport = ((
|
|
48868
|
+
const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
|
|
48781
48869
|
if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) {
|
|
48782
48870
|
error2(
|
|
48783
48871
|
errorNode,
|
|
@@ -48786,7 +48874,7 @@ ${lanes.join("\n")}
|
|
|
48786
48874
|
);
|
|
48787
48875
|
}
|
|
48788
48876
|
} else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) {
|
|
48789
|
-
const importOrExport = ((
|
|
48877
|
+
const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
|
|
48790
48878
|
if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) {
|
|
48791
48879
|
const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference));
|
|
48792
48880
|
error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension);
|
|
@@ -48806,9 +48894,8 @@ ${lanes.join("\n")}
|
|
|
48806
48894
|
}
|
|
48807
48895
|
if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
|
|
48808
48896
|
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
|
|
48809
|
-
const
|
|
48810
|
-
|
|
48811
|
-
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) {
|
|
48897
|
+
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
|
|
48898
|
+
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
|
|
48812
48899
|
if (findAncestor(location, isImportEqualsDeclaration)) {
|
|
48813
48900
|
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);
|
|
48814
48901
|
} else {
|
|
@@ -48914,7 +49001,7 @@ ${lanes.join("\n")}
|
|
|
48914
49001
|
error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
48915
49002
|
} else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
48916
49003
|
const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
|
|
48917
|
-
const suggestedExt = (
|
|
49004
|
+
const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
|
|
48918
49005
|
if (suggestedExt) {
|
|
48919
49006
|
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);
|
|
48920
49007
|
} else {
|
|
@@ -50213,7 +50300,7 @@ ${lanes.join("\n")}
|
|
|
50213
50300
|
}
|
|
50214
50301
|
return factory.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, constraintNode));
|
|
50215
50302
|
}
|
|
50216
|
-
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */) {
|
|
50303
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */ && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration)) {
|
|
50217
50304
|
const name2 = typeParameterToName(type, context);
|
|
50218
50305
|
context.approximateLength += idText(name2).length;
|
|
50219
50306
|
return factory.createTypeReferenceNode(
|
|
@@ -50679,7 +50766,7 @@ ${lanes.join("\n")}
|
|
|
50679
50766
|
return factory.updateImportTypeNode(
|
|
50680
50767
|
root,
|
|
50681
50768
|
root.argument,
|
|
50682
|
-
root.
|
|
50769
|
+
root.attributes,
|
|
50683
50770
|
qualifier,
|
|
50684
50771
|
typeArguments,
|
|
50685
50772
|
root.isTypeOf
|
|
@@ -50979,65 +51066,36 @@ ${lanes.join("\n")}
|
|
|
50979
51066
|
true
|
|
50980
51067
|
)[0];
|
|
50981
51068
|
let cleanup;
|
|
50982
|
-
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) &&
|
|
50983
|
-
|
|
50984
|
-
|
|
50985
|
-
|
|
50986
|
-
|
|
50987
|
-
|
|
50988
|
-
|
|
50989
|
-
|
|
50990
|
-
|
|
50991
|
-
|
|
50992
|
-
|
|
50993
|
-
|
|
50994
|
-
|
|
50995
|
-
if (!locals.has(name)) {
|
|
50996
|
-
newLocals = append(newLocals, name);
|
|
50997
|
-
locals.set(name, symbol);
|
|
50998
|
-
}
|
|
50999
|
-
});
|
|
51000
|
-
if (!newLocals)
|
|
51001
|
-
return;
|
|
51002
|
-
const oldCleanup = cleanup;
|
|
51003
|
-
function undo() {
|
|
51069
|
+
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && some(expandedParams)) {
|
|
51070
|
+
const existingFakeScope = getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration ? context.enclosingDeclaration : void 0;
|
|
51071
|
+
Debug.assertOptionalNode(existingFakeScope, isBlock);
|
|
51072
|
+
const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable();
|
|
51073
|
+
let newLocals;
|
|
51074
|
+
for (const param of expandedParams) {
|
|
51075
|
+
if (!locals.has(param.escapedName)) {
|
|
51076
|
+
newLocals = append(newLocals, param.escapedName);
|
|
51077
|
+
locals.set(param.escapedName, param);
|
|
51078
|
+
}
|
|
51079
|
+
}
|
|
51080
|
+
if (newLocals) {
|
|
51081
|
+
let removeNewLocals2 = function() {
|
|
51004
51082
|
forEach(newLocals, (s) => locals.delete(s));
|
|
51005
|
-
|
|
51006
|
-
|
|
51083
|
+
};
|
|
51084
|
+
var removeNewLocals = removeNewLocals2;
|
|
51007
51085
|
if (existingFakeScope) {
|
|
51008
|
-
cleanup =
|
|
51086
|
+
cleanup = removeNewLocals2;
|
|
51009
51087
|
} else {
|
|
51010
51088
|
const fakeScope = parseNodeFactory.createBlock(emptyArray);
|
|
51011
|
-
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration =
|
|
51089
|
+
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = true;
|
|
51012
51090
|
fakeScope.locals = locals;
|
|
51013
51091
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
51014
51092
|
setParent(fakeScope, saveEnclosingDeclaration);
|
|
51015
51093
|
context.enclosingDeclaration = fakeScope;
|
|
51016
51094
|
cleanup = () => {
|
|
51017
51095
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
51018
|
-
|
|
51096
|
+
removeNewLocals2();
|
|
51019
51097
|
};
|
|
51020
51098
|
}
|
|
51021
|
-
};
|
|
51022
|
-
var pushFakeScope = pushFakeScope2;
|
|
51023
|
-
pushFakeScope2(
|
|
51024
|
-
"params",
|
|
51025
|
-
(add) => {
|
|
51026
|
-
for (const param of expandedParams) {
|
|
51027
|
-
add(param.escapedName, param);
|
|
51028
|
-
}
|
|
51029
|
-
}
|
|
51030
|
-
);
|
|
51031
|
-
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51032
|
-
pushFakeScope2(
|
|
51033
|
-
"typeParams",
|
|
51034
|
-
(add) => {
|
|
51035
|
-
for (const typeParam of signature.typeParameters ?? emptyArray) {
|
|
51036
|
-
const typeParamName = typeParameterToName(typeParam, context).escapedText;
|
|
51037
|
-
add(typeParamName, typeParam.symbol);
|
|
51038
|
-
}
|
|
51039
|
-
}
|
|
51040
|
-
);
|
|
51041
51099
|
}
|
|
51042
51100
|
}
|
|
51043
51101
|
const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports));
|
|
@@ -51441,7 +51499,6 @@ ${lanes.join("\n")}
|
|
|
51441
51499
|
return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
|
|
51442
51500
|
}
|
|
51443
51501
|
function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
|
|
51444
|
-
var _a, _b, _c, _d;
|
|
51445
51502
|
const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */));
|
|
51446
51503
|
const isTypeOf = meaning === 111551 /* Value */;
|
|
51447
51504
|
if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
@@ -51450,17 +51507,18 @@ ${lanes.join("\n")}
|
|
|
51450
51507
|
const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration));
|
|
51451
51508
|
const targetFile = getSourceFileOfModule(chain[0]);
|
|
51452
51509
|
let specifier;
|
|
51453
|
-
let
|
|
51510
|
+
let attributes;
|
|
51454
51511
|
if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
|
|
51455
51512
|
if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) {
|
|
51456
51513
|
specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */);
|
|
51457
|
-
|
|
51458
|
-
factory.
|
|
51459
|
-
factory.
|
|
51460
|
-
|
|
51461
|
-
|
|
51462
|
-
|
|
51463
|
-
|
|
51514
|
+
attributes = factory.createImportTypeAttributes(factory.createImportAttributes(
|
|
51515
|
+
factory.createNodeArray([
|
|
51516
|
+
factory.createImportAttribute(
|
|
51517
|
+
factory.createStringLiteral("resolution-mode"),
|
|
51518
|
+
factory.createStringLiteral("import")
|
|
51519
|
+
)
|
|
51520
|
+
])
|
|
51521
|
+
));
|
|
51464
51522
|
}
|
|
51465
51523
|
}
|
|
51466
51524
|
if (!specifier) {
|
|
@@ -51474,16 +51532,17 @@ ${lanes.join("\n")}
|
|
|
51474
51532
|
if (specifier.includes("/node_modules/")) {
|
|
51475
51533
|
specifier = oldSpecifier;
|
|
51476
51534
|
} else {
|
|
51477
|
-
|
|
51478
|
-
factory.
|
|
51479
|
-
factory.
|
|
51480
|
-
|
|
51481
|
-
|
|
51482
|
-
|
|
51483
|
-
|
|
51535
|
+
attributes = factory.createImportTypeAttributes(factory.createImportAttributes(
|
|
51536
|
+
factory.createNodeArray([
|
|
51537
|
+
factory.createImportAttribute(
|
|
51538
|
+
factory.createStringLiteral("resolution-mode"),
|
|
51539
|
+
factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require")
|
|
51540
|
+
)
|
|
51541
|
+
])
|
|
51542
|
+
));
|
|
51484
51543
|
}
|
|
51485
51544
|
}
|
|
51486
|
-
if (!
|
|
51545
|
+
if (!attributes) {
|
|
51487
51546
|
context.encounteredError = true;
|
|
51488
51547
|
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
51489
51548
|
context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
|
|
@@ -51503,11 +51562,11 @@ ${lanes.join("\n")}
|
|
|
51503
51562
|
void 0
|
|
51504
51563
|
);
|
|
51505
51564
|
}
|
|
51506
|
-
return factory.createImportTypeNode(lit,
|
|
51565
|
+
return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf);
|
|
51507
51566
|
} else {
|
|
51508
51567
|
const splitNode = getTopmostIndexedAccessType(nonRootParts);
|
|
51509
51568
|
const qualifier = splitNode.objectType.typeName;
|
|
51510
|
-
return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit,
|
|
51569
|
+
return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
51511
51570
|
}
|
|
51512
51571
|
}
|
|
51513
51572
|
const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
|
|
@@ -51581,7 +51640,7 @@ ${lanes.join("\n")}
|
|
|
51581
51640
|
return identifier;
|
|
51582
51641
|
}
|
|
51583
51642
|
}
|
|
51584
|
-
function
|
|
51643
|
+
function typeParameterShadowsNameInScope(escapedName, context, type) {
|
|
51585
51644
|
const result = resolveName(
|
|
51586
51645
|
context.enclosingDeclaration,
|
|
51587
51646
|
escapedName,
|
|
@@ -51592,8 +51651,11 @@ ${lanes.join("\n")}
|
|
|
51592
51651
|
/*isUse*/
|
|
51593
51652
|
false
|
|
51594
51653
|
);
|
|
51595
|
-
if (result
|
|
51596
|
-
|
|
51654
|
+
if (result) {
|
|
51655
|
+
if (result.flags & 262144 /* TypeParameter */ && result === type.symbol) {
|
|
51656
|
+
return false;
|
|
51657
|
+
}
|
|
51658
|
+
return true;
|
|
51597
51659
|
}
|
|
51598
51660
|
return false;
|
|
51599
51661
|
}
|
|
@@ -51619,7 +51681,7 @@ ${lanes.join("\n")}
|
|
|
51619
51681
|
const rawtext = result.escapedText;
|
|
51620
51682
|
let i = ((_a = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a.get(rawtext)) || 0;
|
|
51621
51683
|
let text = rawtext;
|
|
51622
|
-
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) ||
|
|
51684
|
+
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
51623
51685
|
i++;
|
|
51624
51686
|
text = `${rawtext}_${i}`;
|
|
51625
51687
|
}
|
|
@@ -51630,7 +51692,7 @@ ${lanes.join("\n")}
|
|
|
51630
51692
|
}
|
|
51631
51693
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
51632
51694
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
51633
|
-
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(
|
|
51695
|
+
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(rawtext);
|
|
51634
51696
|
}
|
|
51635
51697
|
return result;
|
|
51636
51698
|
}
|
|
@@ -51775,10 +51837,7 @@ ${lanes.join("\n")}
|
|
|
51775
51837
|
return !(getObjectFlags(type) & 4 /* Reference */) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);
|
|
51776
51838
|
}
|
|
51777
51839
|
function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) {
|
|
51778
|
-
|
|
51779
|
-
enclosingDeclaration = enclosingDeclaration.parent;
|
|
51780
|
-
}
|
|
51781
|
-
return enclosingDeclaration;
|
|
51840
|
+
return getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration ? enclosingDeclaration.parent : enclosingDeclaration;
|
|
51782
51841
|
}
|
|
51783
51842
|
function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) {
|
|
51784
51843
|
if (!isErrorType(type) && enclosingDeclaration) {
|
|
@@ -51858,7 +51917,7 @@ ${lanes.join("\n")}
|
|
|
51858
51917
|
}
|
|
51859
51918
|
if (isIdentifier(node)) {
|
|
51860
51919
|
const type = getDeclaredTypeOfSymbol(sym);
|
|
51861
|
-
const name = sym.flags & 262144 /* TypeParameter */ ? typeParameterToName(type, context) : factory.cloneNode(node);
|
|
51920
|
+
const name = sym.flags & 262144 /* TypeParameter */ && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : factory.cloneNode(node);
|
|
51862
51921
|
name.symbol = sym;
|
|
51863
51922
|
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), 16777216 /* NoAsciiEscaping */) };
|
|
51864
51923
|
}
|
|
@@ -51983,7 +52042,7 @@ ${lanes.join("\n")}
|
|
|
51983
52042
|
return factory.updateImportTypeNode(
|
|
51984
52043
|
node,
|
|
51985
52044
|
factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)),
|
|
51986
|
-
node.
|
|
52045
|
+
node.attributes,
|
|
51987
52046
|
node.qualifier,
|
|
51988
52047
|
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
|
51989
52048
|
node.isTypeOf
|
|
@@ -52203,7 +52262,7 @@ ${lanes.join("\n")}
|
|
|
52203
52262
|
return statements;
|
|
52204
52263
|
}
|
|
52205
52264
|
function inlineExportModifiers(statements) {
|
|
52206
|
-
const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.
|
|
52265
|
+
const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause));
|
|
52207
52266
|
if (index >= 0) {
|
|
52208
52267
|
const exportDecl = statements[index];
|
|
52209
52268
|
const replacements = mapDefined(exportDecl.exportClause.elements, (e) => {
|
|
@@ -52231,7 +52290,7 @@ ${lanes.join("\n")}
|
|
|
52231
52290
|
replacements
|
|
52232
52291
|
),
|
|
52233
52292
|
exportDecl.moduleSpecifier,
|
|
52234
|
-
exportDecl.
|
|
52293
|
+
exportDecl.attributes
|
|
52235
52294
|
);
|
|
52236
52295
|
}
|
|
52237
52296
|
}
|
|
@@ -52882,7 +52941,7 @@ ${lanes.join("\n")}
|
|
|
52882
52941
|
)])
|
|
52883
52942
|
),
|
|
52884
52943
|
factory.createStringLiteral(specifier2),
|
|
52885
|
-
/*
|
|
52944
|
+
/*attributes*/
|
|
52886
52945
|
void 0
|
|
52887
52946
|
),
|
|
52888
52947
|
0 /* None */
|
|
@@ -52970,7 +53029,7 @@ ${lanes.join("\n")}
|
|
|
52970
53029
|
void 0
|
|
52971
53030
|
),
|
|
52972
53031
|
specifier2,
|
|
52973
|
-
node.parent.
|
|
53032
|
+
node.parent.attributes
|
|
52974
53033
|
),
|
|
52975
53034
|
0 /* None */
|
|
52976
53035
|
);
|
|
@@ -52991,7 +53050,7 @@ ${lanes.join("\n")}
|
|
|
52991
53050
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
52992
53051
|
),
|
|
52993
53052
|
specifier2,
|
|
52994
|
-
node.parent.
|
|
53053
|
+
node.parent.attributes
|
|
52995
53054
|
),
|
|
52996
53055
|
0 /* None */
|
|
52997
53056
|
);
|
|
@@ -53032,7 +53091,7 @@ ${lanes.join("\n")}
|
|
|
53032
53091
|
])
|
|
53033
53092
|
),
|
|
53034
53093
|
specifier2,
|
|
53035
|
-
node.parent.parent.parent.
|
|
53094
|
+
node.parent.parent.parent.attributes
|
|
53036
53095
|
),
|
|
53037
53096
|
0 /* None */
|
|
53038
53097
|
);
|
|
@@ -78270,16 +78329,16 @@ ${lanes.join("\n")}
|
|
|
78270
78329
|
getTypeFromTypeNode(node);
|
|
78271
78330
|
}
|
|
78272
78331
|
function checkImportType(node) {
|
|
78332
|
+
var _a, _b;
|
|
78273
78333
|
checkSourceElement(node.argument);
|
|
78274
|
-
if (node.
|
|
78275
|
-
const override =
|
|
78276
|
-
|
|
78277
|
-
|
|
78278
|
-
|
|
78279
|
-
|
|
78280
|
-
|
|
78281
|
-
|
|
78282
|
-
}
|
|
78334
|
+
if (node.attributes) {
|
|
78335
|
+
const override = getResolutionModeOverride((_a = node.attributes) == null ? void 0 : _a.attributes, grammarErrorOnNode);
|
|
78336
|
+
const errorNode = (_b = node.attributes) == null ? void 0 : _b.attributes;
|
|
78337
|
+
if (override && errorNode && getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
|
|
78338
|
+
grammarErrorOnNode(
|
|
78339
|
+
errorNode,
|
|
78340
|
+
node.attributes.attributes.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_attribute_are_only_supported_when_moduleResolution_is_node16_or_nodenext : Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext
|
|
78341
|
+
);
|
|
78283
78342
|
}
|
|
78284
78343
|
}
|
|
78285
78344
|
checkTypeReferenceOrImport(node);
|
|
@@ -82244,12 +82303,13 @@ ${lanes.join("\n")}
|
|
|
82244
82303
|
return false;
|
|
82245
82304
|
}
|
|
82246
82305
|
}
|
|
82247
|
-
if (!isImportEqualsDeclaration(node) && node.
|
|
82306
|
+
if (!isImportEqualsDeclaration(node) && node.attributes) {
|
|
82307
|
+
const diagnostic = node.attributes.token === 118 /* WithKeyword */ ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions;
|
|
82248
82308
|
let hasError = false;
|
|
82249
|
-
for (const
|
|
82250
|
-
if (!isStringLiteral(
|
|
82309
|
+
for (const attr of node.attributes.elements) {
|
|
82310
|
+
if (!isStringLiteral(attr.value)) {
|
|
82251
82311
|
hasError = true;
|
|
82252
|
-
error2(
|
|
82312
|
+
error2(attr.value, diagnostic);
|
|
82253
82313
|
}
|
|
82254
82314
|
}
|
|
82255
82315
|
return !hasError;
|
|
@@ -82381,32 +82441,35 @@ ${lanes.join("\n")}
|
|
|
82381
82441
|
checkExternalEmitHelpers(node, 131072 /* ImportDefault */);
|
|
82382
82442
|
}
|
|
82383
82443
|
}
|
|
82384
|
-
function
|
|
82444
|
+
function checkImportAttributes(declaration) {
|
|
82385
82445
|
var _a;
|
|
82386
|
-
if (declaration.
|
|
82387
|
-
|
|
82388
|
-
|
|
82389
|
-
|
|
82390
|
-
|
|
82391
|
-
|
|
82392
|
-
|
|
82446
|
+
if (declaration.attributes && declaration.attributes.token === 132 /* AssertKeyword */) {
|
|
82447
|
+
grammarErrorOnFirstToken(declaration.attributes, Diagnostics.The_assert_keyword_in_import_attributes_is_deprecated_and_has_been_replaced_by_the_with_keyword);
|
|
82448
|
+
}
|
|
82449
|
+
const node = declaration.attributes;
|
|
82450
|
+
if (node) {
|
|
82451
|
+
const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
82452
|
+
const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0);
|
|
82453
|
+
const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */;
|
|
82454
|
+
if (validForTypeAttributes && override) {
|
|
82393
82455
|
if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
|
|
82394
|
-
return grammarErrorOnNode(
|
|
82456
|
+
return grammarErrorOnNode(
|
|
82457
|
+
node,
|
|
82458
|
+
isImportAttributes2 ? Diagnostics.resolution_mode_attribute_are_only_supported_when_moduleResolution_is_node16_or_nodenext : Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext
|
|
82459
|
+
);
|
|
82395
82460
|
}
|
|
82396
82461
|
return;
|
|
82397
82462
|
}
|
|
82398
82463
|
const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
82399
82464
|
if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) {
|
|
82400
|
-
|
|
82401
|
-
|
|
82402
|
-
moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext
|
|
82403
|
-
);
|
|
82465
|
+
const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext;
|
|
82466
|
+
return grammarErrorOnNode(node, message);
|
|
82404
82467
|
}
|
|
82405
82468
|
if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
82406
|
-
return grammarErrorOnNode(
|
|
82469
|
+
return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
|
|
82407
82470
|
}
|
|
82408
82471
|
if (override) {
|
|
82409
|
-
return grammarErrorOnNode(
|
|
82472
|
+
return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
|
|
82410
82473
|
}
|
|
82411
82474
|
}
|
|
82412
82475
|
}
|
|
@@ -82438,7 +82501,7 @@ ${lanes.join("\n")}
|
|
|
82438
82501
|
}
|
|
82439
82502
|
}
|
|
82440
82503
|
}
|
|
82441
|
-
|
|
82504
|
+
checkImportAttributes(node);
|
|
82442
82505
|
}
|
|
82443
82506
|
function checkImportEqualsDeclaration(node) {
|
|
82444
82507
|
if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
|
|
@@ -82511,7 +82574,7 @@ ${lanes.join("\n")}
|
|
|
82511
82574
|
}
|
|
82512
82575
|
}
|
|
82513
82576
|
}
|
|
82514
|
-
|
|
82577
|
+
checkImportAttributes(node);
|
|
82515
82578
|
}
|
|
82516
82579
|
function checkGrammarExportDeclaration(node) {
|
|
82517
82580
|
var _a;
|
|
@@ -86301,12 +86364,12 @@ ${lanes.join("\n")}
|
|
|
86301
86364
|
if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) {
|
|
86302
86365
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
86303
86366
|
if (nodeArguments.length > 1) {
|
|
86304
|
-
const
|
|
86305
|
-
return grammarErrorOnNode(
|
|
86367
|
+
const importAttributesArgument = nodeArguments[1];
|
|
86368
|
+
return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
|
|
86306
86369
|
}
|
|
86307
86370
|
}
|
|
86308
86371
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
86309
|
-
return grammarErrorOnNode(node, Diagnostics.
|
|
86372
|
+
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);
|
|
86310
86373
|
}
|
|
86311
86374
|
const spreadElement = find(nodeArguments, isSpreadElement);
|
|
86312
86375
|
if (spreadElement) {
|
|
@@ -86705,13 +86768,6 @@ ${lanes.join("\n")}
|
|
|
86705
86768
|
this.inner.reportNonSerializableProperty(propertyName);
|
|
86706
86769
|
}
|
|
86707
86770
|
}
|
|
86708
|
-
reportImportTypeNodeResolutionModeOverride() {
|
|
86709
|
-
var _a;
|
|
86710
|
-
if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) {
|
|
86711
|
-
this.onDiagnosticReported();
|
|
86712
|
-
this.inner.reportImportTypeNodeResolutionModeOverride();
|
|
86713
|
-
}
|
|
86714
|
-
}
|
|
86715
86771
|
onDiagnosticReported() {
|
|
86716
86772
|
this.context.reportedDiagnostic = true;
|
|
86717
86773
|
}
|
|
@@ -87231,16 +87287,16 @@ ${lanes.join("\n")}
|
|
|
87231
87287
|
return context.factory.updateImportTypeNode(
|
|
87232
87288
|
node,
|
|
87233
87289
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
87234
|
-
nodeVisitor(node.
|
|
87290
|
+
nodeVisitor(node.attributes, visitor, isImportTypeAttributes),
|
|
87235
87291
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
87236
87292
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
87237
87293
|
node.isTypeOf
|
|
87238
87294
|
);
|
|
87239
87295
|
},
|
|
87240
|
-
[302 /*
|
|
87241
|
-
return context.factory.
|
|
87296
|
+
[302 /* ImportTypeAttributes */]: function visitEachChildOfImportTypeAttributes(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87297
|
+
return context.factory.updateImportTypeAttributes(
|
|
87242
87298
|
node,
|
|
87243
|
-
Debug.checkDefined(nodeVisitor(node.
|
|
87299
|
+
Debug.checkDefined(nodeVisitor(node.attributes, visitor, isImportAttributes)),
|
|
87244
87300
|
node.multiLine
|
|
87245
87301
|
);
|
|
87246
87302
|
},
|
|
@@ -87782,20 +87838,20 @@ ${lanes.join("\n")}
|
|
|
87782
87838
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
87783
87839
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
87784
87840
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
87785
|
-
nodeVisitor(node.
|
|
87841
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
87786
87842
|
);
|
|
87787
87843
|
},
|
|
87788
|
-
[300 /*
|
|
87789
|
-
return context.factory.
|
|
87844
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
87845
|
+
return context.factory.updateImportAttributes(
|
|
87790
87846
|
node,
|
|
87791
|
-
nodesVisitor(node.elements, visitor,
|
|
87847
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
87792
87848
|
node.multiLine
|
|
87793
87849
|
);
|
|
87794
87850
|
},
|
|
87795
|
-
[301 /*
|
|
87796
|
-
return context.factory.
|
|
87851
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
87852
|
+
return context.factory.updateImportAttribute(
|
|
87797
87853
|
node,
|
|
87798
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
87854
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
87799
87855
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
87800
87856
|
);
|
|
87801
87857
|
},
|
|
@@ -87847,7 +87903,7 @@ ${lanes.join("\n")}
|
|
|
87847
87903
|
node.isTypeOnly,
|
|
87848
87904
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
87849
87905
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
87850
|
-
nodeVisitor(node.
|
|
87906
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
87851
87907
|
);
|
|
87852
87908
|
},
|
|
87853
87909
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -91375,7 +91431,7 @@ ${lanes.join("\n")}
|
|
|
91375
91431
|
void 0,
|
|
91376
91432
|
importClause,
|
|
91377
91433
|
node.moduleSpecifier,
|
|
91378
|
-
node.
|
|
91434
|
+
node.attributes
|
|
91379
91435
|
) : void 0;
|
|
91380
91436
|
}
|
|
91381
91437
|
function visitImportClause(node) {
|
|
@@ -91425,7 +91481,7 @@ ${lanes.join("\n")}
|
|
|
91425
91481
|
node.isTypeOnly,
|
|
91426
91482
|
exportClause,
|
|
91427
91483
|
node.moduleSpecifier,
|
|
91428
|
-
node.
|
|
91484
|
+
node.attributes
|
|
91429
91485
|
) : void 0;
|
|
91430
91486
|
}
|
|
91431
91487
|
function visitNamedExports(node, allowEmpty) {
|
|
@@ -91459,7 +91515,7 @@ ${lanes.join("\n")}
|
|
|
91459
91515
|
/*importClause*/
|
|
91460
91516
|
void 0,
|
|
91461
91517
|
node.moduleReference.expression,
|
|
91462
|
-
/*
|
|
91518
|
+
/*attributes*/
|
|
91463
91519
|
void 0
|
|
91464
91520
|
),
|
|
91465
91521
|
node
|
|
@@ -99697,7 +99753,7 @@ ${lanes.join("\n")}
|
|
|
99697
99753
|
factory2.createNamedImports(arrayFrom(importSpecifiersMap.values()))
|
|
99698
99754
|
),
|
|
99699
99755
|
factory2.createStringLiteral(importSource),
|
|
99700
|
-
/*
|
|
99756
|
+
/*attributes*/
|
|
99701
99757
|
void 0
|
|
99702
99758
|
);
|
|
99703
99759
|
setParentRecursive(
|
|
@@ -109148,7 +109204,9 @@ ${lanes.join("\n")}
|
|
|
109148
109204
|
)
|
|
109149
109205
|
])
|
|
109150
109206
|
),
|
|
109151
|
-
factory2.createStringLiteral("module")
|
|
109207
|
+
factory2.createStringLiteral("module"),
|
|
109208
|
+
/*attributes*/
|
|
109209
|
+
void 0
|
|
109152
109210
|
);
|
|
109153
109211
|
const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
109154
109212
|
const requireStatement = factory2.createVariableStatement(
|
|
@@ -109265,7 +109323,7 @@ ${lanes.join("\n")}
|
|
|
109265
109323
|
)
|
|
109266
109324
|
),
|
|
109267
109325
|
node.moduleSpecifier,
|
|
109268
|
-
node.
|
|
109326
|
+
node.attributes
|
|
109269
109327
|
);
|
|
109270
109328
|
setOriginalNode(importDecl, node.exportClause);
|
|
109271
109329
|
const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration(
|
|
@@ -109735,8 +109793,7 @@ ${lanes.join("\n")}
|
|
|
109735
109793
|
trackReferencedAmbientModule,
|
|
109736
109794
|
trackExternalModuleSymbolOfImportTypeNode,
|
|
109737
109795
|
reportNonlocalAugmentation,
|
|
109738
|
-
reportNonSerializableProperty
|
|
109739
|
-
reportImportTypeNodeResolutionModeOverride
|
|
109796
|
+
reportNonSerializableProperty
|
|
109740
109797
|
};
|
|
109741
109798
|
let errorNameNode;
|
|
109742
109799
|
let errorFallbackNode;
|
|
@@ -109860,11 +109917,6 @@ ${lanes.join("\n")}
|
|
|
109860
109917
|
context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
|
|
109861
109918
|
}
|
|
109862
109919
|
}
|
|
109863
|
-
function reportImportTypeNodeResolutionModeOverride() {
|
|
109864
|
-
if (!isNightly() && (errorNameNode || errorFallbackNode)) {
|
|
109865
|
-
context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
|
|
109866
|
-
}
|
|
109867
|
-
}
|
|
109868
109920
|
function transformDeclarationsForJS(sourceFile, bundled) {
|
|
109869
109921
|
const oldDiag = getSymbolAccessibilityDiagnostic;
|
|
109870
109922
|
getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : {
|
|
@@ -110369,7 +110421,7 @@ ${lanes.join("\n")}
|
|
|
110369
110421
|
decl.modifiers,
|
|
110370
110422
|
decl.importClause,
|
|
110371
110423
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110372
|
-
|
|
110424
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110373
110425
|
);
|
|
110374
110426
|
}
|
|
110375
110427
|
const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0;
|
|
@@ -110385,7 +110437,7 @@ ${lanes.join("\n")}
|
|
|
110385
110437
|
void 0
|
|
110386
110438
|
),
|
|
110387
110439
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110388
|
-
|
|
110440
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110389
110441
|
);
|
|
110390
110442
|
}
|
|
110391
110443
|
if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) {
|
|
@@ -110403,7 +110455,7 @@ ${lanes.join("\n")}
|
|
|
110403
110455
|
namedBindings
|
|
110404
110456
|
),
|
|
110405
110457
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110406
|
-
|
|
110458
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110407
110459
|
) : void 0;
|
|
110408
110460
|
}
|
|
110409
110461
|
const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0);
|
|
@@ -110418,7 +110470,7 @@ ${lanes.join("\n")}
|
|
|
110418
110470
|
bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0
|
|
110419
110471
|
),
|
|
110420
110472
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110421
|
-
|
|
110473
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110422
110474
|
);
|
|
110423
110475
|
}
|
|
110424
110476
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
@@ -110428,19 +110480,13 @@ ${lanes.join("\n")}
|
|
|
110428
110480
|
/*importClause*/
|
|
110429
110481
|
void 0,
|
|
110430
110482
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
110431
|
-
|
|
110483
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
110432
110484
|
);
|
|
110433
110485
|
}
|
|
110434
110486
|
}
|
|
110435
|
-
function
|
|
110436
|
-
const mode =
|
|
110437
|
-
|
|
110438
|
-
if (!isNightly()) {
|
|
110439
|
-
context.addDiagnostic(createDiagnosticForNode(assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
|
|
110440
|
-
}
|
|
110441
|
-
return assertClause;
|
|
110442
|
-
}
|
|
110443
|
-
return void 0;
|
|
110487
|
+
function tryGetResolutionModeOverride(node) {
|
|
110488
|
+
const mode = getResolutionModeOverride(node);
|
|
110489
|
+
return node && mode !== void 0 ? node : void 0;
|
|
110444
110490
|
}
|
|
110445
110491
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
110446
110492
|
while (length(lateMarkedStatements)) {
|
|
@@ -110726,7 +110772,7 @@ ${lanes.join("\n")}
|
|
|
110726
110772
|
return cleanup(factory2.updateImportTypeNode(
|
|
110727
110773
|
input,
|
|
110728
110774
|
factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
|
|
110729
|
-
input.
|
|
110775
|
+
input.attributes,
|
|
110730
110776
|
input.qualifier,
|
|
110731
110777
|
visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode),
|
|
110732
110778
|
input.isTypeOf
|
|
@@ -110780,7 +110826,7 @@ ${lanes.join("\n")}
|
|
|
110780
110826
|
input.isTypeOnly,
|
|
110781
110827
|
input.exportClause,
|
|
110782
110828
|
rewriteModuleSpecifier(input, input.moduleSpecifier),
|
|
110783
|
-
|
|
110829
|
+
tryGetResolutionModeOverride(input.attributes)
|
|
110784
110830
|
);
|
|
110785
110831
|
}
|
|
110786
110832
|
case 277 /* ExportAssignment */: {
|
|
@@ -113252,10 +113298,10 @@ ${lanes.join("\n")}
|
|
|
113252
113298
|
return emitNamedExports(node);
|
|
113253
113299
|
case 281 /* ExportSpecifier */:
|
|
113254
113300
|
return emitExportSpecifier(node);
|
|
113255
|
-
case 300 /*
|
|
113256
|
-
return
|
|
113257
|
-
case 301 /*
|
|
113258
|
-
return
|
|
113301
|
+
case 300 /* ImportAttributes */:
|
|
113302
|
+
return emitImportAttributes(node);
|
|
113303
|
+
case 301 /* ImportAttribute */:
|
|
113304
|
+
return emitImportAttribute(node);
|
|
113259
113305
|
case 282 /* MissingDeclaration */:
|
|
113260
113306
|
return;
|
|
113261
113307
|
case 283 /* ExternalModuleReference */:
|
|
@@ -114030,16 +114076,16 @@ ${lanes.join("\n")}
|
|
|
114030
114076
|
writeKeyword("import");
|
|
114031
114077
|
writePunctuation("(");
|
|
114032
114078
|
emit(node.argument);
|
|
114033
|
-
if (node.
|
|
114079
|
+
if (node.attributes) {
|
|
114034
114080
|
writePunctuation(",");
|
|
114035
114081
|
writeSpace();
|
|
114036
114082
|
writePunctuation("{");
|
|
114037
114083
|
writeSpace();
|
|
114038
|
-
writeKeyword("assert");
|
|
114084
|
+
writeKeyword(node.attributes.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
|
|
114039
114085
|
writePunctuation(":");
|
|
114040
114086
|
writeSpace();
|
|
114041
|
-
const elements = node.
|
|
114042
|
-
emitList(node.
|
|
114087
|
+
const elements = node.attributes.attributes.elements;
|
|
114088
|
+
emitList(node.attributes.attributes, elements, 526226 /* ImportAttributes */);
|
|
114043
114089
|
writeSpace();
|
|
114044
114090
|
writePunctuation("}");
|
|
114045
114091
|
}
|
|
@@ -115024,8 +115070,8 @@ ${lanes.join("\n")}
|
|
|
115024
115070
|
writeSpace();
|
|
115025
115071
|
}
|
|
115026
115072
|
emitExpression(node.moduleSpecifier);
|
|
115027
|
-
if (node.
|
|
115028
|
-
emitWithLeadingSpace(node.
|
|
115073
|
+
if (node.attributes) {
|
|
115074
|
+
emitWithLeadingSpace(node.attributes);
|
|
115029
115075
|
}
|
|
115030
115076
|
writeTrailingSemicolon();
|
|
115031
115077
|
}
|
|
@@ -115094,18 +115140,18 @@ ${lanes.join("\n")}
|
|
|
115094
115140
|
writeSpace();
|
|
115095
115141
|
emitExpression(node.moduleSpecifier);
|
|
115096
115142
|
}
|
|
115097
|
-
if (node.
|
|
115098
|
-
emitWithLeadingSpace(node.
|
|
115143
|
+
if (node.attributes) {
|
|
115144
|
+
emitWithLeadingSpace(node.attributes);
|
|
115099
115145
|
}
|
|
115100
115146
|
writeTrailingSemicolon();
|
|
115101
115147
|
}
|
|
115102
|
-
function
|
|
115103
|
-
emitTokenWithComment(
|
|
115148
|
+
function emitImportAttributes(node) {
|
|
115149
|
+
emitTokenWithComment(node.token, node.pos, writeKeyword, node);
|
|
115104
115150
|
writeSpace();
|
|
115105
115151
|
const elements = node.elements;
|
|
115106
|
-
emitList(node, elements, 526226 /*
|
|
115152
|
+
emitList(node, elements, 526226 /* ImportAttributes */);
|
|
115107
115153
|
}
|
|
115108
|
-
function
|
|
115154
|
+
function emitImportAttribute(node) {
|
|
115109
115155
|
emit(node.name);
|
|
115110
115156
|
writePunctuation(":");
|
|
115111
115157
|
writeSpace();
|
|
@@ -117910,7 +117956,7 @@ ${lanes.join("\n")}
|
|
|
117910
117956
|
function createCompilerHost(options, setParentNodes) {
|
|
117911
117957
|
return createCompilerHostWorker(options, setParentNodes);
|
|
117912
117958
|
}
|
|
117913
|
-
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes
|
|
117959
|
+
function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) {
|
|
117914
117960
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
117915
117961
|
let text;
|
|
117916
117962
|
try {
|
|
@@ -117924,15 +117970,7 @@ ${lanes.join("\n")}
|
|
|
117924
117970
|
}
|
|
117925
117971
|
text = "";
|
|
117926
117972
|
}
|
|
117927
|
-
return text !== void 0 ? createSourceFile(
|
|
117928
|
-
fileName,
|
|
117929
|
-
text,
|
|
117930
|
-
languageVersionOrOptions,
|
|
117931
|
-
setParentNodes,
|
|
117932
|
-
/*scriptKind*/
|
|
117933
|
-
void 0,
|
|
117934
|
-
skipNonSemanticJSDocParsing
|
|
117935
|
-
) : void 0;
|
|
117973
|
+
return text !== void 0 ? createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : void 0;
|
|
117936
117974
|
};
|
|
117937
117975
|
}
|
|
117938
117976
|
function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) {
|
|
@@ -117956,7 +117994,7 @@ ${lanes.join("\n")}
|
|
|
117956
117994
|
}
|
|
117957
117995
|
};
|
|
117958
117996
|
}
|
|
117959
|
-
function createCompilerHostWorker(options, setParentNodes,
|
|
117997
|
+
function createCompilerHostWorker(options, setParentNodes, system = sys) {
|
|
117960
117998
|
const existingDirectories = /* @__PURE__ */ new Map();
|
|
117961
117999
|
const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
117962
118000
|
function directoryExists(directoryPath) {
|
|
@@ -117975,7 +118013,7 @@ ${lanes.join("\n")}
|
|
|
117975
118013
|
const newLine = getNewLineCharacter(options);
|
|
117976
118014
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
117977
118015
|
const compilerHost = {
|
|
117978
|
-
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes
|
|
118016
|
+
getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes),
|
|
117979
118017
|
getDefaultLibLocation,
|
|
117980
118018
|
getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
|
|
117981
118019
|
writeFile: createWriteFileMeasuringIO(
|
|
@@ -118272,14 +118310,14 @@ ${lanes.join("\n")}
|
|
|
118272
118310
|
if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) {
|
|
118273
118311
|
const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
|
|
118274
118312
|
if (isTypeOnly) {
|
|
118275
|
-
const override =
|
|
118313
|
+
const override = getResolutionModeOverride(usage.parent.attributes);
|
|
118276
118314
|
if (override) {
|
|
118277
118315
|
return override;
|
|
118278
118316
|
}
|
|
118279
118317
|
}
|
|
118280
118318
|
}
|
|
118281
118319
|
if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) {
|
|
118282
|
-
const override =
|
|
118320
|
+
const override = getResolutionModeOverride((_a = usage.parent.parent.attributes) == null ? void 0 : _a.attributes);
|
|
118283
118321
|
if (override) {
|
|
118284
118322
|
return override;
|
|
118285
118323
|
}
|
|
@@ -118290,18 +118328,24 @@ ${lanes.join("\n")}
|
|
|
118290
118328
|
const exprParentParent = (_b = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _b.parent;
|
|
118291
118329
|
return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */;
|
|
118292
118330
|
}
|
|
118293
|
-
function
|
|
118294
|
-
if (!
|
|
118331
|
+
function getResolutionModeOverride(node, grammarErrorOnNode) {
|
|
118332
|
+
if (!node)
|
|
118295
118333
|
return void 0;
|
|
118296
|
-
if (length(
|
|
118297
|
-
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118334
|
+
if (length(node.elements) !== 1) {
|
|
118335
|
+
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118336
|
+
node,
|
|
118337
|
+
node.token === 118 /* WithKeyword */ ? Diagnostics.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require
|
|
118338
|
+
);
|
|
118298
118339
|
return void 0;
|
|
118299
118340
|
}
|
|
118300
|
-
const elem =
|
|
118341
|
+
const elem = node.elements[0];
|
|
118301
118342
|
if (!isStringLiteralLike(elem.name))
|
|
118302
118343
|
return void 0;
|
|
118303
118344
|
if (elem.name.text !== "resolution-mode") {
|
|
118304
|
-
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118345
|
+
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
118346
|
+
elem.name,
|
|
118347
|
+
node.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_attributes : Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions
|
|
118348
|
+
);
|
|
118305
118349
|
return void 0;
|
|
118306
118350
|
}
|
|
118307
118351
|
if (!isStringLiteralLike(elem.value))
|
|
@@ -118432,14 +118476,14 @@ ${lanes.join("\n")}
|
|
|
118432
118476
|
return location.pos !== void 0;
|
|
118433
118477
|
}
|
|
118434
118478
|
function getReferencedFileLocation(program, ref) {
|
|
118435
|
-
var _a, _b, _c, _d
|
|
118479
|
+
var _a, _b, _c, _d;
|
|
118436
118480
|
const file = Debug.checkDefined(program.getSourceFileByPath(ref.file));
|
|
118437
118481
|
const { kind, index } = ref;
|
|
118438
118482
|
let pos, end, packageId, resolutionMode;
|
|
118439
118483
|
switch (kind) {
|
|
118440
118484
|
case 3 /* Import */:
|
|
118441
118485
|
const importLiteral = getModuleNameStringLiteralAt(file, index);
|
|
118442
|
-
packageId = (
|
|
118486
|
+
packageId = (_b = (_a = program.getResolvedModule(file, importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.packageId;
|
|
118443
118487
|
if (importLiteral.pos === -1)
|
|
118444
118488
|
return { file, packageId, text: importLiteral.text };
|
|
118445
118489
|
pos = skipTrivia(file.text, importLiteral.pos);
|
|
@@ -118450,7 +118494,7 @@ ${lanes.join("\n")}
|
|
|
118450
118494
|
break;
|
|
118451
118495
|
case 5 /* TypeReferenceDirective */:
|
|
118452
118496
|
({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]);
|
|
118453
|
-
packageId = (
|
|
118497
|
+
packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file, toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId;
|
|
118454
118498
|
break;
|
|
118455
118499
|
case 7 /* LibReferenceDirective */:
|
|
118456
118500
|
({ pos, end } = file.libReferenceDirectives[index]);
|
|
@@ -118885,6 +118929,10 @@ ${lanes.join("\n")}
|
|
|
118885
118929
|
resolvedModules,
|
|
118886
118930
|
resolvedTypeReferenceDirectiveNames,
|
|
118887
118931
|
resolvedLibReferences,
|
|
118932
|
+
getResolvedModule,
|
|
118933
|
+
getResolvedTypeReferenceDirective,
|
|
118934
|
+
forEachResolvedModule,
|
|
118935
|
+
forEachResolvedTypeReferenceDirective,
|
|
118888
118936
|
getCurrentPackagesMap: () => packageMap,
|
|
118889
118937
|
typesPackageExists,
|
|
118890
118938
|
packageBundlesTypes,
|
|
@@ -118928,19 +118976,35 @@ ${lanes.join("\n")}
|
|
|
118928
118976
|
measure("Program", "beforeProgram", "afterProgram");
|
|
118929
118977
|
(_p = tracing) == null ? void 0 : _p.pop();
|
|
118930
118978
|
return program;
|
|
118979
|
+
function getResolvedModule(file, moduleName, mode) {
|
|
118980
|
+
var _a2;
|
|
118981
|
+
return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode);
|
|
118982
|
+
}
|
|
118983
|
+
function getResolvedTypeReferenceDirective(file, typeDirectiveName, mode) {
|
|
118984
|
+
var _a2;
|
|
118985
|
+
return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode);
|
|
118986
|
+
}
|
|
118987
|
+
function forEachResolvedModule(callback, file) {
|
|
118988
|
+
forEachResolution(resolvedModules, callback, file);
|
|
118989
|
+
}
|
|
118990
|
+
function forEachResolvedTypeReferenceDirective(callback, file) {
|
|
118991
|
+
forEachResolution(resolvedTypeReferenceDirectiveNames, callback, file);
|
|
118992
|
+
}
|
|
118993
|
+
function forEachResolution(resolutionCache, callback, file) {
|
|
118994
|
+
var _a2;
|
|
118995
|
+
if (file)
|
|
118996
|
+
(_a2 = resolutionCache == null ? void 0 : resolutionCache.get(file.path)) == null ? void 0 : _a2.forEach((resolution, name, mode) => callback(resolution, name, mode, file.path));
|
|
118997
|
+
else
|
|
118998
|
+
resolutionCache == null ? void 0 : resolutionCache.forEach((resolutions, filePath) => resolutions.forEach((resolution, name, mode) => callback(resolution, name, mode, filePath)));
|
|
118999
|
+
}
|
|
118931
119000
|
function getPackagesMap() {
|
|
118932
119001
|
if (packageMap)
|
|
118933
119002
|
return packageMap;
|
|
118934
119003
|
packageMap = /* @__PURE__ */ new Map();
|
|
118935
|
-
|
|
118936
|
-
(
|
|
118937
|
-
|
|
118938
|
-
|
|
118939
|
-
if (resolvedModule == null ? void 0 : resolvedModule.packageId)
|
|
118940
|
-
packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name));
|
|
118941
|
-
});
|
|
118942
|
-
}
|
|
118943
|
-
);
|
|
119004
|
+
forEachResolvedModule(({ resolvedModule }) => {
|
|
119005
|
+
if (resolvedModule == null ? void 0 : resolvedModule.packageId)
|
|
119006
|
+
packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name));
|
|
119007
|
+
});
|
|
118944
119008
|
return packageMap;
|
|
118945
119009
|
}
|
|
118946
119010
|
function typesPackageExists(packageName) {
|
|
@@ -119072,7 +119136,6 @@ ${lanes.join("\n")}
|
|
|
119072
119136
|
return classifiableNames;
|
|
119073
119137
|
}
|
|
119074
119138
|
function resolveModuleNamesReusingOldState(moduleNames, file) {
|
|
119075
|
-
var _a2, _b2;
|
|
119076
119139
|
if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) {
|
|
119077
119140
|
return resolveModuleNamesWorker(
|
|
119078
119141
|
moduleNames,
|
|
@@ -119090,7 +119153,7 @@ ${lanes.join("\n")}
|
|
|
119090
119153
|
const moduleName = moduleNames[i];
|
|
119091
119154
|
if (file === oldSourceFile && !hasInvalidatedResolutions(file.path)) {
|
|
119092
119155
|
const mode = getModeForUsageLocation(file, moduleName);
|
|
119093
|
-
const oldResolution =
|
|
119156
|
+
const oldResolution = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, mode);
|
|
119094
119157
|
if (oldResolution == null ? void 0 : oldResolution.resolvedModule) {
|
|
119095
119158
|
if (isTraceEnabled(options, host)) {
|
|
119096
119159
|
trace(
|
|
@@ -119137,8 +119200,8 @@ ${lanes.join("\n")}
|
|
|
119137
119200
|
Debug.assert(j === resolutions.length);
|
|
119138
119201
|
return result;
|
|
119139
119202
|
function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) {
|
|
119140
|
-
var
|
|
119141
|
-
const resolutionToFile = (
|
|
119203
|
+
var _a2;
|
|
119204
|
+
const resolutionToFile = (_a2 = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation(file, moduleName))) == null ? void 0 : _a2.resolvedModule;
|
|
119142
119205
|
const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName);
|
|
119143
119206
|
if (resolutionToFile && resolvedFile) {
|
|
119144
119207
|
return false;
|
|
@@ -119154,7 +119217,7 @@ ${lanes.join("\n")}
|
|
|
119154
119217
|
}
|
|
119155
119218
|
}
|
|
119156
119219
|
function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) {
|
|
119157
|
-
var _a2
|
|
119220
|
+
var _a2;
|
|
119158
119221
|
if (structureIsReused === 0 /* Not */) {
|
|
119159
119222
|
return resolveTypeReferenceDirectiveNamesWorker(
|
|
119160
119223
|
typeDirectiveNames,
|
|
@@ -119174,7 +119237,7 @@ ${lanes.join("\n")}
|
|
|
119174
119237
|
if (canReuseResolutions) {
|
|
119175
119238
|
const typeDirectiveName = getTypeReferenceResolutionName(entry);
|
|
119176
119239
|
const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat);
|
|
119177
|
-
const oldResolution =
|
|
119240
|
+
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);
|
|
119178
119241
|
if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) {
|
|
119179
119242
|
if (isTraceEnabled(options, host)) {
|
|
119180
119243
|
trace(
|
|
@@ -119234,7 +119297,7 @@ ${lanes.join("\n")}
|
|
|
119234
119297
|
);
|
|
119235
119298
|
}
|
|
119236
119299
|
function tryReuseStructureFromOldProgram() {
|
|
119237
|
-
var _a2
|
|
119300
|
+
var _a2;
|
|
119238
119301
|
if (!oldProgram) {
|
|
119239
119302
|
return 0 /* Not */;
|
|
119240
119303
|
}
|
|
@@ -119354,20 +119417,29 @@ ${lanes.join("\n")}
|
|
|
119354
119417
|
const moduleNames = getModuleNames(newSourceFile);
|
|
119355
119418
|
const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
|
|
119356
119419
|
(resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions);
|
|
119357
|
-
const
|
|
119358
|
-
|
|
119420
|
+
const resolutionsChanged = hasChangesInResolutions(
|
|
119421
|
+
moduleNames,
|
|
119422
|
+
newSourceFile,
|
|
119423
|
+
resolutions,
|
|
119424
|
+
(name, mode) => oldProgram.getResolvedModule(newSourceFile, name, mode),
|
|
119425
|
+
moduleResolutionIsEqualTo,
|
|
119426
|
+
moduleResolutionNameAndModeGetter
|
|
119427
|
+
);
|
|
119359
119428
|
if (resolutionsChanged)
|
|
119360
119429
|
structureIsReused = 1 /* SafeModules */;
|
|
119361
119430
|
const typesReferenceDirectives = newSourceFile.typeReferenceDirectives;
|
|
119362
119431
|
const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile);
|
|
119363
119432
|
(resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, typeReferenceResolutions);
|
|
119364
|
-
const
|
|
119365
|
-
|
|
119366
|
-
|
|
119433
|
+
const typeReferenceResolutionsChanged = hasChangesInResolutions(
|
|
119434
|
+
typesReferenceDirectives,
|
|
119435
|
+
newSourceFile,
|
|
119436
|
+
typeReferenceResolutions,
|
|
119437
|
+
(name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(newSourceFile, name, mode),
|
|
119438
|
+
typeDirectiveIsEqualTo,
|
|
119439
|
+
typeReferenceResolutionNameAndModeGetter
|
|
119440
|
+
);
|
|
119441
|
+
if (typeReferenceResolutionsChanged)
|
|
119367
119442
|
structureIsReused = 1 /* SafeModules */;
|
|
119368
|
-
} else if (oldTypeResolutions) {
|
|
119369
|
-
(resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, oldTypeResolutions);
|
|
119370
|
-
}
|
|
119371
119443
|
}
|
|
119372
119444
|
if (structureIsReused !== 2 /* Completely */) {
|
|
119373
119445
|
return structureIsReused;
|
|
@@ -119996,7 +120068,7 @@ ${lanes.join("\n")}
|
|
|
119996
120068
|
/*importClause*/
|
|
119997
120069
|
void 0,
|
|
119998
120070
|
externalHelpersModuleReference,
|
|
119999
|
-
/*
|
|
120071
|
+
/*attributes*/
|
|
120000
120072
|
void 0
|
|
120001
120073
|
);
|
|
120002
120074
|
addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */);
|
|
@@ -120237,7 +120309,7 @@ ${lanes.join("\n")}
|
|
|
120237
120309
|
const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2);
|
|
120238
120310
|
const languageVersion = getEmitScriptTarget(options2);
|
|
120239
120311
|
const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2);
|
|
120240
|
-
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 };
|
|
120312
|
+
return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode };
|
|
120241
120313
|
}
|
|
120242
120314
|
function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
120243
120315
|
var _a2;
|
|
@@ -121514,7 +121586,7 @@ ${lanes.join("\n")}
|
|
|
121514
121586
|
symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName);
|
|
121515
121587
|
}
|
|
121516
121588
|
if (files && !symlinks.hasProcessedResolutions()) {
|
|
121517
|
-
symlinks.setSymlinksFromResolutions(
|
|
121589
|
+
symlinks.setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, automaticTypeDirectiveResolutions);
|
|
121518
121590
|
}
|
|
121519
121591
|
return symlinks;
|
|
121520
121592
|
}
|
|
@@ -121875,7 +121947,7 @@ ${lanes.join("\n")}
|
|
|
121875
121947
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
121876
121948
|
Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,
|
|
121877
121949
|
Diagnostics.Duplicate_label_0.code,
|
|
121878
|
-
Diagnostics.
|
|
121950
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
121879
121951
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
121880
121952
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
121881
121953
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|
|
@@ -122019,7 +122091,6 @@ ${lanes.join("\n")}
|
|
|
122019
122091
|
return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);
|
|
122020
122092
|
}
|
|
122021
122093
|
function getReferencedFiles(program, sourceFile, getCanonicalFileName) {
|
|
122022
|
-
var _a;
|
|
122023
122094
|
let referencedFiles;
|
|
122024
122095
|
if (sourceFile.imports && sourceFile.imports.length > 0) {
|
|
122025
122096
|
const checker = program.getTypeChecker();
|
|
@@ -122035,17 +122106,14 @@ ${lanes.join("\n")}
|
|
|
122035
122106
|
addReferencedFile(referencedPath);
|
|
122036
122107
|
}
|
|
122037
122108
|
}
|
|
122038
|
-
|
|
122039
|
-
|
|
122040
|
-
|
|
122041
|
-
|
|
122042
|
-
|
|
122043
|
-
|
|
122044
|
-
|
|
122045
|
-
|
|
122046
|
-
addReferencedFile(typeFilePath);
|
|
122047
|
-
});
|
|
122048
|
-
}
|
|
122109
|
+
program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => {
|
|
122110
|
+
if (!resolvedTypeReferenceDirective) {
|
|
122111
|
+
return;
|
|
122112
|
+
}
|
|
122113
|
+
const fileName = resolvedTypeReferenceDirective.resolvedFileName;
|
|
122114
|
+
const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName);
|
|
122115
|
+
addReferencedFile(typeFilePath);
|
|
122116
|
+
}, sourceFile);
|
|
122049
122117
|
if (sourceFile.moduleAugmentations.length) {
|
|
122050
122118
|
const checker = program.getTypeChecker();
|
|
122051
122119
|
for (const moduleName of sourceFile.moduleAugmentations) {
|
|
@@ -123805,6 +123873,47 @@ ${lanes.join("\n")}
|
|
|
123805
123873
|
function getRootPathSplitLength(rootPath) {
|
|
123806
123874
|
return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0);
|
|
123807
123875
|
}
|
|
123876
|
+
function createModuleResolutionLoaderUsingGlobalCache(containingFile, redirectedReference, options, resolutionHost, moduleResolutionCache) {
|
|
123877
|
+
return {
|
|
123878
|
+
nameAndMode: moduleResolutionNameAndModeGetter,
|
|
123879
|
+
resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache(
|
|
123880
|
+
resolutionHost,
|
|
123881
|
+
moduleResolutionCache,
|
|
123882
|
+
moduleName,
|
|
123883
|
+
containingFile,
|
|
123884
|
+
options,
|
|
123885
|
+
redirectedReference,
|
|
123886
|
+
resoluionMode
|
|
123887
|
+
)
|
|
123888
|
+
};
|
|
123889
|
+
}
|
|
123890
|
+
function resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) {
|
|
123891
|
+
var _a;
|
|
123892
|
+
const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost;
|
|
123893
|
+
const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode);
|
|
123894
|
+
if (!resolutionHost.getGlobalCache) {
|
|
123895
|
+
return primaryResult;
|
|
123896
|
+
}
|
|
123897
|
+
const globalCache = resolutionHost.getGlobalCache();
|
|
123898
|
+
if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
|
123899
|
+
const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache(
|
|
123900
|
+
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
|
123901
|
+
resolutionHost.projectName,
|
|
123902
|
+
compilerOptions,
|
|
123903
|
+
host,
|
|
123904
|
+
globalCache,
|
|
123905
|
+
moduleResolutionCache
|
|
123906
|
+
);
|
|
123907
|
+
if (resolvedModule) {
|
|
123908
|
+
primaryResult.resolvedModule = resolvedModule;
|
|
123909
|
+
primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations);
|
|
123910
|
+
primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations);
|
|
123911
|
+
primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics);
|
|
123912
|
+
return primaryResult;
|
|
123913
|
+
}
|
|
123914
|
+
}
|
|
123915
|
+
return primaryResult;
|
|
123916
|
+
}
|
|
123808
123917
|
function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) {
|
|
123809
123918
|
let filesWithChangedSetOfUnresolvedImports;
|
|
123810
123919
|
let filesWithInvalidatedResolutions;
|
|
@@ -123851,6 +123960,16 @@ ${lanes.join("\n")}
|
|
|
123851
123960
|
const rootPathComponents = getPathComponents(rootPath);
|
|
123852
123961
|
const typeRootsWatches = /* @__PURE__ */ new Map();
|
|
123853
123962
|
return {
|
|
123963
|
+
rootDirForResolution,
|
|
123964
|
+
resolvedModuleNames,
|
|
123965
|
+
resolvedTypeReferenceDirectives,
|
|
123966
|
+
resolvedLibraries,
|
|
123967
|
+
resolvedFileToResolution,
|
|
123968
|
+
resolutionsWithFailedLookups,
|
|
123969
|
+
resolutionsWithOnlyAffectingLocations,
|
|
123970
|
+
directoryWatchesOfFailedLookups,
|
|
123971
|
+
fileWatchesOfAffectingLocations,
|
|
123972
|
+
watchFailedLookupLocationsOfExternalModuleResolutions,
|
|
123854
123973
|
getModuleResolutionCache: () => moduleResolutionCache,
|
|
123855
123974
|
startRecordingFilesWithChangedResolutions,
|
|
123856
123975
|
finishRecordingFilesWithChangedResolutions,
|
|
@@ -123953,7 +124072,7 @@ ${lanes.join("\n")}
|
|
|
123953
124072
|
if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) {
|
|
123954
124073
|
stopWatchFailedLookupLocationOfResolution(
|
|
123955
124074
|
resolution,
|
|
123956
|
-
resolutionHost.toPath(getInferredLibraryNameResolveFrom(
|
|
124075
|
+
resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)),
|
|
123957
124076
|
getResolvedModule
|
|
123958
124077
|
);
|
|
123959
124078
|
resolvedLibraries.delete(libFileName);
|
|
@@ -123995,58 +124114,22 @@ ${lanes.join("\n")}
|
|
|
123995
124114
|
}
|
|
123996
124115
|
});
|
|
123997
124116
|
}
|
|
123998
|
-
directoryWatchesOfFailedLookups.forEach(
|
|
123999
|
-
|
|
124000
|
-
directoryWatchesOfFailedLookups.delete(path);
|
|
124001
|
-
watcher.watcher.close();
|
|
124002
|
-
}
|
|
124003
|
-
});
|
|
124004
|
-
fileWatchesOfAffectingLocations.forEach((watcher, path) => {
|
|
124005
|
-
if (watcher.files === 0 && watcher.resolutions === 0) {
|
|
124006
|
-
fileWatchesOfAffectingLocations.delete(path);
|
|
124007
|
-
watcher.watcher.close();
|
|
124008
|
-
}
|
|
124009
|
-
});
|
|
124117
|
+
directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup);
|
|
124118
|
+
fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation);
|
|
124010
124119
|
hasChangedAutomaticTypeDirectiveNames = false;
|
|
124011
124120
|
}
|
|
124012
|
-
function
|
|
124013
|
-
|
|
124014
|
-
|
|
124015
|
-
|
|
124016
|
-
if (!resolutionHost.getGlobalCache) {
|
|
124017
|
-
return primaryResult;
|
|
124121
|
+
function closeDirectoryWatchesOfFailedLookup(watcher, path) {
|
|
124122
|
+
if (watcher.refCount === 0) {
|
|
124123
|
+
directoryWatchesOfFailedLookups.delete(path);
|
|
124124
|
+
watcher.watcher.close();
|
|
124018
124125
|
}
|
|
124019
|
-
const globalCache = resolutionHost.getGlobalCache();
|
|
124020
|
-
if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
|
124021
|
-
const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache(
|
|
124022
|
-
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
|
124023
|
-
resolutionHost.projectName,
|
|
124024
|
-
compilerOptions,
|
|
124025
|
-
host,
|
|
124026
|
-
globalCache,
|
|
124027
|
-
moduleResolutionCache
|
|
124028
|
-
);
|
|
124029
|
-
if (resolvedModule) {
|
|
124030
|
-
primaryResult.resolvedModule = resolvedModule;
|
|
124031
|
-
primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations);
|
|
124032
|
-
primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations);
|
|
124033
|
-
primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics);
|
|
124034
|
-
return primaryResult;
|
|
124035
|
-
}
|
|
124036
|
-
}
|
|
124037
|
-
return primaryResult;
|
|
124038
124126
|
}
|
|
124039
|
-
function
|
|
124040
|
-
|
|
124041
|
-
|
|
124042
|
-
|
|
124043
|
-
|
|
124044
|
-
|
|
124045
|
-
options,
|
|
124046
|
-
redirectedReference,
|
|
124047
|
-
resoluionMode
|
|
124048
|
-
)
|
|
124049
|
-
};
|
|
124127
|
+
function closeFileWatcherOfAffectingLocation(watcher, path) {
|
|
124128
|
+
var _a;
|
|
124129
|
+
if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {
|
|
124130
|
+
fileWatchesOfAffectingLocations.delete(path);
|
|
124131
|
+
watcher.watcher.close();
|
|
124132
|
+
}
|
|
124050
124133
|
}
|
|
124051
124134
|
function resolveNamesWithLocalCache({
|
|
124052
124135
|
entries,
|
|
@@ -124083,9 +124166,11 @@ ${lanes.join("\n")}
|
|
|
124083
124166
|
resolutionHost.onDiscoveredSymlink();
|
|
124084
124167
|
}
|
|
124085
124168
|
resolutionsInFile.set(name, mode, resolution);
|
|
124086
|
-
|
|
124087
|
-
|
|
124088
|
-
|
|
124169
|
+
if (resolution !== existingResolution) {
|
|
124170
|
+
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
|
|
124171
|
+
if (existingResolution) {
|
|
124172
|
+
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
|
124173
|
+
}
|
|
124089
124174
|
}
|
|
124090
124175
|
if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
|
|
124091
124176
|
filesWithChangedSetOfUnresolvedImports.push(path);
|
|
@@ -124174,10 +124259,12 @@ ${lanes.join("\n")}
|
|
|
124174
124259
|
options,
|
|
124175
124260
|
reusedNames,
|
|
124176
124261
|
perFileCache: resolvedModuleNames,
|
|
124177
|
-
loader:
|
|
124262
|
+
loader: createModuleResolutionLoaderUsingGlobalCache(
|
|
124178
124263
|
containingFile,
|
|
124179
124264
|
redirectedReference,
|
|
124180
|
-
options
|
|
124265
|
+
options,
|
|
124266
|
+
resolutionHost,
|
|
124267
|
+
moduleResolutionCache
|
|
124181
124268
|
),
|
|
124182
124269
|
getResolutionWithResolvedFileName: getResolvedModule,
|
|
124183
124270
|
shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
|
|
@@ -124231,7 +124318,7 @@ ${lanes.join("\n")}
|
|
|
124231
124318
|
);
|
|
124232
124319
|
if (resolution && !resolution.isInvalidated)
|
|
124233
124320
|
return resolution;
|
|
124234
|
-
return
|
|
124321
|
+
return resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, resolutionHost.getCompilationSettings());
|
|
124235
124322
|
}
|
|
124236
124323
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
124237
124324
|
return endsWith(dirPath, "/node_modules/@types");
|
|
@@ -124331,52 +124418,63 @@ ${lanes.join("\n")}
|
|
|
124331
124418
|
return;
|
|
124332
124419
|
}
|
|
124333
124420
|
let locationToWatch = affectingLocation;
|
|
124421
|
+
let isSymlink = false;
|
|
124422
|
+
let symlinkWatcher;
|
|
124334
124423
|
if (resolutionHost.realpath) {
|
|
124335
124424
|
locationToWatch = resolutionHost.realpath(affectingLocation);
|
|
124336
124425
|
if (affectingLocation !== locationToWatch) {
|
|
124337
|
-
|
|
124338
|
-
|
|
124339
|
-
|
|
124340
|
-
|
|
124341
|
-
|
|
124342
|
-
|
|
124343
|
-
|
|
124344
|
-
|
|
124345
|
-
|
|
124346
|
-
|
|
124347
|
-
|
|
124348
|
-
|
|
124349
|
-
|
|
124350
|
-
|
|
124351
|
-
|
|
124352
|
-
|
|
124353
|
-
|
|
124354
|
-
|
|
124355
|
-
|
|
124356
|
-
|
|
124357
|
-
|
|
124358
|
-
|
|
124359
|
-
|
|
124360
|
-
|
|
124361
|
-
|
|
124362
|
-
|
|
124363
|
-
|
|
124364
|
-
|
|
124365
|
-
|
|
124366
|
-
|
|
124367
|
-
|
|
124368
|
-
|
|
124369
|
-
|
|
124370
|
-
|
|
124371
|
-
|
|
124372
|
-
|
|
124373
|
-
|
|
124374
|
-
|
|
124375
|
-
if (affectingLocation !== locationToWatch) {
|
|
124426
|
+
isSymlink = true;
|
|
124427
|
+
symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch);
|
|
124428
|
+
}
|
|
124429
|
+
}
|
|
124430
|
+
const resolutions = forResolution ? 1 : 0;
|
|
124431
|
+
const files = forResolution ? 0 : 1;
|
|
124432
|
+
if (!isSymlink || !symlinkWatcher) {
|
|
124433
|
+
const watcher = {
|
|
124434
|
+
watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
124435
|
+
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
124436
|
+
invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap());
|
|
124437
|
+
resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
|
|
124438
|
+
}) : noopFileWatcher,
|
|
124439
|
+
resolutions: isSymlink ? 0 : resolutions,
|
|
124440
|
+
files: isSymlink ? 0 : files,
|
|
124441
|
+
symlinks: void 0
|
|
124442
|
+
};
|
|
124443
|
+
fileWatchesOfAffectingLocations.set(locationToWatch, watcher);
|
|
124444
|
+
if (isSymlink)
|
|
124445
|
+
symlinkWatcher = watcher;
|
|
124446
|
+
}
|
|
124447
|
+
if (isSymlink) {
|
|
124448
|
+
Debug.assert(!!symlinkWatcher);
|
|
124449
|
+
const watcher = {
|
|
124450
|
+
watcher: {
|
|
124451
|
+
close: () => {
|
|
124452
|
+
var _a;
|
|
124453
|
+
const symlinkWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch);
|
|
124454
|
+
if (((_a = symlinkWatcher2 == null ? void 0 : symlinkWatcher2.symlinks) == null ? void 0 : _a.delete(affectingLocation)) && !symlinkWatcher2.symlinks.size && !symlinkWatcher2.resolutions && !symlinkWatcher2.files) {
|
|
124455
|
+
fileWatchesOfAffectingLocations.delete(locationToWatch);
|
|
124456
|
+
symlinkWatcher2.watcher.close();
|
|
124457
|
+
}
|
|
124458
|
+
}
|
|
124459
|
+
},
|
|
124460
|
+
resolutions,
|
|
124461
|
+
files,
|
|
124462
|
+
symlinks: void 0
|
|
124463
|
+
};
|
|
124376
124464
|
fileWatchesOfAffectingLocations.set(affectingLocation, watcher);
|
|
124377
|
-
|
|
124465
|
+
(symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);
|
|
124378
124466
|
}
|
|
124379
124467
|
}
|
|
124468
|
+
function invalidateAffectingFileWatcher(path, packageJsonMap) {
|
|
124469
|
+
var _a;
|
|
124470
|
+
const watcher = fileWatchesOfAffectingLocations.get(path);
|
|
124471
|
+
if (watcher == null ? void 0 : watcher.resolutions)
|
|
124472
|
+
(affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path);
|
|
124473
|
+
if (watcher == null ? void 0 : watcher.files)
|
|
124474
|
+
(affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path);
|
|
124475
|
+
(_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap));
|
|
124476
|
+
packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path));
|
|
124477
|
+
}
|
|
124380
124478
|
function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) {
|
|
124381
124479
|
const program = resolutionHost.getCurrentProgram();
|
|
124382
124480
|
if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) {
|
|
@@ -124398,7 +124496,7 @@ ${lanes.join("\n")}
|
|
|
124398
124496
|
directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive });
|
|
124399
124497
|
}
|
|
124400
124498
|
}
|
|
124401
|
-
function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) {
|
|
124499
|
+
function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove) {
|
|
124402
124500
|
const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);
|
|
124403
124501
|
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
|
124404
124502
|
failedLookupLocation,
|
|
@@ -124413,12 +124511,12 @@ ${lanes.join("\n")}
|
|
|
124413
124511
|
if (dirPath === rootPath) {
|
|
124414
124512
|
removeAtRoot = true;
|
|
124415
124513
|
} else {
|
|
124416
|
-
removeDirectoryWatcher(dirPath);
|
|
124514
|
+
removeDirectoryWatcher(dirPath, syncDirWatcherRemove);
|
|
124417
124515
|
}
|
|
124418
124516
|
}
|
|
124419
124517
|
return removeAtRoot;
|
|
124420
124518
|
}
|
|
124421
|
-
function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) {
|
|
124519
|
+
function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) {
|
|
124422
124520
|
Debug.checkDefined(resolution.files).delete(filePath);
|
|
124423
124521
|
resolution.refCount--;
|
|
124424
124522
|
if (resolution.refCount) {
|
|
@@ -124436,13 +124534,13 @@ ${lanes.join("\n")}
|
|
|
124436
124534
|
let removeAtRoot = false;
|
|
124437
124535
|
if (failedLookupLocations) {
|
|
124438
124536
|
for (const failedLookupLocation of failedLookupLocations) {
|
|
124439
|
-
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot);
|
|
124537
|
+
removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove);
|
|
124440
124538
|
}
|
|
124441
124539
|
}
|
|
124442
124540
|
if (node10Result)
|
|
124443
|
-
removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot);
|
|
124541
|
+
removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove);
|
|
124444
124542
|
if (removeAtRoot)
|
|
124445
|
-
removeDirectoryWatcher(rootPath);
|
|
124543
|
+
removeDirectoryWatcher(rootPath, syncDirWatcherRemove);
|
|
124446
124544
|
} else if (affectingLocations == null ? void 0 : affectingLocations.length) {
|
|
124447
124545
|
resolutionsWithOnlyAffectingLocations.delete(resolution);
|
|
124448
124546
|
}
|
|
@@ -124450,12 +124548,16 @@ ${lanes.join("\n")}
|
|
|
124450
124548
|
for (const affectingLocation of affectingLocations) {
|
|
124451
124549
|
const watcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
124452
124550
|
watcher.resolutions--;
|
|
124551
|
+
if (syncDirWatcherRemove)
|
|
124552
|
+
closeFileWatcherOfAffectingLocation(watcher, affectingLocation);
|
|
124453
124553
|
}
|
|
124454
124554
|
}
|
|
124455
124555
|
}
|
|
124456
|
-
function removeDirectoryWatcher(dirPath) {
|
|
124556
|
+
function removeDirectoryWatcher(dirPath, syncDirWatcherRemove) {
|
|
124457
124557
|
const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath);
|
|
124458
124558
|
dirWatcher.refCount--;
|
|
124559
|
+
if (syncDirWatcherRemove)
|
|
124560
|
+
closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath);
|
|
124459
124561
|
}
|
|
124460
124562
|
function createDirectoryWatcher(directory, dirPath, nonRecursive) {
|
|
124461
124563
|
return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => {
|
|
@@ -124466,10 +124568,17 @@ ${lanes.join("\n")}
|
|
|
124466
124568
|
scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath);
|
|
124467
124569
|
}, nonRecursive ? 0 /* None */ : 1 /* Recursive */);
|
|
124468
124570
|
}
|
|
124469
|
-
function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) {
|
|
124571
|
+
function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) {
|
|
124470
124572
|
const resolutions = cache.get(filePath);
|
|
124471
124573
|
if (resolutions) {
|
|
124472
|
-
resolutions.forEach(
|
|
124574
|
+
resolutions.forEach(
|
|
124575
|
+
(resolution) => stopWatchFailedLookupLocationOfResolution(
|
|
124576
|
+
resolution,
|
|
124577
|
+
filePath,
|
|
124578
|
+
getResolutionWithResolvedFileName,
|
|
124579
|
+
syncDirWatcherRemove
|
|
124580
|
+
)
|
|
124581
|
+
);
|
|
124473
124582
|
cache.delete(filePath);
|
|
124474
124583
|
}
|
|
124475
124584
|
}
|
|
@@ -124484,9 +124593,9 @@ ${lanes.join("\n")}
|
|
|
124484
124593
|
return;
|
|
124485
124594
|
resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f)));
|
|
124486
124595
|
}
|
|
124487
|
-
function removeResolutionsOfFile(filePath) {
|
|
124488
|
-
removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule);
|
|
124489
|
-
removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective);
|
|
124596
|
+
function removeResolutionsOfFile(filePath, syncDirWatcherRemove) {
|
|
124597
|
+
removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove);
|
|
124598
|
+
removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove);
|
|
124490
124599
|
}
|
|
124491
124600
|
function invalidateResolutions(resolutions, canInvalidate) {
|
|
124492
124601
|
if (!resolutions)
|
|
@@ -125112,8 +125221,7 @@ ${lanes.join("\n")}
|
|
|
125112
125221
|
(fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding),
|
|
125113
125222
|
getCompilerOptions,
|
|
125114
125223
|
/*setParentNodes*/
|
|
125115
|
-
void 0
|
|
125116
|
-
host.skipNonSemanticJSDocParsing
|
|
125224
|
+
void 0
|
|
125117
125225
|
),
|
|
125118
125226
|
getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
|
|
125119
125227
|
getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
|
|
@@ -125135,7 +125243,8 @@ ${lanes.join("\n")}
|
|
|
125135
125243
|
getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""),
|
|
125136
125244
|
createHash: maybeBind(host, host.createHash),
|
|
125137
125245
|
readDirectory: maybeBind(host, host.readDirectory),
|
|
125138
|
-
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit
|
|
125246
|
+
storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
|
|
125247
|
+
jsDocParsingMode: host.jsDocParsingMode
|
|
125139
125248
|
};
|
|
125140
125249
|
return compilerHost;
|
|
125141
125250
|
}
|
|
@@ -125340,12 +125449,11 @@ ${lanes.join("\n")}
|
|
|
125340
125449
|
return void 0;
|
|
125341
125450
|
return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);
|
|
125342
125451
|
}
|
|
125343
|
-
function createIncrementalCompilerHost(options, system = sys
|
|
125452
|
+
function createIncrementalCompilerHost(options, system = sys) {
|
|
125344
125453
|
const host = createCompilerHostWorker(
|
|
125345
125454
|
options,
|
|
125346
125455
|
/*setParentNodes*/
|
|
125347
125456
|
void 0,
|
|
125348
|
-
skipNonSemanticJSDocParsing,
|
|
125349
125457
|
system
|
|
125350
125458
|
);
|
|
125351
125459
|
host.createHash = maybeBind(system, system.createHash);
|
|
@@ -125487,7 +125595,7 @@ ${lanes.join("\n")}
|
|
|
125487
125595
|
watchConfigFileWildCardDirectories();
|
|
125488
125596
|
if (configFileName)
|
|
125489
125597
|
updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
|
|
125490
|
-
return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close };
|
|
125598
|
+
return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache };
|
|
125491
125599
|
function close() {
|
|
125492
125600
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
125493
125601
|
resolutionCache.clear();
|
|
@@ -125527,6 +125635,9 @@ ${lanes.join("\n")}
|
|
|
125527
125635
|
parsedConfigs = void 0;
|
|
125528
125636
|
}
|
|
125529
125637
|
}
|
|
125638
|
+
function getResolutionCache() {
|
|
125639
|
+
return resolutionCache;
|
|
125640
|
+
}
|
|
125530
125641
|
function getCurrentBuilderProgram() {
|
|
125531
125642
|
return builderProgram;
|
|
125532
125643
|
}
|
|
@@ -130367,7 +130478,7 @@ ${lanes.join("\n")}
|
|
|
130367
130478
|
void 0,
|
|
130368
130479
|
defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0,
|
|
130369
130480
|
typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,
|
|
130370
|
-
/*
|
|
130481
|
+
/*attributes*/
|
|
130371
130482
|
void 0
|
|
130372
130483
|
);
|
|
130373
130484
|
}
|
|
@@ -131005,7 +131116,7 @@ ${lanes.join("\n")}
|
|
|
131005
131116
|
return idx === -1 ? -1 : idx + 1;
|
|
131006
131117
|
}
|
|
131007
131118
|
function needsParentheses(expression) {
|
|
131008
|
-
return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || isAsExpression(expression) && isObjectLiteralExpression(expression.expression);
|
|
131119
|
+
return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || (isAsExpression(expression) || isSatisfiesExpression(expression)) && isObjectLiteralExpression(expression.expression);
|
|
131009
131120
|
}
|
|
131010
131121
|
function getContextualTypeFromParent(node, checker, contextFlags) {
|
|
131011
131122
|
const parent2 = walkUpParenthesizedExpressions(node.parent);
|
|
@@ -133447,10 +133558,10 @@ ${lanes.join("\n")}
|
|
|
133447
133558
|
function isDocumentRegistryEntry(entry) {
|
|
133448
133559
|
return !!entry.sourceFile;
|
|
133449
133560
|
}
|
|
133450
|
-
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) {
|
|
133451
|
-
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory);
|
|
133561
|
+
function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) {
|
|
133562
|
+
return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode);
|
|
133452
133563
|
}
|
|
133453
|
-
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) {
|
|
133564
|
+
function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) {
|
|
133454
133565
|
const buckets = /* @__PURE__ */ new Map();
|
|
133455
133566
|
const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2);
|
|
133456
133567
|
function reportStats() {
|
|
@@ -133534,9 +133645,11 @@ ${lanes.join("\n")}
|
|
|
133534
133645
|
const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
|
|
133535
133646
|
languageVersion: scriptTarget,
|
|
133536
133647
|
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),
|
|
133537
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings)
|
|
133648
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
|
|
133649
|
+
jsDocParsingMode
|
|
133538
133650
|
};
|
|
133539
133651
|
sourceFileOptions.languageVersion = scriptTarget;
|
|
133652
|
+
Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode);
|
|
133540
133653
|
const oldBucketCount = buckets.size;
|
|
133541
133654
|
const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat);
|
|
133542
133655
|
const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map());
|
|
@@ -133794,14 +133907,13 @@ ${lanes.join("\n")}
|
|
|
133794
133907
|
return ensurePathIsNonModuleName(combineNormal(pathA, pathB));
|
|
133795
133908
|
}
|
|
133796
133909
|
function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) {
|
|
133797
|
-
var _a, _b;
|
|
133798
133910
|
if (importedModuleSymbol) {
|
|
133799
133911
|
const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName;
|
|
133800
133912
|
const newFileName = oldToNew(oldFileName);
|
|
133801
133913
|
return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true };
|
|
133802
133914
|
} else {
|
|
133803
133915
|
const mode = getModeForUsageLocation(importingSourceFile, importLiteral);
|
|
133804
|
-
const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ?
|
|
133916
|
+
const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? program.getResolvedModule(importingSourceFile, importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode);
|
|
133805
133917
|
return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles());
|
|
133806
133918
|
}
|
|
133807
133919
|
}
|
|
@@ -134721,7 +134833,7 @@ ${lanes.join("\n")}
|
|
|
134721
134833
|
|
|
134722
134834
|
// src/services/suggestionDiagnostics.ts
|
|
134723
134835
|
function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) {
|
|
134724
|
-
var _a
|
|
134836
|
+
var _a;
|
|
134725
134837
|
program.getSemanticDiagnostics(sourceFile, cancellationToken);
|
|
134726
134838
|
const diags = [];
|
|
134727
134839
|
const checker = program.getTypeChecker();
|
|
@@ -134738,7 +134850,7 @@ ${lanes.join("\n")}
|
|
|
134738
134850
|
const name = importNameForConvertToDefaultImport(importNode);
|
|
134739
134851
|
if (!name)
|
|
134740
134852
|
continue;
|
|
134741
|
-
const module2 = (
|
|
134853
|
+
const module2 = (_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule;
|
|
134742
134854
|
const resolvedFile = module2 && program.getSourceFile(module2.resolvedFileName);
|
|
134743
134855
|
if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) {
|
|
134744
134856
|
diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import));
|
|
@@ -134991,7 +135103,8 @@ ${lanes.join("\n")}
|
|
|
134991
135103
|
compilerHost,
|
|
134992
135104
|
options
|
|
134993
135105
|
),
|
|
134994
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(options)
|
|
135106
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(options),
|
|
135107
|
+
jsDocParsingMode: 1 /* ParseNone */
|
|
134995
135108
|
}
|
|
134996
135109
|
);
|
|
134997
135110
|
if (transpileOptions.moduleName) {
|
|
@@ -136132,7 +136245,7 @@ ${lanes.join("\n")}
|
|
|
136132
136245
|
}
|
|
136133
136246
|
case 205 /* ImportType */:
|
|
136134
136247
|
const importTypeNode = parent2;
|
|
136135
|
-
changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.
|
|
136248
|
+
changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf));
|
|
136136
136249
|
break;
|
|
136137
136250
|
default:
|
|
136138
136251
|
Debug.failBadSyntaxKind(parent2);
|
|
@@ -136416,7 +136529,7 @@ ${lanes.join("\n")}
|
|
|
136416
136529
|
elements && elements.length ? factory.createNamedImports(elements) : void 0
|
|
136417
136530
|
),
|
|
136418
136531
|
old.moduleSpecifier,
|
|
136419
|
-
/*
|
|
136532
|
+
/*attributes*/
|
|
136420
136533
|
void 0
|
|
136421
136534
|
);
|
|
136422
136535
|
}
|
|
@@ -137154,10 +137267,10 @@ ${lanes.join("\n")}
|
|
|
137154
137267
|
const targetSourceFile = program.getSourceFile(targetFile);
|
|
137155
137268
|
for (const oldStatement of oldFile.statements) {
|
|
137156
137269
|
forEachImportInStatement(oldStatement, (i) => {
|
|
137157
|
-
var _a
|
|
137270
|
+
var _a;
|
|
137158
137271
|
const moduleSpecifier = moduleSpecifierFromImport(i);
|
|
137159
|
-
const resolved =
|
|
137160
|
-
const fileName = (
|
|
137272
|
+
const resolved = program.getResolvedModule(oldFile, moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier));
|
|
137273
|
+
const fileName = (_a = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _a.resolvedFileName;
|
|
137161
137274
|
if (fileName && targetSourceFile) {
|
|
137162
137275
|
const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), targetSourceFile, targetSourceFile.path, fileName, createModuleSpecifierResolutionHost(program, host));
|
|
137163
137276
|
append(copiedOldImports, filterImport(i, makeStringLiteral(newModuleSpecifier, quotePreference), (name) => importsToCopy.has(checker.getSymbolAtLocation(name))));
|
|
@@ -137302,7 +137415,7 @@ ${lanes.join("\n")}
|
|
|
137302
137415
|
factory.createNamespaceImport(newNamespaceId)
|
|
137303
137416
|
),
|
|
137304
137417
|
newModuleString,
|
|
137305
|
-
/*
|
|
137418
|
+
/*attributes*/
|
|
137306
137419
|
void 0
|
|
137307
137420
|
);
|
|
137308
137421
|
case 271 /* ImportEqualsDeclaration */:
|
|
@@ -137591,7 +137704,7 @@ ${lanes.join("\n")}
|
|
|
137591
137704
|
void 0,
|
|
137592
137705
|
factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings),
|
|
137593
137706
|
getSynthesizedDeepClone(moduleSpecifier),
|
|
137594
|
-
/*
|
|
137707
|
+
/*attributes*/
|
|
137595
137708
|
void 0
|
|
137596
137709
|
) : void 0;
|
|
137597
137710
|
}
|
|
@@ -137915,7 +138028,7 @@ ${lanes.join("\n")}
|
|
|
137915
138028
|
continue;
|
|
137916
138029
|
}
|
|
137917
138030
|
if (length(updatedElements) < length(elements)) {
|
|
137918
|
-
changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.
|
|
138031
|
+
changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes));
|
|
137919
138032
|
}
|
|
137920
138033
|
}
|
|
137921
138034
|
}
|
|
@@ -141906,7 +142019,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
141906
142019
|
const options = {
|
|
141907
142020
|
languageVersion: sourceFile.languageVersion,
|
|
141908
142021
|
impliedNodeFormat: sourceFile.impliedNodeFormat,
|
|
141909
|
-
setExternalModuleIndicator: sourceFile.setExternalModuleIndicator
|
|
142022
|
+
setExternalModuleIndicator: sourceFile.setExternalModuleIndicator,
|
|
142023
|
+
jsDocParsingMode: sourceFile.jsDocParsingMode
|
|
141910
142024
|
};
|
|
141911
142025
|
return createLanguageServiceSourceFile(
|
|
141912
142026
|
sourceFile.fileName,
|
|
@@ -142024,7 +142138,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
142024
142138
|
resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences),
|
|
142025
142139
|
resolveLibrary: maybeBind(host, host.resolveLibrary),
|
|
142026
142140
|
useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),
|
|
142027
|
-
getParsedCommandLine
|
|
142141
|
+
getParsedCommandLine,
|
|
142142
|
+
jsDocParsingMode: host.jsDocParsingMode
|
|
142028
142143
|
};
|
|
142029
142144
|
const originalGetSourceFile = compilerHost.getSourceFile;
|
|
142030
142145
|
const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache(
|
|
@@ -143753,7 +143868,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
143753
143868
|
this.host,
|
|
143754
143869
|
this.host.getCompilationSettings()
|
|
143755
143870
|
),
|
|
143756
|
-
setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings())
|
|
143871
|
+
setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()),
|
|
143872
|
+
// These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll.
|
|
143873
|
+
jsDocParsingMode: 0 /* ParseAll */
|
|
143757
143874
|
};
|
|
143758
143875
|
sourceFile = createLanguageServiceSourceFile(
|
|
143759
143876
|
fileName,
|
|
@@ -144019,6 +144136,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
144019
144136
|
return map(typeDirectiveNames, (name) => getProperty(typeDirectivesForFile, isString(name) ? name : toFileNameLowerCase(name.fileName)));
|
|
144020
144137
|
};
|
|
144021
144138
|
}
|
|
144139
|
+
if ("jsDocParsingMode" in this.shimHost) {
|
|
144140
|
+
this.jsDocParsingMode = this.shimHost.jsDocParsingMode;
|
|
144141
|
+
}
|
|
144022
144142
|
}
|
|
144023
144143
|
log(s) {
|
|
144024
144144
|
if (this.loggingEnabled) {
|
|
@@ -147777,9 +147897,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
147777
147897
|
|
|
147778
147898
|
// src/services/codefixes/convertToEsModule.ts
|
|
147779
147899
|
function fixImportOfModuleExports(importingFile, exportingFile, program, changes, quotePreference) {
|
|
147780
|
-
var _a
|
|
147900
|
+
var _a;
|
|
147781
147901
|
for (const moduleSpecifier of importingFile.imports) {
|
|
147782
|
-
const imported = (
|
|
147902
|
+
const imported = (_a = program.getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule;
|
|
147783
147903
|
if (!imported || imported.resolvedFileName !== exportingFile.fileName) {
|
|
147784
147904
|
continue;
|
|
147785
147905
|
}
|
|
@@ -148385,7 +148505,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148385
148505
|
false,
|
|
148386
148506
|
factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))),
|
|
148387
148507
|
exportDeclaration.moduleSpecifier,
|
|
148388
|
-
/*
|
|
148508
|
+
/*attributes*/
|
|
148389
148509
|
void 0
|
|
148390
148510
|
);
|
|
148391
148511
|
const typeExportDeclaration = factory.createExportDeclaration(
|
|
@@ -148395,7 +148515,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148395
148515
|
true,
|
|
148396
148516
|
factory.createNamedExports(typeExportSpecifiers),
|
|
148397
148517
|
exportDeclaration.moduleSpecifier,
|
|
148398
|
-
/*
|
|
148518
|
+
/*attributes*/
|
|
148399
148519
|
void 0
|
|
148400
148520
|
);
|
|
148401
148521
|
changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, {
|
|
@@ -148510,7 +148630,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148510
148630
|
true
|
|
148511
148631
|
),
|
|
148512
148632
|
getSynthesizedDeepClone(
|
|
148513
|
-
declaration.
|
|
148633
|
+
declaration.attributes,
|
|
148514
148634
|
/*includeTrivia*/
|
|
148515
148635
|
true
|
|
148516
148636
|
)
|
|
@@ -148538,7 +148658,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148538
148658
|
true
|
|
148539
148659
|
),
|
|
148540
148660
|
getSynthesizedDeepClone(
|
|
148541
|
-
declaration.
|
|
148661
|
+
declaration.attributes,
|
|
148542
148662
|
/*includeTrivia*/
|
|
148543
148663
|
true
|
|
148544
148664
|
)
|
|
@@ -148561,7 +148681,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
148561
148681
|
true,
|
|
148562
148682
|
importClause.name,
|
|
148563
148683
|
newNamedBindings
|
|
148564
|
-
), declaration.moduleSpecifier, declaration.
|
|
148684
|
+
), declaration.moduleSpecifier, declaration.attributes);
|
|
148565
148685
|
changes.replaceNode(sourceFile, declaration, importDeclaration);
|
|
148566
148686
|
}
|
|
148567
148687
|
}
|
|
@@ -149915,11 +150035,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
149915
150035
|
Debug.failBadSyntaxKind(aliasDeclaration);
|
|
149916
150036
|
}
|
|
149917
150037
|
function promoteImportClause(importClause) {
|
|
149918
|
-
var _a
|
|
150038
|
+
var _a;
|
|
149919
150039
|
changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile));
|
|
149920
150040
|
if (!compilerOptions.allowImportingTsExtensions) {
|
|
149921
150041
|
const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent);
|
|
149922
|
-
const resolvedModule = moduleSpecifier && ((
|
|
150042
|
+
const resolvedModule = moduleSpecifier && ((_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule);
|
|
149923
150043
|
if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) {
|
|
149924
150044
|
const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions));
|
|
149925
150045
|
changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension));
|
|
@@ -150084,7 +150204,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150084
150204
|
factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name))
|
|
150085
150205
|
),
|
|
150086
150206
|
quotedModuleSpecifier,
|
|
150087
|
-
/*
|
|
150207
|
+
/*attributes*/
|
|
150088
150208
|
void 0
|
|
150089
150209
|
);
|
|
150090
150210
|
statements = combine(statements, declaration);
|
|
@@ -150626,7 +150746,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150626
150746
|
|
|
150627
150747
|
// src/services/codefixes/fixImportNonExportedMember.ts
|
|
150628
150748
|
function getInfo7(sourceFile, pos, program) {
|
|
150629
|
-
var _a, _b
|
|
150749
|
+
var _a, _b;
|
|
150630
150750
|
const token = getTokenAtPosition(sourceFile, pos);
|
|
150631
150751
|
if (isIdentifier(token)) {
|
|
150632
150752
|
const importDeclaration = findAncestor(token, isImportDeclaration);
|
|
@@ -150635,18 +150755,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150635
150755
|
const moduleSpecifier = isStringLiteral(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier.text : void 0;
|
|
150636
150756
|
if (moduleSpecifier === void 0)
|
|
150637
150757
|
return void 0;
|
|
150638
|
-
const resolvedModule = (
|
|
150758
|
+
const resolvedModule = (_a = program.getResolvedModule(
|
|
150759
|
+
sourceFile,
|
|
150639
150760
|
moduleSpecifier,
|
|
150640
150761
|
/*mode*/
|
|
150641
150762
|
void 0
|
|
150642
|
-
)) == null ? void 0 :
|
|
150763
|
+
)) == null ? void 0 : _a.resolvedModule;
|
|
150643
150764
|
if (resolvedModule === void 0)
|
|
150644
150765
|
return void 0;
|
|
150645
150766
|
const moduleSourceFile = program.getSourceFile(resolvedModule.resolvedFileName);
|
|
150646
150767
|
if (moduleSourceFile === void 0 || isSourceFileFromLibrary(program, moduleSourceFile))
|
|
150647
150768
|
return void 0;
|
|
150648
150769
|
const moduleSymbol = moduleSourceFile.symbol;
|
|
150649
|
-
const locals = (
|
|
150770
|
+
const locals = (_b = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _b.locals;
|
|
150650
150771
|
if (locals === void 0)
|
|
150651
150772
|
return void 0;
|
|
150652
150773
|
const localSymbol = locals.get(token.escapedText);
|
|
@@ -150701,7 +150822,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150701
150822
|
)
|
|
150702
150823
|
),
|
|
150703
150824
|
node.moduleSpecifier,
|
|
150704
|
-
node.
|
|
150825
|
+
node.attributes
|
|
150705
150826
|
)
|
|
150706
150827
|
);
|
|
150707
150828
|
}
|
|
@@ -150718,7 +150839,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150718
150839
|
)),
|
|
150719
150840
|
/*moduleSpecifier*/
|
|
150720
150841
|
void 0,
|
|
150721
|
-
/*
|
|
150842
|
+
/*attributes*/
|
|
150722
150843
|
void 0
|
|
150723
150844
|
));
|
|
150724
150845
|
}
|
|
@@ -150936,10 +151057,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150936
151057
|
return flags;
|
|
150937
151058
|
}
|
|
150938
151059
|
function getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration) {
|
|
150939
|
-
var _a
|
|
151060
|
+
var _a;
|
|
150940
151061
|
if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier))
|
|
150941
151062
|
return void 0;
|
|
150942
|
-
const resolvedModule = (
|
|
151063
|
+
const resolvedModule = (_a = context.program.getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier))) == null ? void 0 : _a.resolvedModule;
|
|
150943
151064
|
if (!resolvedModule)
|
|
150944
151065
|
return void 0;
|
|
150945
151066
|
return context.program.getSourceFile(resolvedModule.resolvedFileName);
|
|
@@ -155689,7 +155810,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155689
155810
|
namedImports
|
|
155690
155811
|
),
|
|
155691
155812
|
required,
|
|
155692
|
-
/*
|
|
155813
|
+
/*attributes*/
|
|
155693
155814
|
void 0
|
|
155694
155815
|
)
|
|
155695
155816
|
);
|
|
@@ -155858,7 +155979,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155858
155979
|
const newTypeNode = factory.updateImportTypeNode(
|
|
155859
155980
|
importType,
|
|
155860
155981
|
importType.argument,
|
|
155861
|
-
importType.
|
|
155982
|
+
importType.attributes,
|
|
155862
155983
|
importType.qualifier,
|
|
155863
155984
|
importType.typeArguments,
|
|
155864
155985
|
/*isTypeOf*/
|
|
@@ -156126,7 +156247,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156126
156247
|
void 0
|
|
156127
156248
|
),
|
|
156128
156249
|
importDeclaration.moduleSpecifier,
|
|
156129
|
-
importDeclaration.
|
|
156250
|
+
importDeclaration.attributes
|
|
156130
156251
|
)
|
|
156131
156252
|
);
|
|
156132
156253
|
changes.insertNodeAfter(
|
|
@@ -156143,7 +156264,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156143
156264
|
importClause.namedBindings
|
|
156144
156265
|
),
|
|
156145
156266
|
importDeclaration.moduleSpecifier,
|
|
156146
|
-
importDeclaration.
|
|
156267
|
+
importDeclaration.attributes
|
|
156147
156268
|
)
|
|
156148
156269
|
);
|
|
156149
156270
|
}
|
|
@@ -160411,8 +160532,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
160411
160532
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries };
|
|
160412
160533
|
}
|
|
160413
160534
|
case 2 /* Types */: {
|
|
160535
|
+
const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), "'") ? 39 /* singleQuote */ : 34 /* doubleQuote */;
|
|
160414
160536
|
const entries = completion.types.map((type) => ({
|
|
160415
|
-
name: type.value,
|
|
160537
|
+
name: escapeString(type.value, quoteChar),
|
|
160416
160538
|
kindModifiers: "" /* none */,
|
|
160417
160539
|
kind: "string" /* string */,
|
|
160418
160540
|
sortText: SortText.LocationPriority,
|
|
@@ -162251,7 +162373,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162251
162373
|
})(FindReferencesUse || {});
|
|
162252
162374
|
((Core2) => {
|
|
162253
162375
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
162254
|
-
var _a, _b
|
|
162376
|
+
var _a, _b;
|
|
162255
162377
|
node = getAdjustedNode2(node, options);
|
|
162256
162378
|
if (isSourceFile(node)) {
|
|
162257
162379
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
@@ -162290,7 +162412,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162290
162412
|
if (!options.implementations && isStringLiteralLike(node)) {
|
|
162291
162413
|
if (isModuleSpecifierLike(node)) {
|
|
162292
162414
|
const fileIncludeReasons = program.getFileIncludeReasons();
|
|
162293
|
-
const referencedFileName = (
|
|
162415
|
+
const referencedFileName = (_b = (_a = program.getResolvedModule(node.getSourceFile(), node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.resolvedFileName;
|
|
162294
162416
|
const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0;
|
|
162295
162417
|
if (referencedFile) {
|
|
162296
162418
|
return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }];
|
|
@@ -163720,7 +163842,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163720
163842
|
|
|
163721
163843
|
// src/services/goToDefinition.ts
|
|
163722
163844
|
function getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) {
|
|
163723
|
-
var _a
|
|
163845
|
+
var _a;
|
|
163724
163846
|
const resolvedRef = getReferenceAtPosition(sourceFile, position, program);
|
|
163725
163847
|
const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray;
|
|
163726
163848
|
if (resolvedRef == null ? void 0 : resolvedRef.file) {
|
|
@@ -163793,7 +163915,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163793
163915
|
}
|
|
163794
163916
|
}
|
|
163795
163917
|
if (!symbol && isModuleSpecifierLike(fallbackNode)) {
|
|
163796
|
-
const ref = (
|
|
163918
|
+
const ref = (_a = program.getResolvedModule(sourceFile, fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _a.resolvedModule;
|
|
163797
163919
|
if (ref) {
|
|
163798
163920
|
return [{
|
|
163799
163921
|
name: fallbackNode.text,
|
|
@@ -163888,7 +164010,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163888
164010
|
return getDefinitionFromSymbol(typeChecker, symbol, node);
|
|
163889
164011
|
}
|
|
163890
164012
|
function getReferenceAtPosition(sourceFile, position, program) {
|
|
163891
|
-
var _a, _b
|
|
164013
|
+
var _a, _b;
|
|
163892
164014
|
const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position);
|
|
163893
164015
|
if (referencePath) {
|
|
163894
164016
|
const file = program.getSourceFileFromReference(sourceFile, referencePath);
|
|
@@ -163905,11 +164027,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163905
164027
|
const file = program.getLibFileFromReference(libReferenceDirective);
|
|
163906
164028
|
return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false };
|
|
163907
164029
|
}
|
|
163908
|
-
|
|
163909
|
-
if (resolvedModules == null ? void 0 : resolvedModules.size()) {
|
|
164030
|
+
if (sourceFile.imports.length || sourceFile.moduleAugmentations.length) {
|
|
163910
164031
|
const node = getTouchingToken(sourceFile, position);
|
|
163911
|
-
|
|
163912
|
-
|
|
164032
|
+
let resolution;
|
|
164033
|
+
if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && (resolution = program.getResolvedModule(sourceFile, node.text, getModeForUsageLocation(sourceFile, node)))) {
|
|
164034
|
+
const verifiedFileName = (_b = resolution.resolvedModule) == null ? void 0 : _b.resolvedFileName;
|
|
163913
164035
|
const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text);
|
|
163914
164036
|
return {
|
|
163915
164037
|
file: program.getSourceFile(fileName),
|
|
@@ -165471,7 +165593,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165471
165593
|
/*importClause*/
|
|
165472
165594
|
void 0,
|
|
165473
165595
|
moduleSpecifier,
|
|
165474
|
-
/*
|
|
165596
|
+
/*attributes*/
|
|
165475
165597
|
void 0
|
|
165476
165598
|
));
|
|
165477
165599
|
} else {
|
|
@@ -165637,7 +165759,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165637
165759
|
exportDecl.isTypeOnly,
|
|
165638
165760
|
exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)),
|
|
165639
165761
|
exportDecl.moduleSpecifier,
|
|
165640
|
-
exportDecl.
|
|
165762
|
+
exportDecl.attributes
|
|
165641
165763
|
)
|
|
165642
165764
|
);
|
|
165643
165765
|
}
|
|
@@ -165669,7 +165791,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165669
165791
|
factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings),
|
|
165670
165792
|
// TODO: GH#18217
|
|
165671
165793
|
importDeclaration.moduleSpecifier,
|
|
165672
|
-
importDeclaration.
|
|
165794
|
+
importDeclaration.attributes
|
|
165673
165795
|
);
|
|
165674
165796
|
}
|
|
165675
165797
|
function sortSpecifiers(specifiers, comparer) {
|
|
@@ -166187,10 +166309,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
166187
166309
|
return spanForParenthesizedExpression(n);
|
|
166188
166310
|
case 275 /* NamedImports */:
|
|
166189
166311
|
case 279 /* NamedExports */:
|
|
166312
|
+
case 300 /* ImportAttributes */:
|
|
166190
166313
|
case 300 /* AssertClause */:
|
|
166191
|
-
return
|
|
166314
|
+
return spanForImportExportElements(n);
|
|
166192
166315
|
}
|
|
166193
|
-
function
|
|
166316
|
+
function spanForImportExportElements(node) {
|
|
166194
166317
|
if (!node.elements.length) {
|
|
166195
166318
|
return void 0;
|
|
166196
166319
|
}
|
|
@@ -169115,7 +169238,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
169115
169238
|
const sourceFile = createSourceFile(
|
|
169116
169239
|
"any file name",
|
|
169117
169240
|
nonFormattedText,
|
|
169118
|
-
99 /* ESNext */,
|
|
169241
|
+
{ languageVersion: 99 /* ESNext */, jsDocParsingMode: 1 /* ParseNone */ },
|
|
169119
169242
|
/*setParentNodes*/
|
|
169120
169243
|
true,
|
|
169121
169244
|
scriptKind
|
|
@@ -173841,16 +173964,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
173841
173964
|
}
|
|
173842
173965
|
function extractUnresolvedImportsFromSourceFile(program, file, ambientModules, cachedUnresolvedImportsPerFile) {
|
|
173843
173966
|
return getOrUpdate(cachedUnresolvedImportsPerFile, file.path, () => {
|
|
173844
|
-
var _a;
|
|
173845
|
-
const resolvedModules = (_a = program.resolvedModules) == null ? void 0 : _a.get(file.path);
|
|
173846
|
-
if (!resolvedModules)
|
|
173847
|
-
return emptyArray2;
|
|
173848
173967
|
let unresolvedImports;
|
|
173849
|
-
|
|
173968
|
+
program.forEachResolvedModule(({ resolvedModule }, name) => {
|
|
173850
173969
|
if ((!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && !ambientModules.some((m) => m === name)) {
|
|
173851
173970
|
unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName);
|
|
173852
173971
|
}
|
|
173853
|
-
});
|
|
173972
|
+
}, file);
|
|
173854
173973
|
return unresolvedImports || emptyArray2;
|
|
173855
173974
|
});
|
|
173856
173975
|
}
|
|
@@ -173934,6 +174053,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
173934
174053
|
this.directoryStructureHost = directoryStructureHost;
|
|
173935
174054
|
this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory);
|
|
173936
174055
|
this.getCanonicalFileName = this.projectService.toCanonicalFileName;
|
|
174056
|
+
this.jsDocParsingMode = this.projectService.jsDocParsingMode;
|
|
173937
174057
|
this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds);
|
|
173938
174058
|
if (!this.compilerOptions) {
|
|
173939
174059
|
this.compilerOptions = getDefaultCompilerOptions2();
|
|
@@ -174058,8 +174178,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174058
174178
|
}
|
|
174059
174179
|
if (this.program && !this.symlinks.hasProcessedResolutions()) {
|
|
174060
174180
|
this.symlinks.setSymlinksFromResolutions(
|
|
174061
|
-
this.program.
|
|
174062
|
-
this.program.
|
|
174181
|
+
this.program.forEachResolvedModule,
|
|
174182
|
+
this.program.forEachResolvedTypeReferenceDirective,
|
|
174063
174183
|
this.program.getAutomaticTypeDirectiveResolutions()
|
|
174064
174184
|
);
|
|
174065
174185
|
}
|
|
@@ -174842,12 +174962,23 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174842
174962
|
for (const f of oldProgram.getSourceFiles()) {
|
|
174843
174963
|
const newFile = this.program.getSourceFileByPath(f.resolvedPath);
|
|
174844
174964
|
if (!newFile || f.resolvedPath === f.path && newFile.resolvedPath !== f.path) {
|
|
174845
|
-
this.detachScriptInfoFromProject(
|
|
174965
|
+
this.detachScriptInfoFromProject(
|
|
174966
|
+
f.fileName,
|
|
174967
|
+
!!this.program.getSourceFileByPath(f.path),
|
|
174968
|
+
/*syncDirWatcherRemove*/
|
|
174969
|
+
true
|
|
174970
|
+
);
|
|
174846
174971
|
}
|
|
174847
174972
|
}
|
|
174848
174973
|
oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => {
|
|
174849
174974
|
if (!this.program.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) {
|
|
174850
|
-
this.detachScriptInfoFromProject(
|
|
174975
|
+
this.detachScriptInfoFromProject(
|
|
174976
|
+
resolvedProjectReference.sourceFile.fileName,
|
|
174977
|
+
/*noRemoveResolution*/
|
|
174978
|
+
void 0,
|
|
174979
|
+
/*syncDirWatcherRemove*/
|
|
174980
|
+
true
|
|
174981
|
+
);
|
|
174851
174982
|
}
|
|
174852
174983
|
});
|
|
174853
174984
|
}
|
|
@@ -174887,6 +175018,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174887
175018
|
this.resolutionCache.updateTypeRootsWatch();
|
|
174888
175019
|
}
|
|
174889
175020
|
}
|
|
175021
|
+
this.projectService.verifyProgram(this);
|
|
174890
175022
|
if (this.exportMapCache && !this.exportMapCache.isEmpty()) {
|
|
174891
175023
|
this.exportMapCache.releaseSymbols();
|
|
174892
175024
|
if (this.hasAddedorRemovedFiles || oldProgram && !this.program.structureIsReused) {
|
|
@@ -174959,12 +175091,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
174959
175091
|
sendPerformanceEvent(kind, durationMs) {
|
|
174960
175092
|
this.projectService.sendPerformanceEvent(kind, durationMs);
|
|
174961
175093
|
}
|
|
174962
|
-
detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution) {
|
|
175094
|
+
detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution, syncDirWatcherRemove) {
|
|
174963
175095
|
const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName);
|
|
174964
175096
|
if (scriptInfoToDetach) {
|
|
174965
175097
|
scriptInfoToDetach.detachFromProject(this);
|
|
174966
175098
|
if (!noRemoveResolution) {
|
|
174967
|
-
this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path);
|
|
175099
|
+
this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove);
|
|
174968
175100
|
}
|
|
174969
175101
|
}
|
|
174970
175102
|
}
|
|
@@ -175698,11 +175830,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
175698
175830
|
);
|
|
175699
175831
|
if (entrypoints) {
|
|
175700
175832
|
const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory);
|
|
175701
|
-
const
|
|
175833
|
+
const realPath2 = real ? hostProject.toPath(real) : void 0;
|
|
175834
|
+
const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory);
|
|
175702
175835
|
if (isSymlink) {
|
|
175703
175836
|
symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, {
|
|
175704
175837
|
real,
|
|
175705
|
-
realPath:
|
|
175838
|
+
realPath: realPath2
|
|
175706
175839
|
});
|
|
175707
175840
|
}
|
|
175708
175841
|
return mapDefined(entrypoints, (entrypoint) => {
|
|
@@ -176482,6 +176615,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176482
176615
|
this.extendedConfigCache = /* @__PURE__ */ new Map();
|
|
176483
176616
|
/** @internal */
|
|
176484
176617
|
this.verifyDocumentRegistry = noop;
|
|
176618
|
+
/** @internal */
|
|
176619
|
+
this.verifyProgram = noop;
|
|
176485
176620
|
var _a;
|
|
176486
176621
|
this.host = opts.host;
|
|
176487
176622
|
this.logger = opts.logger;
|
|
@@ -176497,6 +176632,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176497
176632
|
this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
|
|
176498
176633
|
this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation;
|
|
176499
176634
|
this.session = opts.session;
|
|
176635
|
+
this.jsDocParsingMode = opts.jsDocParsingMode;
|
|
176500
176636
|
if (opts.serverMode !== void 0) {
|
|
176501
176637
|
this.serverMode = opts.serverMode;
|
|
176502
176638
|
} else {
|
|
@@ -176522,7 +176658,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
176522
176658
|
hostInfo: "Unknown host",
|
|
176523
176659
|
extraFileExtensions: []
|
|
176524
176660
|
};
|
|
176525
|
-
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this);
|
|
176661
|
+
this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this);
|
|
176526
176662
|
const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */;
|
|
176527
176663
|
const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop;
|
|
176528
176664
|
this.packageJsonCache = createPackageJsonCache(this);
|
|
@@ -183814,6 +183950,7 @@ ${e.message}`;
|
|
|
183814
183950
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
183815
183951
|
InternalSymbolName: () => InternalSymbolName,
|
|
183816
183952
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
183953
|
+
JSDocParsingMode: () => JSDocParsingMode,
|
|
183817
183954
|
JsDoc: () => ts_JsDoc_exports,
|
|
183818
183955
|
JsTyping: () => ts_JsTyping_exports,
|
|
183819
183956
|
JsxEmit: () => JsxEmit,
|
|
@@ -184141,6 +184278,7 @@ ${e.message}`;
|
|
|
184141
184278
|
createModuleNotFoundChain: () => createModuleNotFoundChain,
|
|
184142
184279
|
createModuleResolutionCache: () => createModuleResolutionCache,
|
|
184143
184280
|
createModuleResolutionLoader: () => createModuleResolutionLoader,
|
|
184281
|
+
createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache,
|
|
184144
184282
|
createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,
|
|
184145
184283
|
createMultiMap: () => createMultiMap,
|
|
184146
184284
|
createNodeConverters: () => createNodeConverters,
|
|
@@ -184569,6 +184707,7 @@ ${e.message}`;
|
|
|
184569
184707
|
getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,
|
|
184570
184708
|
getLeftmostAccessExpression: () => getLeftmostAccessExpression,
|
|
184571
184709
|
getLeftmostExpression: () => getLeftmostExpression,
|
|
184710
|
+
getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,
|
|
184572
184711
|
getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,
|
|
184573
184712
|
getLineInfo: () => getLineInfo,
|
|
184574
184713
|
getLineOfLocalPosition: () => getLineOfLocalPosition,
|
|
@@ -184700,7 +184839,7 @@ ${e.message}`;
|
|
|
184700
184839
|
getRenameLocation: () => getRenameLocation,
|
|
184701
184840
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
184702
184841
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
184703
|
-
|
|
184842
|
+
getResolutionModeOverride: () => getResolutionModeOverride,
|
|
184704
184843
|
getResolveJsonModule: () => getResolveJsonModule,
|
|
184705
184844
|
getResolvePackageJsonExports: () => getResolvePackageJsonExports,
|
|
184706
184845
|
getResolvePackageJsonImports: () => getResolvePackageJsonImports,
|
|
@@ -184832,6 +184971,7 @@ ${e.message}`;
|
|
|
184832
184971
|
hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
|
|
184833
184972
|
hasQuestionToken: () => hasQuestionToken,
|
|
184834
184973
|
hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
|
|
184974
|
+
hasResolutionModeOverride: () => hasResolutionModeOverride,
|
|
184835
184975
|
hasRestParameter: () => hasRestParameter,
|
|
184836
184976
|
hasScopeMarker: () => hasScopeMarker,
|
|
184837
184977
|
hasStaticModifier: () => hasStaticModifier,
|
|
@@ -184905,7 +185045,6 @@ ${e.message}`;
|
|
|
184905
185045
|
isAssertClause: () => isAssertClause,
|
|
184906
185046
|
isAssertEntry: () => isAssertEntry,
|
|
184907
185047
|
isAssertionExpression: () => isAssertionExpression,
|
|
184908
|
-
isAssertionKey: () => isAssertionKey,
|
|
184909
185048
|
isAssertsKeyword: () => isAssertsKeyword,
|
|
184910
185049
|
isAssignmentDeclaration: () => isAssignmentDeclaration,
|
|
184911
185050
|
isAssignmentExpression: () => isAssignmentExpression,
|
|
@@ -185113,6 +185252,9 @@ ${e.message}`;
|
|
|
185113
185252
|
isIfStatement: () => isIfStatement,
|
|
185114
185253
|
isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
|
|
185115
185254
|
isImplicitGlob: () => isImplicitGlob,
|
|
185255
|
+
isImportAttribute: () => isImportAttribute,
|
|
185256
|
+
isImportAttributeName: () => isImportAttributeName,
|
|
185257
|
+
isImportAttributes: () => isImportAttributes,
|
|
185116
185258
|
isImportCall: () => isImportCall,
|
|
185117
185259
|
isImportClause: () => isImportClause,
|
|
185118
185260
|
isImportDeclaration: () => isImportDeclaration,
|
|
@@ -185123,6 +185265,7 @@ ${e.message}`;
|
|
|
185123
185265
|
isImportOrExportSpecifierName: () => isImportOrExportSpecifierName,
|
|
185124
185266
|
isImportSpecifier: () => isImportSpecifier,
|
|
185125
185267
|
isImportTypeAssertionContainer: () => isImportTypeAssertionContainer,
|
|
185268
|
+
isImportTypeAttributes: () => isImportTypeAttributes,
|
|
185126
185269
|
isImportTypeNode: () => isImportTypeNode,
|
|
185127
185270
|
isImportableFile: () => isImportableFile,
|
|
185128
185271
|
isInComment: () => isInComment,
|
|
@@ -185304,7 +185447,6 @@ ${e.message}`;
|
|
|
185304
185447
|
isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
|
|
185305
185448
|
isNewExpression: () => isNewExpression,
|
|
185306
185449
|
isNewExpressionTarget: () => isNewExpressionTarget,
|
|
185307
|
-
isNightly: () => isNightly,
|
|
185308
185450
|
isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
|
|
185309
185451
|
isNode: () => isNode,
|
|
185310
185452
|
isNodeArray: () => isNodeArray,
|
|
@@ -186213,6 +186355,7 @@ ${e.message}`;
|
|
|
186213
186355
|
InternalEmitFlags: () => InternalEmitFlags,
|
|
186214
186356
|
InternalSymbolName: () => InternalSymbolName,
|
|
186215
186357
|
InvalidatedProjectKind: () => InvalidatedProjectKind,
|
|
186358
|
+
JSDocParsingMode: () => JSDocParsingMode,
|
|
186216
186359
|
JsDoc: () => ts_JsDoc_exports,
|
|
186217
186360
|
JsTyping: () => ts_JsTyping_exports,
|
|
186218
186361
|
JsxEmit: () => JsxEmit,
|
|
@@ -186540,6 +186683,7 @@ ${e.message}`;
|
|
|
186540
186683
|
createModuleNotFoundChain: () => createModuleNotFoundChain,
|
|
186541
186684
|
createModuleResolutionCache: () => createModuleResolutionCache,
|
|
186542
186685
|
createModuleResolutionLoader: () => createModuleResolutionLoader,
|
|
186686
|
+
createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache,
|
|
186543
186687
|
createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,
|
|
186544
186688
|
createMultiMap: () => createMultiMap,
|
|
186545
186689
|
createNodeConverters: () => createNodeConverters,
|
|
@@ -186968,6 +187112,7 @@ ${e.message}`;
|
|
|
186968
187112
|
getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,
|
|
186969
187113
|
getLeftmostAccessExpression: () => getLeftmostAccessExpression,
|
|
186970
187114
|
getLeftmostExpression: () => getLeftmostExpression,
|
|
187115
|
+
getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,
|
|
186971
187116
|
getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,
|
|
186972
187117
|
getLineInfo: () => getLineInfo,
|
|
186973
187118
|
getLineOfLocalPosition: () => getLineOfLocalPosition,
|
|
@@ -187099,7 +187244,7 @@ ${e.message}`;
|
|
|
187099
187244
|
getRenameLocation: () => getRenameLocation,
|
|
187100
187245
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
187101
187246
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
187102
|
-
|
|
187247
|
+
getResolutionModeOverride: () => getResolutionModeOverride,
|
|
187103
187248
|
getResolveJsonModule: () => getResolveJsonModule,
|
|
187104
187249
|
getResolvePackageJsonExports: () => getResolvePackageJsonExports,
|
|
187105
187250
|
getResolvePackageJsonImports: () => getResolvePackageJsonImports,
|
|
@@ -187231,6 +187376,7 @@ ${e.message}`;
|
|
|
187231
187376
|
hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
|
|
187232
187377
|
hasQuestionToken: () => hasQuestionToken,
|
|
187233
187378
|
hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
|
|
187379
|
+
hasResolutionModeOverride: () => hasResolutionModeOverride,
|
|
187234
187380
|
hasRestParameter: () => hasRestParameter,
|
|
187235
187381
|
hasScopeMarker: () => hasScopeMarker,
|
|
187236
187382
|
hasStaticModifier: () => hasStaticModifier,
|
|
@@ -187304,7 +187450,6 @@ ${e.message}`;
|
|
|
187304
187450
|
isAssertClause: () => isAssertClause,
|
|
187305
187451
|
isAssertEntry: () => isAssertEntry,
|
|
187306
187452
|
isAssertionExpression: () => isAssertionExpression,
|
|
187307
|
-
isAssertionKey: () => isAssertionKey,
|
|
187308
187453
|
isAssertsKeyword: () => isAssertsKeyword,
|
|
187309
187454
|
isAssignmentDeclaration: () => isAssignmentDeclaration,
|
|
187310
187455
|
isAssignmentExpression: () => isAssignmentExpression,
|
|
@@ -187512,6 +187657,9 @@ ${e.message}`;
|
|
|
187512
187657
|
isIfStatement: () => isIfStatement,
|
|
187513
187658
|
isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
|
|
187514
187659
|
isImplicitGlob: () => isImplicitGlob,
|
|
187660
|
+
isImportAttribute: () => isImportAttribute,
|
|
187661
|
+
isImportAttributeName: () => isImportAttributeName,
|
|
187662
|
+
isImportAttributes: () => isImportAttributes,
|
|
187515
187663
|
isImportCall: () => isImportCall,
|
|
187516
187664
|
isImportClause: () => isImportClause,
|
|
187517
187665
|
isImportDeclaration: () => isImportDeclaration,
|
|
@@ -187522,6 +187670,7 @@ ${e.message}`;
|
|
|
187522
187670
|
isImportOrExportSpecifierName: () => isImportOrExportSpecifierName,
|
|
187523
187671
|
isImportSpecifier: () => isImportSpecifier,
|
|
187524
187672
|
isImportTypeAssertionContainer: () => isImportTypeAssertionContainer,
|
|
187673
|
+
isImportTypeAttributes: () => isImportTypeAttributes,
|
|
187525
187674
|
isImportTypeNode: () => isImportTypeNode,
|
|
187526
187675
|
isImportableFile: () => isImportableFile,
|
|
187527
187676
|
isInComment: () => isInComment,
|
|
@@ -187703,7 +187852,6 @@ ${e.message}`;
|
|
|
187703
187852
|
isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
|
|
187704
187853
|
isNewExpression: () => isNewExpression,
|
|
187705
187854
|
isNewExpressionTarget: () => isNewExpressionTarget,
|
|
187706
|
-
isNightly: () => isNightly,
|
|
187707
187855
|
isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
|
|
187708
187856
|
isNode: () => isNode,
|
|
187709
187857
|
isNodeArray: () => isNodeArray,
|