@typescript-deploys/pr-build 5.3.0-pr-55880-5 → 5.3.0-pr-55887-9
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 +424 -311
- package/lib/tsserver.js +468 -341
- package/lib/typescript.d.ts +51 -29
- package/lib/typescript.js +463 -338
- package/lib/typingsInstaller.js +166 -109
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -992,7 +992,7 @@ __export(server_exports, {
|
|
|
992
992
|
getRenameLocation: () => getRenameLocation,
|
|
993
993
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
994
994
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
995
|
-
|
|
995
|
+
getResolutionModeOverride: () => getResolutionModeOverride,
|
|
996
996
|
getResolveJsonModule: () => getResolveJsonModule,
|
|
997
997
|
getResolvePackageJsonExports: () => getResolvePackageJsonExports,
|
|
998
998
|
getResolvePackageJsonImports: () => getResolvePackageJsonImports,
|
|
@@ -1124,6 +1124,7 @@ __export(server_exports, {
|
|
|
1124
1124
|
hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
|
|
1125
1125
|
hasQuestionToken: () => hasQuestionToken,
|
|
1126
1126
|
hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
|
|
1127
|
+
hasResolutionModeOverride: () => hasResolutionModeOverride,
|
|
1127
1128
|
hasRestParameter: () => hasRestParameter,
|
|
1128
1129
|
hasScopeMarker: () => hasScopeMarker,
|
|
1129
1130
|
hasStaticModifier: () => hasStaticModifier,
|
|
@@ -1197,7 +1198,6 @@ __export(server_exports, {
|
|
|
1197
1198
|
isAssertClause: () => isAssertClause,
|
|
1198
1199
|
isAssertEntry: () => isAssertEntry,
|
|
1199
1200
|
isAssertionExpression: () => isAssertionExpression,
|
|
1200
|
-
isAssertionKey: () => isAssertionKey,
|
|
1201
1201
|
isAssertsKeyword: () => isAssertsKeyword,
|
|
1202
1202
|
isAssignmentDeclaration: () => isAssignmentDeclaration,
|
|
1203
1203
|
isAssignmentExpression: () => isAssignmentExpression,
|
|
@@ -1407,6 +1407,9 @@ __export(server_exports, {
|
|
|
1407
1407
|
isIfStatement: () => isIfStatement,
|
|
1408
1408
|
isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
|
|
1409
1409
|
isImplicitGlob: () => isImplicitGlob,
|
|
1410
|
+
isImportAttribute: () => isImportAttribute,
|
|
1411
|
+
isImportAttributeName: () => isImportAttributeName,
|
|
1412
|
+
isImportAttributes: () => isImportAttributes,
|
|
1410
1413
|
isImportCall: () => isImportCall,
|
|
1411
1414
|
isImportClause: () => isImportClause,
|
|
1412
1415
|
isImportDeclaration: () => isImportDeclaration,
|
|
@@ -1598,7 +1601,6 @@ __export(server_exports, {
|
|
|
1598
1601
|
isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
|
|
1599
1602
|
isNewExpression: () => isNewExpression,
|
|
1600
1603
|
isNewExpressionTarget: () => isNewExpressionTarget,
|
|
1601
|
-
isNightly: () => isNightly,
|
|
1602
1604
|
isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
|
|
1603
1605
|
isNode: () => isNode,
|
|
1604
1606
|
isNodeArray: () => isNodeArray,
|
|
@@ -2328,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2330
|
|
|
2329
2331
|
// src/compiler/corePublic.ts
|
|
2330
2332
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2333
|
+
var version = `${versionMajorMinor}.0-insiders.20230927`;
|
|
2332
2334
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2335
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2336
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6037,8 +6039,10 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => {
|
|
|
6037
6039
|
SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause";
|
|
6038
6040
|
SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause";
|
|
6039
6041
|
SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause";
|
|
6040
|
-
SyntaxKind5[SyntaxKind5["
|
|
6041
|
-
SyntaxKind5[SyntaxKind5["
|
|
6042
|
+
SyntaxKind5[SyntaxKind5["ImportAttributes"] = 300] = "ImportAttributes";
|
|
6043
|
+
SyntaxKind5[SyntaxKind5["ImportAttribute"] = 301] = "ImportAttribute";
|
|
6044
|
+
SyntaxKind5[SyntaxKind5["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause";
|
|
6045
|
+
SyntaxKind5[SyntaxKind5["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry";
|
|
6042
6046
|
SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer";
|
|
6043
6047
|
SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment";
|
|
6044
6048
|
SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
|
|
@@ -7341,7 +7345,8 @@ var ListFormat = /* @__PURE__ */ ((ListFormat2) => {
|
|
|
7341
7345
|
ListFormat2[ListFormat2["ObjectBindingPatternElements"] = 525136] = "ObjectBindingPatternElements";
|
|
7342
7346
|
ListFormat2[ListFormat2["ArrayBindingPatternElements"] = 524880] = "ArrayBindingPatternElements";
|
|
7343
7347
|
ListFormat2[ListFormat2["ObjectLiteralExpressionProperties"] = 526226] = "ObjectLiteralExpressionProperties";
|
|
7344
|
-
ListFormat2[ListFormat2["
|
|
7348
|
+
ListFormat2[ListFormat2["ImportAttributes"] = 526226] = "ImportAttributes";
|
|
7349
|
+
ListFormat2[ListFormat2["ImportClauseEntries"] = 526226 /* ImportAttributes */] = "ImportClauseEntries";
|
|
7345
7350
|
ListFormat2[ListFormat2["ArrayLiteralExpressionElements"] = 8914] = "ArrayLiteralExpressionElements";
|
|
7346
7351
|
ListFormat2[ListFormat2["CommaListElements"] = 528] = "CommaListElements";
|
|
7347
7352
|
ListFormat2[ListFormat2["CallExpressionArguments"] = 2576] = "CallExpressionArguments";
|
|
@@ -9581,9 +9586,8 @@ var Diagnostics = {
|
|
|
9581
9586
|
_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."),
|
|
9582
9587
|
_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."),
|
|
9583
9588
|
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."),
|
|
9584
|
-
|
|
9589
|
+
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"),
|
|
9585
9590
|
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"),
|
|
9586
|
-
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`."),
|
|
9587
9591
|
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`."),
|
|
9588
9592
|
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
9589
9593
|
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
@@ -9593,6 +9597,8 @@ var Diagnostics = {
|
|
|
9593
9597
|
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"`),
|
|
9594
9598
|
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"`),
|
|
9595
9599
|
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"),
|
|
9600
|
+
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."),
|
|
9601
|
+
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'."),
|
|
9596
9602
|
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."),
|
|
9597
9603
|
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."),
|
|
9598
9604
|
catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -9619,6 +9625,7 @@ var Diagnostics = {
|
|
|
9619
9625
|
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."),
|
|
9620
9626
|
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."),
|
|
9621
9627
|
_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."),
|
|
9628
|
+
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."),
|
|
9622
9629
|
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."),
|
|
9623
9630
|
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."),
|
|
9624
9631
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -10148,15 +10155,15 @@ var Diagnostics = {
|
|
|
10148
10155
|
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}'?"),
|
|
10149
10156
|
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'."),
|
|
10150
10157
|
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."),
|
|
10158
|
+
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'."),
|
|
10151
10159
|
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}'?"),
|
|
10152
10160
|
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."),
|
|
10153
10161
|
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}'?"),
|
|
10154
|
-
|
|
10162
|
+
Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),
|
|
10155
10163
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
10156
10164
|
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."),
|
|
10157
10165
|
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."),
|
|
10158
10166
|
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"),
|
|
10159
|
-
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'."),
|
|
10160
10167
|
_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?"),
|
|
10161
10168
|
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."),
|
|
10162
10169
|
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."),
|
|
@@ -10170,6 +10177,10 @@ var Diagnostics = {
|
|
|
10170
10177
|
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."),
|
|
10171
10178
|
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."),
|
|
10172
10179
|
Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."),
|
|
10180
|
+
Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),
|
|
10181
|
+
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
10182
|
+
Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."),
|
|
10183
|
+
Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."),
|
|
10173
10184
|
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}'."),
|
|
10174
10185
|
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}'."),
|
|
10175
10186
|
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}'."),
|
|
@@ -10278,7 +10289,6 @@ var Diagnostics = {
|
|
|
10278
10289
|
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}'."),
|
|
10279
10290
|
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}'?"),
|
|
10280
10291
|
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'."),
|
|
10281
|
-
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'."),
|
|
10282
10292
|
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."),
|
|
10283
10293
|
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."),
|
|
10284
10294
|
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}'."),
|
|
@@ -14353,12 +14363,12 @@ function isTypeOnlyExportDeclaration(node) {
|
|
|
14353
14363
|
function isTypeOnlyImportOrExportDeclaration(node) {
|
|
14354
14364
|
return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node);
|
|
14355
14365
|
}
|
|
14356
|
-
function isAssertionKey(node) {
|
|
14357
|
-
return isStringLiteral(node) || isIdentifier(node);
|
|
14358
|
-
}
|
|
14359
14366
|
function isStringTextContainingNode(node) {
|
|
14360
14367
|
return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind);
|
|
14361
14368
|
}
|
|
14369
|
+
function isImportAttributeName(node) {
|
|
14370
|
+
return isStringLiteral(node) || isIdentifier(node);
|
|
14371
|
+
}
|
|
14362
14372
|
function isGeneratedIdentifier(node) {
|
|
14363
14373
|
var _a;
|
|
14364
14374
|
return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0;
|
|
@@ -18713,9 +18723,6 @@ function getIndentString(level) {
|
|
|
18713
18723
|
function getIndentSize() {
|
|
18714
18724
|
return indentStrings[1].length;
|
|
18715
18725
|
}
|
|
18716
|
-
function isNightly() {
|
|
18717
|
-
return version.includes("-dev") || version.includes("-insiders");
|
|
18718
|
-
}
|
|
18719
18726
|
function createTextWriter(newLine) {
|
|
18720
18727
|
var output;
|
|
18721
18728
|
var indent3;
|
|
@@ -20124,6 +20131,7 @@ function Symbol4(flags, name) {
|
|
|
20124
20131
|
this.exportSymbol = void 0;
|
|
20125
20132
|
this.constEnumOnlyModule = void 0;
|
|
20126
20133
|
this.isReferenced = void 0;
|
|
20134
|
+
this.isInitialized = void 0;
|
|
20127
20135
|
this.isAssigned = void 0;
|
|
20128
20136
|
this.links = void 0;
|
|
20129
20137
|
}
|
|
@@ -21660,6 +21668,12 @@ function getPropertyNameFromType(type) {
|
|
|
21660
21668
|
function isExpandoPropertyDeclaration(declaration) {
|
|
21661
21669
|
return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
|
|
21662
21670
|
}
|
|
21671
|
+
function hasResolutionModeOverride(node) {
|
|
21672
|
+
if (node === void 0) {
|
|
21673
|
+
return false;
|
|
21674
|
+
}
|
|
21675
|
+
return !!getResolutionModeOverride(node.attributes);
|
|
21676
|
+
}
|
|
21663
21677
|
|
|
21664
21678
|
// src/compiler/factory/baseNodeFactory.ts
|
|
21665
21679
|
function createBaseNodeFactory() {
|
|
@@ -22542,6 +22556,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
22542
22556
|
updateAssertEntry,
|
|
22543
22557
|
createImportTypeAssertionContainer,
|
|
22544
22558
|
updateImportTypeAssertionContainer,
|
|
22559
|
+
createImportAttributes,
|
|
22560
|
+
updateImportAttributes,
|
|
22561
|
+
createImportAttribute,
|
|
22562
|
+
updateImportAttribute,
|
|
22545
22563
|
createNamespaceImport,
|
|
22546
22564
|
updateNamespaceImport,
|
|
22547
22565
|
createNamespaceExport,
|
|
@@ -23810,18 +23828,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
23810
23828
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
23811
23829
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
23812
23830
|
}
|
|
23813
|
-
function createImportTypeNode(argument,
|
|
23831
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
23814
23832
|
const node = createBaseNode(205 /* ImportType */);
|
|
23815
23833
|
node.argument = argument;
|
|
23816
|
-
node.
|
|
23834
|
+
node.attributes = attributes;
|
|
23835
|
+
if (node.assertions && node.assertions.assertClause && node.attributes) {
|
|
23836
|
+
node.assertions.assertClause = node.attributes;
|
|
23837
|
+
}
|
|
23817
23838
|
node.qualifier = qualifier;
|
|
23818
23839
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
23819
23840
|
node.isTypeOf = isTypeOf;
|
|
23820
23841
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
23821
23842
|
return node;
|
|
23822
23843
|
}
|
|
23823
|
-
function updateImportTypeNode(node, argument,
|
|
23824
|
-
return node.argument !== argument || node.
|
|
23844
|
+
function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
|
|
23845
|
+
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;
|
|
23825
23846
|
}
|
|
23826
23847
|
function createParenthesizedType(type) {
|
|
23827
23848
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -24951,19 +24972,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
24951
24972
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
24952
24973
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
24953
24974
|
}
|
|
24954
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
24975
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
24955
24976
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
24956
24977
|
node.modifiers = asNodeArray(modifiers);
|
|
24957
24978
|
node.importClause = importClause;
|
|
24958
24979
|
node.moduleSpecifier = moduleSpecifier;
|
|
24959
|
-
node.assertClause =
|
|
24980
|
+
node.attributes = node.assertClause = attributes;
|
|
24960
24981
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
24961
24982
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
24962
24983
|
node.jsDoc = void 0;
|
|
24963
24984
|
return node;
|
|
24964
24985
|
}
|
|
24965
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
24966
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
24986
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
|
|
24987
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
|
|
24967
24988
|
}
|
|
24968
24989
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
24969
24990
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -24984,6 +25005,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
24984
25005
|
const node = createBaseNode(300 /* AssertClause */);
|
|
24985
25006
|
node.elements = createNodeArray(elements);
|
|
24986
25007
|
node.multiLine = multiLine;
|
|
25008
|
+
node.token = 132 /* AssertKeyword */;
|
|
24987
25009
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
24988
25010
|
return node;
|
|
24989
25011
|
}
|
|
@@ -25009,6 +25031,27 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25009
25031
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
25010
25032
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
25011
25033
|
}
|
|
25034
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
25035
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
25036
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
25037
|
+
node.elements = createNodeArray(elements);
|
|
25038
|
+
node.multiLine = multiLine;
|
|
25039
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
25040
|
+
return node;
|
|
25041
|
+
}
|
|
25042
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
25043
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
25044
|
+
}
|
|
25045
|
+
function createImportAttribute(name, value) {
|
|
25046
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
25047
|
+
node.name = name;
|
|
25048
|
+
node.value = value;
|
|
25049
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
25050
|
+
return node;
|
|
25051
|
+
}
|
|
25052
|
+
function updateImportAttribute(node, name, value) {
|
|
25053
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
25054
|
+
}
|
|
25012
25055
|
function createNamespaceImport(name) {
|
|
25013
25056
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
25014
25057
|
node.name = name;
|
|
@@ -25069,20 +25112,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
25069
25112
|
function updateExportAssignment(node, modifiers, expression) {
|
|
25070
25113
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node;
|
|
25071
25114
|
}
|
|
25072
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
25115
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
25073
25116
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
25074
25117
|
node.modifiers = asNodeArray(modifiers);
|
|
25075
25118
|
node.isTypeOnly = isTypeOnly;
|
|
25076
25119
|
node.exportClause = exportClause;
|
|
25077
25120
|
node.moduleSpecifier = moduleSpecifier;
|
|
25078
|
-
node.assertClause =
|
|
25121
|
+
node.attributes = node.assertClause = attributes;
|
|
25079
25122
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
25080
25123
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
25081
25124
|
node.jsDoc = void 0;
|
|
25082
25125
|
return node;
|
|
25083
25126
|
}
|
|
25084
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
25085
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
25127
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
25128
|
+
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;
|
|
25086
25129
|
}
|
|
25087
25130
|
function finishUpdateExportDeclaration(updated, original) {
|
|
25088
25131
|
if (updated !== original) {
|
|
@@ -26409,7 +26452,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
26409
26452
|
} else {
|
|
26410
26453
|
modifierArray = modifiers;
|
|
26411
26454
|
}
|
|
26412
|
-
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.
|
|
26455
|
+
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);
|
|
26413
26456
|
}
|
|
26414
26457
|
function updateModifierLike(node, modifierArray) {
|
|
26415
26458
|
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);
|
|
@@ -28758,6 +28801,12 @@ function isAssertClause(node) {
|
|
|
28758
28801
|
function isAssertEntry(node) {
|
|
28759
28802
|
return node.kind === 301 /* AssertEntry */;
|
|
28760
28803
|
}
|
|
28804
|
+
function isImportAttributes(node) {
|
|
28805
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
28806
|
+
}
|
|
28807
|
+
function isImportAttribute(node) {
|
|
28808
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
28809
|
+
}
|
|
28761
28810
|
function isNamespaceImport(node) {
|
|
28762
28811
|
return node.kind === 274 /* NamespaceImport */;
|
|
28763
28812
|
}
|
|
@@ -29479,7 +29528,7 @@ function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFacto
|
|
|
29479
29528
|
namedBindings
|
|
29480
29529
|
),
|
|
29481
29530
|
nodeFactory.createStringLiteral(externalHelpersModuleNameText),
|
|
29482
|
-
/*
|
|
29531
|
+
/*attributes*/
|
|
29483
29532
|
void 0
|
|
29484
29533
|
);
|
|
29485
29534
|
addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */);
|
|
@@ -30245,7 +30294,7 @@ var forEachChildTable = {
|
|
|
30245
30294
|
return visitNode2(cbNode, node.typeParameter);
|
|
30246
30295
|
},
|
|
30247
30296
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
30248
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
30297
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
30249
30298
|
},
|
|
30250
30299
|
[302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {
|
|
30251
30300
|
return visitNode2(cbNode, node.assertClause);
|
|
@@ -30419,15 +30468,15 @@ var forEachChildTable = {
|
|
|
30419
30468
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
30420
30469
|
},
|
|
30421
30470
|
[272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
30422
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
30471
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
30423
30472
|
},
|
|
30424
30473
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
30425
30474
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
30426
30475
|
},
|
|
30427
|
-
[300 /*
|
|
30476
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
30428
30477
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
30429
30478
|
},
|
|
30430
|
-
[301 /*
|
|
30479
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
30431
30480
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
30432
30481
|
},
|
|
30433
30482
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -30442,7 +30491,7 @@ var forEachChildTable = {
|
|
|
30442
30491
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
30443
30492
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
30444
30493
|
[278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
30445
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
30494
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
30446
30495
|
},
|
|
30447
30496
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
30448
30497
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -31722,7 +31771,7 @@ var Parser;
|
|
|
31722
31771
|
function isLiteralPropertyName() {
|
|
31723
31772
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
31724
31773
|
}
|
|
31725
|
-
function
|
|
31774
|
+
function isImportAttributeName2() {
|
|
31726
31775
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
31727
31776
|
}
|
|
31728
31777
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -31841,8 +31890,8 @@ var Parser;
|
|
|
31841
31890
|
return isLiteralPropertyName();
|
|
31842
31891
|
case 9 /* ObjectBindingElements */:
|
|
31843
31892
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
31844
|
-
case 24 /*
|
|
31845
|
-
return
|
|
31893
|
+
case 24 /* ImportAttributes */:
|
|
31894
|
+
return isImportAttributeName2();
|
|
31846
31895
|
case 7 /* HeritageClauseElement */:
|
|
31847
31896
|
if (token() === 19 /* OpenBraceToken */) {
|
|
31848
31897
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -31945,7 +31994,7 @@ var Parser;
|
|
|
31945
31994
|
case 12 /* ObjectLiteralMembers */:
|
|
31946
31995
|
case 9 /* ObjectBindingElements */:
|
|
31947
31996
|
case 23 /* ImportOrExportSpecifiers */:
|
|
31948
|
-
case 24 /*
|
|
31997
|
+
case 24 /* ImportAttributes */:
|
|
31949
31998
|
return token() === 20 /* CloseBraceToken */;
|
|
31950
31999
|
case 3 /* SwitchClauseStatements */:
|
|
31951
32000
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -32251,7 +32300,7 @@ var Parser;
|
|
|
32251
32300
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
32252
32301
|
case 14 /* JsxChildren */:
|
|
32253
32302
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
32254
|
-
case 24 /*
|
|
32303
|
+
case 24 /* ImportAttributes */:
|
|
32255
32304
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
32256
32305
|
case 25 /* JSDocComment */:
|
|
32257
32306
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -33126,28 +33175,6 @@ var Parser;
|
|
|
33126
33175
|
nextToken();
|
|
33127
33176
|
return token() === 102 /* ImportKeyword */;
|
|
33128
33177
|
}
|
|
33129
|
-
function parseImportTypeAssertions() {
|
|
33130
|
-
const pos = getNodePos();
|
|
33131
|
-
const openBracePosition = scanner2.getTokenStart();
|
|
33132
|
-
parseExpected(19 /* OpenBraceToken */);
|
|
33133
|
-
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
33134
|
-
parseExpected(132 /* AssertKeyword */);
|
|
33135
|
-
parseExpected(59 /* ColonToken */);
|
|
33136
|
-
const clause = parseAssertClause(
|
|
33137
|
-
/*skipAssertKeyword*/
|
|
33138
|
-
true
|
|
33139
|
-
);
|
|
33140
|
-
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
33141
|
-
const lastError = lastOrUndefined(parseDiagnostics);
|
|
33142
|
-
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
33143
|
-
addRelatedInfo(
|
|
33144
|
-
lastError,
|
|
33145
|
-
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
33146
|
-
);
|
|
33147
|
-
}
|
|
33148
|
-
}
|
|
33149
|
-
return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos);
|
|
33150
|
-
}
|
|
33151
33178
|
function parseImportType() {
|
|
33152
33179
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
33153
33180
|
const pos = getNodePos();
|
|
@@ -33155,14 +33182,36 @@ var Parser;
|
|
|
33155
33182
|
parseExpected(102 /* ImportKeyword */);
|
|
33156
33183
|
parseExpected(21 /* OpenParenToken */);
|
|
33157
33184
|
const type = parseType();
|
|
33158
|
-
let
|
|
33185
|
+
let attributes;
|
|
33159
33186
|
if (parseOptional(28 /* CommaToken */)) {
|
|
33160
|
-
|
|
33187
|
+
const openBracePosition = scanner2.getTokenStart();
|
|
33188
|
+
parseExpected(19 /* OpenBraceToken */);
|
|
33189
|
+
const currentToken2 = token();
|
|
33190
|
+
if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {
|
|
33191
|
+
nextToken();
|
|
33192
|
+
} else {
|
|
33193
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
33194
|
+
}
|
|
33195
|
+
parseExpected(59 /* ColonToken */);
|
|
33196
|
+
attributes = parseImportAttributes(
|
|
33197
|
+
currentToken2,
|
|
33198
|
+
/*skipKeyword*/
|
|
33199
|
+
true
|
|
33200
|
+
);
|
|
33201
|
+
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
33202
|
+
const lastError = lastOrUndefined(parseDiagnostics);
|
|
33203
|
+
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
33204
|
+
addRelatedInfo(
|
|
33205
|
+
lastError,
|
|
33206
|
+
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
33207
|
+
);
|
|
33208
|
+
}
|
|
33209
|
+
}
|
|
33161
33210
|
}
|
|
33162
33211
|
parseExpected(22 /* CloseParenToken */);
|
|
33163
33212
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
33164
33213
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
33165
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
33214
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
33166
33215
|
}
|
|
33167
33216
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
33168
33217
|
nextToken();
|
|
@@ -36224,15 +36273,16 @@ var Parser;
|
|
|
36224
36273
|
parseExpected(161 /* FromKeyword */);
|
|
36225
36274
|
}
|
|
36226
36275
|
const moduleSpecifier = parseModuleSpecifier();
|
|
36227
|
-
|
|
36228
|
-
|
|
36229
|
-
|
|
36276
|
+
const currentToken2 = token();
|
|
36277
|
+
let attributes;
|
|
36278
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
|
|
36279
|
+
attributes = parseImportAttributes(currentToken2);
|
|
36230
36280
|
}
|
|
36231
36281
|
parseSemicolon();
|
|
36232
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
36282
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
36233
36283
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
36234
36284
|
}
|
|
36235
|
-
function
|
|
36285
|
+
function parseImportAttribute() {
|
|
36236
36286
|
const pos = getNodePos();
|
|
36237
36287
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
36238
36288
|
parseExpected(59 /* ColonToken */);
|
|
@@ -36240,19 +36290,19 @@ var Parser;
|
|
|
36240
36290
|
/*allowReturnTypeInArrowFunction*/
|
|
36241
36291
|
true
|
|
36242
36292
|
);
|
|
36243
|
-
return finishNode(factory2.
|
|
36293
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
36244
36294
|
}
|
|
36245
|
-
function
|
|
36295
|
+
function parseImportAttributes(token2, skipKeyword) {
|
|
36246
36296
|
const pos = getNodePos();
|
|
36247
|
-
if (!
|
|
36248
|
-
parseExpected(
|
|
36297
|
+
if (!skipKeyword) {
|
|
36298
|
+
parseExpected(token2);
|
|
36249
36299
|
}
|
|
36250
36300
|
const openBracePosition = scanner2.getTokenStart();
|
|
36251
36301
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
36252
36302
|
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
36253
36303
|
const elements = parseDelimitedList(
|
|
36254
|
-
24 /*
|
|
36255
|
-
|
|
36304
|
+
24 /* ImportAttributes */,
|
|
36305
|
+
parseImportAttribute,
|
|
36256
36306
|
/*considerSemicolonAsDelimiter*/
|
|
36257
36307
|
true
|
|
36258
36308
|
);
|
|
@@ -36265,7 +36315,7 @@ var Parser;
|
|
|
36265
36315
|
);
|
|
36266
36316
|
}
|
|
36267
36317
|
}
|
|
36268
|
-
return finishNode(factory2.
|
|
36318
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
36269
36319
|
} else {
|
|
36270
36320
|
const elements = createNodeArray(
|
|
36271
36321
|
[],
|
|
@@ -36275,10 +36325,11 @@ var Parser;
|
|
|
36275
36325
|
/*hasTrailingComma*/
|
|
36276
36326
|
false
|
|
36277
36327
|
);
|
|
36278
|
-
return finishNode(factory2.
|
|
36328
|
+
return finishNode(factory2.createImportAttributes(
|
|
36279
36329
|
elements,
|
|
36280
36330
|
/*multiLine*/
|
|
36281
|
-
false
|
|
36331
|
+
false,
|
|
36332
|
+
token2
|
|
36282
36333
|
), pos);
|
|
36283
36334
|
}
|
|
36284
36335
|
}
|
|
@@ -36410,7 +36461,7 @@ var Parser;
|
|
|
36410
36461
|
);
|
|
36411
36462
|
let exportClause;
|
|
36412
36463
|
let moduleSpecifier;
|
|
36413
|
-
let
|
|
36464
|
+
let attributes;
|
|
36414
36465
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
36415
36466
|
const namespaceExportPos = getNodePos();
|
|
36416
36467
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -36426,12 +36477,13 @@ var Parser;
|
|
|
36426
36477
|
moduleSpecifier = parseModuleSpecifier();
|
|
36427
36478
|
}
|
|
36428
36479
|
}
|
|
36429
|
-
|
|
36430
|
-
|
|
36480
|
+
const currentToken2 = token();
|
|
36481
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
|
|
36482
|
+
attributes = parseImportAttributes(currentToken2);
|
|
36431
36483
|
}
|
|
36432
36484
|
parseSemicolon();
|
|
36433
36485
|
setAwaitContext(savedAwaitContext);
|
|
36434
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
36486
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
36435
36487
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
36436
36488
|
}
|
|
36437
36489
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -36481,7 +36533,7 @@ var Parser;
|
|
|
36481
36533
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
36482
36534
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
36483
36535
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
36484
|
-
ParsingContext2[ParsingContext2["
|
|
36536
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
36485
36537
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
36486
36538
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
36487
36539
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -41549,10 +41601,15 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil
|
|
|
41549
41601
|
const failedLookupLocations = [];
|
|
41550
41602
|
const affectingLocations = [];
|
|
41551
41603
|
let features = getNodeResolutionFeatures(options);
|
|
41552
|
-
if (resolutionMode
|
|
41604
|
+
if (resolutionMode !== void 0) {
|
|
41605
|
+
features |= 30 /* AllFeatures */;
|
|
41606
|
+
}
|
|
41607
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
41608
|
+
if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) {
|
|
41553
41609
|
features |= 32 /* EsmMode */;
|
|
41554
41610
|
}
|
|
41555
|
-
const
|
|
41611
|
+
const useImportCondition = resolutionMode === 99 /* ESNext */ || (resolutionMode !== void 0 ? false : void 0);
|
|
41612
|
+
const conditions = features & 8 /* Exports */ ? getConditions(options, useImportCondition) : [];
|
|
41556
41613
|
const diagnostics = [];
|
|
41557
41614
|
const moduleResolutionState = {
|
|
41558
41615
|
compilerOptions: options,
|
|
@@ -41721,11 +41778,19 @@ function getNodeResolutionFeatures(options) {
|
|
|
41721
41778
|
return features;
|
|
41722
41779
|
}
|
|
41723
41780
|
function getConditions(options, esmMode) {
|
|
41724
|
-
const
|
|
41781
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
41782
|
+
if (esmMode === void 0) {
|
|
41783
|
+
if (moduleResolution === 100 /* Bundler */) {
|
|
41784
|
+
esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
|
|
41785
|
+
} else if (moduleResolution === 2 /* Node10 */) {
|
|
41786
|
+
return [];
|
|
41787
|
+
}
|
|
41788
|
+
}
|
|
41789
|
+
const conditions = esmMode ? ["import"] : ["require"];
|
|
41725
41790
|
if (!options.noDtsResolution) {
|
|
41726
41791
|
conditions.push("types");
|
|
41727
41792
|
}
|
|
41728
|
-
if (
|
|
41793
|
+
if (moduleResolution !== 100 /* Bundler */) {
|
|
41729
41794
|
conditions.push("node");
|
|
41730
41795
|
}
|
|
41731
41796
|
return concatenate(conditions, options.customConditions);
|
|
@@ -42168,13 +42233,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
42168
42233
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42169
42234
|
break;
|
|
42170
42235
|
case 2 /* Node10 */:
|
|
42171
|
-
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42236
|
+
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
42172
42237
|
break;
|
|
42173
42238
|
case 1 /* Classic */:
|
|
42174
42239
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42175
42240
|
break;
|
|
42176
42241
|
case 100 /* Bundler */:
|
|
42177
|
-
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42242
|
+
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
42178
42243
|
break;
|
|
42179
42244
|
default:
|
|
42180
42245
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
@@ -42352,7 +42417,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
42352
42417
|
resolutionMode
|
|
42353
42418
|
);
|
|
42354
42419
|
}
|
|
42355
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42420
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {
|
|
42356
42421
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
42357
42422
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
42358
42423
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
@@ -42369,7 +42434,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile,
|
|
|
42369
42434
|
extensions,
|
|
42370
42435
|
/*isConfigLookup*/
|
|
42371
42436
|
false,
|
|
42372
|
-
redirectedReference
|
|
42437
|
+
redirectedReference,
|
|
42438
|
+
conditions
|
|
42373
42439
|
);
|
|
42374
42440
|
}
|
|
42375
42441
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
@@ -42385,10 +42451,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
42385
42451
|
/*isConfigLookup*/
|
|
42386
42452
|
false,
|
|
42387
42453
|
/*redirectedReference*/
|
|
42454
|
+
void 0,
|
|
42455
|
+
/*conditions*/
|
|
42388
42456
|
void 0
|
|
42389
42457
|
);
|
|
42390
42458
|
}
|
|
42391
|
-
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
42459
|
+
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {
|
|
42392
42460
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
42393
42461
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
42394
42462
|
if (getResolveJsonModule(compilerOptions)) {
|
|
@@ -42404,10 +42472,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
42404
42472
|
extensions,
|
|
42405
42473
|
/*isConfigLookup*/
|
|
42406
42474
|
false,
|
|
42407
|
-
redirectedReference
|
|
42475
|
+
redirectedReference,
|
|
42476
|
+
conditions
|
|
42408
42477
|
);
|
|
42409
42478
|
}
|
|
42410
|
-
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
42479
|
+
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {
|
|
42411
42480
|
let extensions;
|
|
42412
42481
|
if (isConfigLookup) {
|
|
42413
42482
|
extensions = 8 /* Json */;
|
|
@@ -42418,7 +42487,7 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
42418
42487
|
} else {
|
|
42419
42488
|
extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
42420
42489
|
}
|
|
42421
|
-
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
42490
|
+
return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
|
|
42422
42491
|
}
|
|
42423
42492
|
function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
42424
42493
|
return nodeModuleNameResolverWorker(
|
|
@@ -42433,15 +42502,21 @@ function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
|
42433
42502
|
/*isConfigLookup*/
|
|
42434
42503
|
true,
|
|
42435
42504
|
/*redirectedReference*/
|
|
42505
|
+
void 0,
|
|
42506
|
+
/*conditions*/
|
|
42436
42507
|
void 0
|
|
42437
42508
|
);
|
|
42438
42509
|
}
|
|
42439
|
-
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
42510
|
+
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
|
|
42440
42511
|
var _a, _b, _c, _d;
|
|
42441
42512
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
42442
42513
|
const failedLookupLocations = [];
|
|
42443
42514
|
const affectingLocations = [];
|
|
42444
|
-
const
|
|
42515
|
+
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
42516
|
+
conditions ?? (conditions = getConditions(
|
|
42517
|
+
compilerOptions,
|
|
42518
|
+
moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
|
|
42519
|
+
));
|
|
42445
42520
|
const diagnostics = [];
|
|
42446
42521
|
const state = {
|
|
42447
42522
|
compilerOptions,
|
|
@@ -42451,17 +42526,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
42451
42526
|
affectingLocations,
|
|
42452
42527
|
packageJsonInfoCache: cache,
|
|
42453
42528
|
features,
|
|
42454
|
-
conditions,
|
|
42529
|
+
conditions: conditions ?? emptyArray,
|
|
42455
42530
|
requestContainingDirectory: containingDirectory,
|
|
42456
42531
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
42457
42532
|
isConfigLookup,
|
|
42458
42533
|
candidateIsFromPackageJsonField: false
|
|
42459
42534
|
};
|
|
42460
|
-
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(
|
|
42461
|
-
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
42535
|
+
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
42536
|
+
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
|
|
42462
42537
|
}
|
|
42463
42538
|
let result;
|
|
42464
|
-
if (
|
|
42539
|
+
if (moduleResolution === 2 /* Node10 */) {
|
|
42465
42540
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
42466
42541
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
42467
42542
|
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
@@ -42469,7 +42544,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
42469
42544
|
result = tryResolve(extensions, state);
|
|
42470
42545
|
}
|
|
42471
42546
|
let legacyResult;
|
|
42472
|
-
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.includes("import")) {
|
|
42547
|
+
if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && (conditions == null ? void 0 : conditions.includes("import"))) {
|
|
42473
42548
|
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
42474
42549
|
const diagnosticState = {
|
|
42475
42550
|
...state,
|
|
@@ -43267,7 +43342,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
43267
43342
|
extensions,
|
|
43268
43343
|
/*isConfigLookup*/
|
|
43269
43344
|
false,
|
|
43270
|
-
redirectedReference
|
|
43345
|
+
redirectedReference,
|
|
43346
|
+
state.conditions
|
|
43271
43347
|
);
|
|
43272
43348
|
return toSearchResult(
|
|
43273
43349
|
result.resolvedModule ? {
|
|
@@ -48163,11 +48239,16 @@ function createTypeChecker(host) {
|
|
|
48163
48239
|
checkSourceFileWithEagerDiagnostics(file);
|
|
48164
48240
|
Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */));
|
|
48165
48241
|
diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName));
|
|
48166
|
-
|
|
48167
|
-
|
|
48168
|
-
|
|
48169
|
-
|
|
48170
|
-
|
|
48242
|
+
checkUnusedOrUninitializedIdentifiers(
|
|
48243
|
+
getPotentiallyUnusedOrUninitializedIdentifiers(file),
|
|
48244
|
+
(containingNode, kind, diag2) => {
|
|
48245
|
+
if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
|
|
48246
|
+
(diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ });
|
|
48247
|
+
}
|
|
48248
|
+
},
|
|
48249
|
+
/*checkUnused*/
|
|
48250
|
+
true
|
|
48251
|
+
);
|
|
48171
48252
|
return diagnostics2 || emptyArray;
|
|
48172
48253
|
} finally {
|
|
48173
48254
|
cancellationToken = void 0;
|
|
@@ -48664,7 +48745,7 @@ function createTypeChecker(host) {
|
|
|
48664
48745
|
var deferredGlobalClassAccessorDecoratorTargetType;
|
|
48665
48746
|
var deferredGlobalClassAccessorDecoratorResultType;
|
|
48666
48747
|
var deferredGlobalClassFieldDecoratorContextType;
|
|
48667
|
-
var
|
|
48748
|
+
var allPotentiallyUnusedOrUninitializedIdentifiers = /* @__PURE__ */ new Map();
|
|
48668
48749
|
var flowLoopStart = 0;
|
|
48669
48750
|
var flowLoopCount = 0;
|
|
48670
48751
|
var sharedFlowCount = 0;
|
|
@@ -49375,10 +49456,10 @@ function createTypeChecker(host) {
|
|
|
49375
49456
|
function isConstAssertion(location) {
|
|
49376
49457
|
return isAssertionExpression(location) && isConstTypeReference(location.type) || isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression);
|
|
49377
49458
|
}
|
|
49378
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true) {
|
|
49379
|
-
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, getSymbol2);
|
|
49459
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true, isWritten = false) {
|
|
49460
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, isWritten, getSymbol2);
|
|
49380
49461
|
}
|
|
49381
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
49462
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, isWritten, lookup) {
|
|
49382
49463
|
var _a, _b, _c;
|
|
49383
49464
|
const originalLocation = location;
|
|
49384
49465
|
let result;
|
|
@@ -49604,6 +49685,9 @@ function createTypeChecker(host) {
|
|
|
49604
49685
|
if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) {
|
|
49605
49686
|
result.isReferenced |= meaning;
|
|
49606
49687
|
}
|
|
49688
|
+
if (isWritten && result) {
|
|
49689
|
+
result.isInitialized = true;
|
|
49690
|
+
}
|
|
49607
49691
|
if (!result) {
|
|
49608
49692
|
if (lastLocation) {
|
|
49609
49693
|
Debug.assertNode(lastLocation, isSourceFile);
|
|
@@ -51023,7 +51107,7 @@ function createTypeChecker(host) {
|
|
|
51023
51107
|
return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0;
|
|
51024
51108
|
}
|
|
51025
51109
|
function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
|
|
51026
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
51110
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
51027
51111
|
if (startsWith(moduleReference, "@types/")) {
|
|
51028
51112
|
const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
|
|
51029
51113
|
const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
|
|
@@ -51078,9 +51162,8 @@ function createTypeChecker(host) {
|
|
|
51078
51162
|
}
|
|
51079
51163
|
if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
|
|
51080
51164
|
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
|
|
51081
|
-
const
|
|
51082
|
-
|
|
51083
|
-
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) {
|
|
51165
|
+
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
|
|
51166
|
+
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
|
|
51084
51167
|
if (findAncestor(location, isImportEqualsDeclaration)) {
|
|
51085
51168
|
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);
|
|
51086
51169
|
} else {
|
|
@@ -51186,7 +51269,7 @@ function createTypeChecker(host) {
|
|
|
51186
51269
|
error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
|
|
51187
51270
|
} else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
|
|
51188
51271
|
const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
|
|
51189
|
-
const suggestedExt = (
|
|
51272
|
+
const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
|
|
51190
51273
|
if (suggestedExt) {
|
|
51191
51274
|
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);
|
|
51192
51275
|
} else {
|
|
@@ -52951,7 +53034,7 @@ function createTypeChecker(host) {
|
|
|
52951
53034
|
return factory.updateImportTypeNode(
|
|
52952
53035
|
root,
|
|
52953
53036
|
root.argument,
|
|
52954
|
-
root.
|
|
53037
|
+
root.attributes,
|
|
52955
53038
|
qualifier,
|
|
52956
53039
|
typeArguments,
|
|
52957
53040
|
root.isTypeOf
|
|
@@ -53684,7 +53767,6 @@ function createTypeChecker(host) {
|
|
|
53684
53767
|
return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
|
|
53685
53768
|
}
|
|
53686
53769
|
function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
|
|
53687
|
-
var _a, _b, _c, _d;
|
|
53688
53770
|
const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */));
|
|
53689
53771
|
const isTypeOf = meaning === 111551 /* Value */;
|
|
53690
53772
|
if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
@@ -53693,17 +53775,18 @@ function createTypeChecker(host) {
|
|
|
53693
53775
|
const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration));
|
|
53694
53776
|
const targetFile = getSourceFileOfModule(chain[0]);
|
|
53695
53777
|
let specifier;
|
|
53696
|
-
let
|
|
53778
|
+
let attributes;
|
|
53697
53779
|
if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
|
|
53698
53780
|
if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) {
|
|
53699
53781
|
specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */);
|
|
53700
|
-
|
|
53701
|
-
factory.
|
|
53702
|
-
factory.
|
|
53703
|
-
|
|
53704
|
-
|
|
53705
|
-
|
|
53706
|
-
|
|
53782
|
+
attributes = factory.createImportAttributes(
|
|
53783
|
+
factory.createNodeArray([
|
|
53784
|
+
factory.createImportAttribute(
|
|
53785
|
+
factory.createStringLiteral("resolution-mode"),
|
|
53786
|
+
factory.createStringLiteral("import")
|
|
53787
|
+
)
|
|
53788
|
+
])
|
|
53789
|
+
);
|
|
53707
53790
|
}
|
|
53708
53791
|
}
|
|
53709
53792
|
if (!specifier) {
|
|
@@ -53717,16 +53800,17 @@ function createTypeChecker(host) {
|
|
|
53717
53800
|
if (specifier.includes("/node_modules/")) {
|
|
53718
53801
|
specifier = oldSpecifier;
|
|
53719
53802
|
} else {
|
|
53720
|
-
|
|
53721
|
-
factory.
|
|
53722
|
-
factory.
|
|
53723
|
-
|
|
53724
|
-
|
|
53725
|
-
|
|
53726
|
-
|
|
53803
|
+
attributes = factory.createImportAttributes(
|
|
53804
|
+
factory.createNodeArray([
|
|
53805
|
+
factory.createImportAttribute(
|
|
53806
|
+
factory.createStringLiteral("resolution-mode"),
|
|
53807
|
+
factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require")
|
|
53808
|
+
)
|
|
53809
|
+
])
|
|
53810
|
+
);
|
|
53727
53811
|
}
|
|
53728
53812
|
}
|
|
53729
|
-
if (!
|
|
53813
|
+
if (!attributes) {
|
|
53730
53814
|
context.encounteredError = true;
|
|
53731
53815
|
if (context.tracker.reportLikelyUnsafeImportRequiredError) {
|
|
53732
53816
|
context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier);
|
|
@@ -53746,11 +53830,11 @@ function createTypeChecker(host) {
|
|
|
53746
53830
|
void 0
|
|
53747
53831
|
);
|
|
53748
53832
|
}
|
|
53749
|
-
return factory.createImportTypeNode(lit,
|
|
53833
|
+
return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf);
|
|
53750
53834
|
} else {
|
|
53751
53835
|
const splitNode = getTopmostIndexedAccessType(nonRootParts);
|
|
53752
53836
|
const qualifier = splitNode.objectType.typeName;
|
|
53753
|
-
return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit,
|
|
53837
|
+
return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType);
|
|
53754
53838
|
}
|
|
53755
53839
|
}
|
|
53756
53840
|
const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0);
|
|
@@ -54226,7 +54310,7 @@ function createTypeChecker(host) {
|
|
|
54226
54310
|
return factory.updateImportTypeNode(
|
|
54227
54311
|
node,
|
|
54228
54312
|
factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)),
|
|
54229
|
-
node.
|
|
54313
|
+
node.attributes,
|
|
54230
54314
|
node.qualifier,
|
|
54231
54315
|
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
|
54232
54316
|
node.isTypeOf
|
|
@@ -54446,7 +54530,7 @@ function createTypeChecker(host) {
|
|
|
54446
54530
|
return statements;
|
|
54447
54531
|
}
|
|
54448
54532
|
function inlineExportModifiers(statements) {
|
|
54449
|
-
const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.
|
|
54533
|
+
const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause));
|
|
54450
54534
|
if (index >= 0) {
|
|
54451
54535
|
const exportDecl = statements[index];
|
|
54452
54536
|
const replacements = mapDefined(exportDecl.exportClause.elements, (e) => {
|
|
@@ -54474,7 +54558,7 @@ function createTypeChecker(host) {
|
|
|
54474
54558
|
replacements
|
|
54475
54559
|
),
|
|
54476
54560
|
exportDecl.moduleSpecifier,
|
|
54477
|
-
exportDecl.
|
|
54561
|
+
exportDecl.attributes
|
|
54478
54562
|
);
|
|
54479
54563
|
}
|
|
54480
54564
|
}
|
|
@@ -55125,7 +55209,7 @@ function createTypeChecker(host) {
|
|
|
55125
55209
|
)])
|
|
55126
55210
|
),
|
|
55127
55211
|
factory.createStringLiteral(specifier2),
|
|
55128
|
-
/*
|
|
55212
|
+
/*attributes*/
|
|
55129
55213
|
void 0
|
|
55130
55214
|
),
|
|
55131
55215
|
0 /* None */
|
|
@@ -55213,7 +55297,7 @@ function createTypeChecker(host) {
|
|
|
55213
55297
|
void 0
|
|
55214
55298
|
),
|
|
55215
55299
|
specifier2,
|
|
55216
|
-
node.parent.
|
|
55300
|
+
node.parent.attributes
|
|
55217
55301
|
),
|
|
55218
55302
|
0 /* None */
|
|
55219
55303
|
);
|
|
@@ -55234,7 +55318,7 @@ function createTypeChecker(host) {
|
|
|
55234
55318
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
55235
55319
|
),
|
|
55236
55320
|
specifier2,
|
|
55237
|
-
node.parent.
|
|
55321
|
+
node.parent.attributes
|
|
55238
55322
|
),
|
|
55239
55323
|
0 /* None */
|
|
55240
55324
|
);
|
|
@@ -55275,7 +55359,7 @@ function createTypeChecker(host) {
|
|
|
55275
55359
|
])
|
|
55276
55360
|
),
|
|
55277
55361
|
specifier2,
|
|
55278
|
-
node.parent.parent.parent.
|
|
55362
|
+
node.parent.parent.parent.attributes
|
|
55279
55363
|
),
|
|
55280
55364
|
0 /* None */
|
|
55281
55365
|
);
|
|
@@ -64734,6 +64818,7 @@ function createTypeChecker(host) {
|
|
|
64734
64818
|
let skipParentCounter = 0;
|
|
64735
64819
|
let lastSkippedInfo;
|
|
64736
64820
|
let incompatibleStack;
|
|
64821
|
+
let relationCount = 16e6 - relation.size >> 3;
|
|
64737
64822
|
Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
|
|
64738
64823
|
const result = isRelatedTo(
|
|
64739
64824
|
source,
|
|
@@ -64747,8 +64832,19 @@ function createTypeChecker(host) {
|
|
|
64747
64832
|
reportIncompatibleStack();
|
|
64748
64833
|
}
|
|
64749
64834
|
if (overflow) {
|
|
64835
|
+
const id = getRelationKey(
|
|
64836
|
+
source,
|
|
64837
|
+
target,
|
|
64838
|
+
/*intersectionState*/
|
|
64839
|
+
0 /* None */,
|
|
64840
|
+
relation,
|
|
64841
|
+
/*ignoreConstraints*/
|
|
64842
|
+
false
|
|
64843
|
+
);
|
|
64844
|
+
relation.set(id, 4 /* Reported */ | 2 /* Failed */);
|
|
64750
64845
|
(_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth });
|
|
64751
|
-
const
|
|
64846
|
+
const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1;
|
|
64847
|
+
const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target));
|
|
64752
64848
|
if (errorOutputContainer) {
|
|
64753
64849
|
(errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
|
|
64754
64850
|
}
|
|
@@ -65279,6 +65375,16 @@ function createTypeChecker(host) {
|
|
|
65279
65375
|
}
|
|
65280
65376
|
function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) {
|
|
65281
65377
|
if (source2.flags & 1048576 /* Union */) {
|
|
65378
|
+
if (target2.flags & 1048576 /* Union */) {
|
|
65379
|
+
const sourceOrigin = source2.origin;
|
|
65380
|
+
if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) {
|
|
65381
|
+
return -1 /* True */;
|
|
65382
|
+
}
|
|
65383
|
+
const targetOrigin = target2.origin;
|
|
65384
|
+
if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) {
|
|
65385
|
+
return -1 /* True */;
|
|
65386
|
+
}
|
|
65387
|
+
}
|
|
65282
65388
|
return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState);
|
|
65283
65389
|
}
|
|
65284
65390
|
if (target2.flags & 1048576 /* Union */) {
|
|
@@ -65592,6 +65698,10 @@ function createTypeChecker(host) {
|
|
|
65592
65698
|
return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;
|
|
65593
65699
|
}
|
|
65594
65700
|
}
|
|
65701
|
+
if (relationCount <= 0) {
|
|
65702
|
+
overflow = true;
|
|
65703
|
+
return 0 /* False */;
|
|
65704
|
+
}
|
|
65595
65705
|
if (!maybeKeys) {
|
|
65596
65706
|
maybeKeys = [];
|
|
65597
65707
|
maybeKeysSet = /* @__PURE__ */ new Set();
|
|
@@ -65685,6 +65795,7 @@ function createTypeChecker(host) {
|
|
|
65685
65795
|
}
|
|
65686
65796
|
} else {
|
|
65687
65797
|
relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
|
|
65798
|
+
relationCount--;
|
|
65688
65799
|
resetMaybeStack(
|
|
65689
65800
|
/*markAllAsSucceeded*/
|
|
65690
65801
|
false
|
|
@@ -65696,6 +65807,7 @@ function createTypeChecker(host) {
|
|
|
65696
65807
|
maybeKeysSet.delete(maybeKeys[i]);
|
|
65697
65808
|
if (markAllAsSucceeded) {
|
|
65698
65809
|
relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
|
|
65810
|
+
relationCount--;
|
|
65699
65811
|
}
|
|
65700
65812
|
}
|
|
65701
65813
|
maybeCount = maybeStart;
|
|
@@ -67091,10 +67203,7 @@ function createTypeChecker(host) {
|
|
|
67091
67203
|
return false;
|
|
67092
67204
|
}
|
|
67093
67205
|
function getVariances(type) {
|
|
67094
|
-
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */
|
|
67095
|
-
}
|
|
67096
|
-
function isArraySubtype(type) {
|
|
67097
|
-
return length(type.typeParameters) === 1 && length(getBaseTypes(type)) === 1 && isTypeReferenceWithGenericArguments(getBaseTypes(type)[0]) && getVariances(getBaseTypes(type)[0].target) === arrayVariances && length(getTypeArguments(getBaseTypes(type)[0])) === 1 && getTypeArguments(getBaseTypes(type)[0])[0] === type.typeParameters[0];
|
|
67206
|
+
return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters);
|
|
67098
67207
|
}
|
|
67099
67208
|
function getAliasVariances(symbol) {
|
|
67100
67209
|
return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters);
|
|
@@ -69086,7 +69195,10 @@ function createTypeChecker(host) {
|
|
|
69086
69195
|
node,
|
|
69087
69196
|
!isWriteOnlyAccess(node),
|
|
69088
69197
|
/*excludeGlobals*/
|
|
69089
|
-
false
|
|
69198
|
+
false,
|
|
69199
|
+
/*getSpellingSuggestions*/
|
|
69200
|
+
void 0,
|
|
69201
|
+
isWriteAccess(node)
|
|
69090
69202
|
) || unknownSymbol;
|
|
69091
69203
|
}
|
|
69092
69204
|
return links.resolvedSymbol;
|
|
@@ -74520,6 +74632,8 @@ function createTypeChecker(host) {
|
|
|
74520
74632
|
false,
|
|
74521
74633
|
/*getSpellingSuggestions*/
|
|
74522
74634
|
true,
|
|
74635
|
+
/*isWritten*/
|
|
74636
|
+
false,
|
|
74523
74637
|
(symbols, name, meaning2) => {
|
|
74524
74638
|
Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
74525
74639
|
const symbol = getSymbol2(symbols, name, meaning2);
|
|
@@ -79974,7 +80088,7 @@ function createTypeChecker(host) {
|
|
|
79974
80088
|
}
|
|
79975
80089
|
}
|
|
79976
80090
|
if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) {
|
|
79977
|
-
|
|
80091
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
79978
80092
|
}
|
|
79979
80093
|
}
|
|
79980
80094
|
}
|
|
@@ -80519,7 +80633,7 @@ function createTypeChecker(host) {
|
|
|
80519
80633
|
}
|
|
80520
80634
|
}
|
|
80521
80635
|
}
|
|
80522
|
-
|
|
80636
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
80523
80637
|
}
|
|
80524
80638
|
function checkTemplateLiteralType(node) {
|
|
80525
80639
|
for (const span of node.templateSpans) {
|
|
@@ -80531,16 +80645,8 @@ function createTypeChecker(host) {
|
|
|
80531
80645
|
}
|
|
80532
80646
|
function checkImportType(node) {
|
|
80533
80647
|
checkSourceElement(node.argument);
|
|
80534
|
-
if (node.
|
|
80535
|
-
|
|
80536
|
-
if (override) {
|
|
80537
|
-
if (!isNightly()) {
|
|
80538
|
-
grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
|
|
80539
|
-
}
|
|
80540
|
-
if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
|
|
80541
|
-
grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
80542
|
-
}
|
|
80543
|
-
}
|
|
80648
|
+
if (node.attributes) {
|
|
80649
|
+
getResolutionModeOverride(node.attributes, grammarErrorOnNode);
|
|
80544
80650
|
}
|
|
80545
80651
|
checkTypeReferenceOrImport(node);
|
|
80546
80652
|
}
|
|
@@ -81513,25 +81619,27 @@ function createTypeChecker(host) {
|
|
|
81513
81619
|
}
|
|
81514
81620
|
}
|
|
81515
81621
|
}
|
|
81516
|
-
function
|
|
81517
|
-
addLazyDiagnostic(
|
|
81518
|
-
function
|
|
81622
|
+
function registerForUnusedOrUninitializedIdentifiersCheck(node) {
|
|
81623
|
+
addLazyDiagnostic(registerForUnusedOrUninitializedIdentifiersCheckDiagnostics);
|
|
81624
|
+
function registerForUnusedOrUninitializedIdentifiersCheckDiagnostics() {
|
|
81519
81625
|
const sourceFile = getSourceFileOfNode(node);
|
|
81520
|
-
let
|
|
81521
|
-
if (!
|
|
81522
|
-
|
|
81523
|
-
|
|
81626
|
+
let potentiallyUnusedOrUninitializedIdentifiers = allPotentiallyUnusedOrUninitializedIdentifiers.get(sourceFile.path);
|
|
81627
|
+
if (!potentiallyUnusedOrUninitializedIdentifiers) {
|
|
81628
|
+
potentiallyUnusedOrUninitializedIdentifiers = [];
|
|
81629
|
+
allPotentiallyUnusedOrUninitializedIdentifiers.set(sourceFile.path, potentiallyUnusedOrUninitializedIdentifiers);
|
|
81524
81630
|
}
|
|
81525
|
-
|
|
81631
|
+
potentiallyUnusedOrUninitializedIdentifiers.push(node);
|
|
81526
81632
|
}
|
|
81527
81633
|
}
|
|
81528
|
-
function
|
|
81634
|
+
function checkUnusedOrUninitializedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic, checkUnused, checkUninitialized) {
|
|
81529
81635
|
for (const node of potentiallyUnusedIdentifiers) {
|
|
81530
81636
|
switch (node.kind) {
|
|
81531
81637
|
case 263 /* ClassDeclaration */:
|
|
81532
81638
|
case 231 /* ClassExpression */:
|
|
81533
|
-
|
|
81534
|
-
|
|
81639
|
+
if (checkUnused) {
|
|
81640
|
+
checkUnusedClassMembers(node, addDiagnostic);
|
|
81641
|
+
checkUnusedTypeParameters(node, addDiagnostic);
|
|
81642
|
+
}
|
|
81535
81643
|
break;
|
|
81536
81644
|
case 312 /* SourceFile */:
|
|
81537
81645
|
case 267 /* ModuleDeclaration */:
|
|
@@ -81540,7 +81648,12 @@ function createTypeChecker(host) {
|
|
|
81540
81648
|
case 248 /* ForStatement */:
|
|
81541
81649
|
case 249 /* ForInStatement */:
|
|
81542
81650
|
case 250 /* ForOfStatement */:
|
|
81543
|
-
|
|
81651
|
+
if (checkUnused) {
|
|
81652
|
+
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
|
81653
|
+
}
|
|
81654
|
+
if (checkUninitialized) {
|
|
81655
|
+
checkUninitializedLocals(node);
|
|
81656
|
+
}
|
|
81544
81657
|
break;
|
|
81545
81658
|
case 176 /* Constructor */:
|
|
81546
81659
|
case 218 /* FunctionExpression */:
|
|
@@ -81549,10 +81662,15 @@ function createTypeChecker(host) {
|
|
|
81549
81662
|
case 174 /* MethodDeclaration */:
|
|
81550
81663
|
case 177 /* GetAccessor */:
|
|
81551
81664
|
case 178 /* SetAccessor */:
|
|
81552
|
-
if (
|
|
81553
|
-
|
|
81665
|
+
if (checkUnused) {
|
|
81666
|
+
if (node.body) {
|
|
81667
|
+
checkUnusedLocalsAndParameters(node, addDiagnostic);
|
|
81668
|
+
}
|
|
81669
|
+
checkUnusedTypeParameters(node, addDiagnostic);
|
|
81670
|
+
}
|
|
81671
|
+
if (checkUninitialized) {
|
|
81672
|
+
checkUninitializedLocals(node);
|
|
81554
81673
|
}
|
|
81555
|
-
checkUnusedTypeParameters(node, addDiagnostic);
|
|
81556
81674
|
break;
|
|
81557
81675
|
case 173 /* MethodSignature */:
|
|
81558
81676
|
case 179 /* CallSignature */:
|
|
@@ -81561,10 +81679,14 @@ function createTypeChecker(host) {
|
|
|
81561
81679
|
case 185 /* ConstructorType */:
|
|
81562
81680
|
case 265 /* TypeAliasDeclaration */:
|
|
81563
81681
|
case 264 /* InterfaceDeclaration */:
|
|
81564
|
-
|
|
81682
|
+
if (checkUnused) {
|
|
81683
|
+
checkUnusedTypeParameters(node, addDiagnostic);
|
|
81684
|
+
}
|
|
81565
81685
|
break;
|
|
81566
81686
|
case 195 /* InferType */:
|
|
81567
|
-
|
|
81687
|
+
if (checkUnused) {
|
|
81688
|
+
checkUnusedInferTypeParameter(node, addDiagnostic);
|
|
81689
|
+
}
|
|
81568
81690
|
break;
|
|
81569
81691
|
default:
|
|
81570
81692
|
Debug.assertNever(node, "Node should not have been registered for unused identifiers check");
|
|
@@ -81754,6 +81876,26 @@ function createTypeChecker(host) {
|
|
|
81754
81876
|
}
|
|
81755
81877
|
});
|
|
81756
81878
|
}
|
|
81879
|
+
function checkUninitializedLocals(nodeWithLocals) {
|
|
81880
|
+
nodeWithLocals.locals.forEach((local) => {
|
|
81881
|
+
if (!(local.flags & 3 /* Variable */) || local.isInitialized || !local.isReferenced) {
|
|
81882
|
+
return;
|
|
81883
|
+
}
|
|
81884
|
+
const declaration = local.valueDeclaration;
|
|
81885
|
+
if (!declaration) {
|
|
81886
|
+
return;
|
|
81887
|
+
}
|
|
81888
|
+
if (isVariableDeclaration(declaration)) {
|
|
81889
|
+
if (getCombinedNodeFlagsCached(declaration) & 33554432 /* Ambient */ || declaration.exclamationToken || declaration.initializer || !declaration.type) {
|
|
81890
|
+
return;
|
|
81891
|
+
}
|
|
81892
|
+
const type = getTypeFromTypeNode(declaration.type);
|
|
81893
|
+
if (!(type.flags & 3 /* AnyOrUnknown */) && !containsUndefinedType(type)) {
|
|
81894
|
+
error2(declaration, Diagnostics.Variable_0_is_used_before_being_assigned, idText(declaration.name));
|
|
81895
|
+
}
|
|
81896
|
+
}
|
|
81897
|
+
});
|
|
81898
|
+
}
|
|
81757
81899
|
function checkPotentialUncheckedRenamedBindingElementsInTypes() {
|
|
81758
81900
|
var _a;
|
|
81759
81901
|
for (const node of potentialUnusedRenamedBindingElementsInTypes) {
|
|
@@ -81800,7 +81942,7 @@ function createTypeChecker(host) {
|
|
|
81800
81942
|
forEach(node.statements, checkSourceElement);
|
|
81801
81943
|
}
|
|
81802
81944
|
if (node.locals) {
|
|
81803
|
-
|
|
81945
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
81804
81946
|
}
|
|
81805
81947
|
}
|
|
81806
81948
|
function checkCollisionWithArgumentsInGeneratedCode(node) {
|
|
@@ -82350,7 +82492,7 @@ function createTypeChecker(host) {
|
|
|
82350
82492
|
checkExpression(node.incrementor);
|
|
82351
82493
|
checkSourceElement(node.statement);
|
|
82352
82494
|
if (node.locals) {
|
|
82353
|
-
|
|
82495
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
82354
82496
|
}
|
|
82355
82497
|
}
|
|
82356
82498
|
function checkForOfStatement(node) {
|
|
@@ -82389,7 +82531,7 @@ function createTypeChecker(host) {
|
|
|
82389
82531
|
}
|
|
82390
82532
|
checkSourceElement(node.statement);
|
|
82391
82533
|
if (node.locals) {
|
|
82392
|
-
|
|
82534
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
82393
82535
|
}
|
|
82394
82536
|
}
|
|
82395
82537
|
function checkForInStatement(node) {
|
|
@@ -82421,7 +82563,7 @@ function createTypeChecker(host) {
|
|
|
82421
82563
|
}
|
|
82422
82564
|
checkSourceElement(node.statement);
|
|
82423
82565
|
if (node.locals) {
|
|
82424
|
-
|
|
82566
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
82425
82567
|
}
|
|
82426
82568
|
}
|
|
82427
82569
|
function checkRightHandSideOfForOf(statement) {
|
|
@@ -83153,7 +83295,7 @@ function createTypeChecker(host) {
|
|
|
83153
83295
|
}
|
|
83154
83296
|
});
|
|
83155
83297
|
if (node.caseBlock.locals) {
|
|
83156
|
-
|
|
83298
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node.caseBlock);
|
|
83157
83299
|
}
|
|
83158
83300
|
}
|
|
83159
83301
|
function checkLabeledStatement(node) {
|
|
@@ -83493,7 +83635,7 @@ function createTypeChecker(host) {
|
|
|
83493
83635
|
}
|
|
83494
83636
|
function checkClassExpressionDeferred(node) {
|
|
83495
83637
|
forEach(node.members, checkSourceElement);
|
|
83496
|
-
|
|
83638
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
83497
83639
|
}
|
|
83498
83640
|
function checkClassDeclaration(node) {
|
|
83499
83641
|
const firstDecorator = find(node.modifiers, isDecorator);
|
|
@@ -83505,7 +83647,7 @@ function createTypeChecker(host) {
|
|
|
83505
83647
|
}
|
|
83506
83648
|
checkClassLikeDeclaration(node);
|
|
83507
83649
|
forEach(node.members, checkSourceElement);
|
|
83508
|
-
|
|
83650
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
83509
83651
|
}
|
|
83510
83652
|
function checkClassLikeDeclaration(node) {
|
|
83511
83653
|
checkGrammarClassLikeDeclaration(node);
|
|
@@ -84066,7 +84208,7 @@ function createTypeChecker(host) {
|
|
|
84066
84208
|
forEach(node.members, checkSourceElement);
|
|
84067
84209
|
addLazyDiagnostic(() => {
|
|
84068
84210
|
checkTypeForDuplicateIndexSignatures(node);
|
|
84069
|
-
|
|
84211
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
84070
84212
|
});
|
|
84071
84213
|
}
|
|
84072
84214
|
function checkTypeAliasDeclaration(node) {
|
|
@@ -84080,7 +84222,7 @@ function createTypeChecker(host) {
|
|
|
84080
84222
|
}
|
|
84081
84223
|
} else {
|
|
84082
84224
|
checkSourceElement(node.type);
|
|
84083
|
-
|
|
84225
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
84084
84226
|
}
|
|
84085
84227
|
}
|
|
84086
84228
|
function computeEnumMemberValues(node) {
|
|
@@ -84351,7 +84493,7 @@ function createTypeChecker(host) {
|
|
|
84351
84493
|
if (node.body) {
|
|
84352
84494
|
checkSourceElement(node.body);
|
|
84353
84495
|
if (!isGlobalScopeAugmentation(node)) {
|
|
84354
|
-
|
|
84496
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
84355
84497
|
}
|
|
84356
84498
|
}
|
|
84357
84499
|
addLazyDiagnostic(checkModuleDeclarationDiagnostics);
|
|
@@ -84504,12 +84646,13 @@ function createTypeChecker(host) {
|
|
|
84504
84646
|
return false;
|
|
84505
84647
|
}
|
|
84506
84648
|
}
|
|
84507
|
-
if (!isImportEqualsDeclaration(node) && node.
|
|
84649
|
+
if (!isImportEqualsDeclaration(node) && node.attributes) {
|
|
84650
|
+
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;
|
|
84508
84651
|
let hasError = false;
|
|
84509
|
-
for (const
|
|
84510
|
-
if (!isStringLiteral(
|
|
84652
|
+
for (const attr of node.attributes.elements) {
|
|
84653
|
+
if (!isStringLiteral(attr.value)) {
|
|
84511
84654
|
hasError = true;
|
|
84512
|
-
error2(
|
|
84655
|
+
error2(attr.value, diagnostic);
|
|
84513
84656
|
}
|
|
84514
84657
|
}
|
|
84515
84658
|
return !hasError;
|
|
@@ -84641,32 +84784,26 @@ function createTypeChecker(host) {
|
|
|
84641
84784
|
checkExternalEmitHelpers(node, 131072 /* ImportDefault */);
|
|
84642
84785
|
}
|
|
84643
84786
|
}
|
|
84644
|
-
function
|
|
84787
|
+
function checkImportAttributes(declaration) {
|
|
84645
84788
|
var _a;
|
|
84646
|
-
|
|
84647
|
-
|
|
84648
|
-
const
|
|
84649
|
-
|
|
84650
|
-
|
|
84651
|
-
|
|
84652
|
-
}
|
|
84653
|
-
if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) {
|
|
84654
|
-
return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
84655
|
-
}
|
|
84789
|
+
const node = declaration.attributes;
|
|
84790
|
+
if (node) {
|
|
84791
|
+
const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
84792
|
+
const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0);
|
|
84793
|
+
const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */;
|
|
84794
|
+
if (validForTypeAttributes && override) {
|
|
84656
84795
|
return;
|
|
84657
84796
|
}
|
|
84658
84797
|
const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
84659
84798
|
if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) {
|
|
84660
|
-
|
|
84661
|
-
|
|
84662
|
-
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
|
|
84663
|
-
);
|
|
84799
|
+
const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_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_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext;
|
|
84800
|
+
return grammarErrorOnNode(node, message);
|
|
84664
84801
|
}
|
|
84665
84802
|
if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
84666
|
-
return grammarErrorOnNode(
|
|
84803
|
+
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);
|
|
84667
84804
|
}
|
|
84668
84805
|
if (override) {
|
|
84669
|
-
return grammarErrorOnNode(
|
|
84806
|
+
return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports);
|
|
84670
84807
|
}
|
|
84671
84808
|
}
|
|
84672
84809
|
}
|
|
@@ -84698,7 +84835,7 @@ function createTypeChecker(host) {
|
|
|
84698
84835
|
}
|
|
84699
84836
|
}
|
|
84700
84837
|
}
|
|
84701
|
-
|
|
84838
|
+
checkImportAttributes(node);
|
|
84702
84839
|
}
|
|
84703
84840
|
function checkImportEqualsDeclaration(node) {
|
|
84704
84841
|
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)) {
|
|
@@ -84771,7 +84908,7 @@ function createTypeChecker(host) {
|
|
|
84771
84908
|
}
|
|
84772
84909
|
}
|
|
84773
84910
|
}
|
|
84774
|
-
|
|
84911
|
+
checkImportAttributes(node);
|
|
84775
84912
|
}
|
|
84776
84913
|
function checkGrammarExportDeclaration(node) {
|
|
84777
84914
|
var _a;
|
|
@@ -85354,8 +85491,8 @@ function createTypeChecker(host) {
|
|
|
85354
85491
|
return Debug.assertNever(kind);
|
|
85355
85492
|
}
|
|
85356
85493
|
}
|
|
85357
|
-
function
|
|
85358
|
-
return
|
|
85494
|
+
function getPotentiallyUnusedOrUninitializedIdentifiers(sourceFile) {
|
|
85495
|
+
return allPotentiallyUnusedOrUninitializedIdentifiers.get(sourceFile.path) || emptyArray;
|
|
85359
85496
|
}
|
|
85360
85497
|
function checkSourceFileWorker(node) {
|
|
85361
85498
|
const links = getNodeLinks(node);
|
|
@@ -85373,15 +85510,21 @@ function createTypeChecker(host) {
|
|
|
85373
85510
|
checkSourceElement(node.endOfFileToken);
|
|
85374
85511
|
checkDeferredNodes(node);
|
|
85375
85512
|
if (isExternalOrCommonJsModule(node)) {
|
|
85376
|
-
|
|
85513
|
+
registerForUnusedOrUninitializedIdentifiersCheck(node);
|
|
85377
85514
|
}
|
|
85378
85515
|
addLazyDiagnostic(() => {
|
|
85379
|
-
|
|
85380
|
-
|
|
85381
|
-
|
|
85382
|
-
|
|
85383
|
-
|
|
85384
|
-
|
|
85516
|
+
const checkUnused = !node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters);
|
|
85517
|
+
if (checkUnused || strictNullChecks) {
|
|
85518
|
+
checkUnusedOrUninitializedIdentifiers(
|
|
85519
|
+
getPotentiallyUnusedOrUninitializedIdentifiers(node),
|
|
85520
|
+
(containingNode, kind, diag2) => {
|
|
85521
|
+
if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) {
|
|
85522
|
+
diagnostics.add(diag2);
|
|
85523
|
+
}
|
|
85524
|
+
},
|
|
85525
|
+
checkUnused,
|
|
85526
|
+
strictNullChecks
|
|
85527
|
+
);
|
|
85385
85528
|
}
|
|
85386
85529
|
if (!node.isDeclarationFile) {
|
|
85387
85530
|
checkPotentialUncheckedRenamedBindingElementsInTypes();
|
|
@@ -88561,12 +88704,12 @@ function createTypeChecker(host) {
|
|
|
88561
88704
|
if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) {
|
|
88562
88705
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
88563
88706
|
if (nodeArguments.length > 1) {
|
|
88564
|
-
const
|
|
88565
|
-
return grammarErrorOnNode(
|
|
88707
|
+
const importAttributesArgument = nodeArguments[1];
|
|
88708
|
+
return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);
|
|
88566
88709
|
}
|
|
88567
88710
|
}
|
|
88568
88711
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
88569
|
-
return grammarErrorOnNode(node, Diagnostics.
|
|
88712
|
+
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);
|
|
88570
88713
|
}
|
|
88571
88714
|
const spreadElement = find(nodeArguments, isSpreadElement);
|
|
88572
88715
|
if (spreadElement) {
|
|
@@ -88833,13 +88976,6 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl {
|
|
|
88833
88976
|
this.inner.reportNonSerializableProperty(propertyName);
|
|
88834
88977
|
}
|
|
88835
88978
|
}
|
|
88836
|
-
reportImportTypeNodeResolutionModeOverride() {
|
|
88837
|
-
var _a;
|
|
88838
|
-
if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) {
|
|
88839
|
-
this.onDiagnosticReported();
|
|
88840
|
-
this.inner.reportImportTypeNodeResolutionModeOverride();
|
|
88841
|
-
}
|
|
88842
|
-
}
|
|
88843
88979
|
onDiagnosticReported() {
|
|
88844
88980
|
this.context.reportedDiagnostic = true;
|
|
88845
88981
|
}
|
|
@@ -89348,7 +89484,7 @@ var visitEachChildTable = {
|
|
|
89348
89484
|
return context.factory.updateImportTypeNode(
|
|
89349
89485
|
node,
|
|
89350
89486
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
89351
|
-
nodeVisitor(node.
|
|
89487
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes),
|
|
89352
89488
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
89353
89489
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
89354
89490
|
node.isTypeOf
|
|
@@ -89899,20 +90035,20 @@ var visitEachChildTable = {
|
|
|
89899
90035
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
89900
90036
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
89901
90037
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
89902
|
-
nodeVisitor(node.
|
|
90038
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
89903
90039
|
);
|
|
89904
90040
|
},
|
|
89905
|
-
[300 /*
|
|
89906
|
-
return context.factory.
|
|
90041
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
90042
|
+
return context.factory.updateImportAttributes(
|
|
89907
90043
|
node,
|
|
89908
|
-
nodesVisitor(node.elements, visitor,
|
|
90044
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
89909
90045
|
node.multiLine
|
|
89910
90046
|
);
|
|
89911
90047
|
},
|
|
89912
|
-
[301 /*
|
|
89913
|
-
return context.factory.
|
|
90048
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
90049
|
+
return context.factory.updateImportAttribute(
|
|
89914
90050
|
node,
|
|
89915
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
90051
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
89916
90052
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
89917
90053
|
);
|
|
89918
90054
|
},
|
|
@@ -89964,7 +90100,7 @@ var visitEachChildTable = {
|
|
|
89964
90100
|
node.isTypeOnly,
|
|
89965
90101
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
89966
90102
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
89967
|
-
nodeVisitor(node.
|
|
90103
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
89968
90104
|
);
|
|
89969
90105
|
},
|
|
89970
90106
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -93454,7 +93590,7 @@ function transformTypeScript(context) {
|
|
|
93454
93590
|
void 0,
|
|
93455
93591
|
importClause,
|
|
93456
93592
|
node.moduleSpecifier,
|
|
93457
|
-
node.
|
|
93593
|
+
node.attributes
|
|
93458
93594
|
) : void 0;
|
|
93459
93595
|
}
|
|
93460
93596
|
function visitImportClause(node) {
|
|
@@ -93504,7 +93640,7 @@ function transformTypeScript(context) {
|
|
|
93504
93640
|
node.isTypeOnly,
|
|
93505
93641
|
exportClause,
|
|
93506
93642
|
node.moduleSpecifier,
|
|
93507
|
-
node.
|
|
93643
|
+
node.attributes
|
|
93508
93644
|
) : void 0;
|
|
93509
93645
|
}
|
|
93510
93646
|
function visitNamedExports(node, allowEmpty) {
|
|
@@ -93538,7 +93674,7 @@ function transformTypeScript(context) {
|
|
|
93538
93674
|
/*importClause*/
|
|
93539
93675
|
void 0,
|
|
93540
93676
|
node.moduleReference.expression,
|
|
93541
|
-
/*
|
|
93677
|
+
/*attributes*/
|
|
93542
93678
|
void 0
|
|
93543
93679
|
),
|
|
93544
93680
|
node
|
|
@@ -101708,7 +101844,7 @@ function transformJsx(context) {
|
|
|
101708
101844
|
factory2.createNamedImports(arrayFrom(importSpecifiersMap.values()))
|
|
101709
101845
|
),
|
|
101710
101846
|
factory2.createStringLiteral(importSource),
|
|
101711
|
-
/*
|
|
101847
|
+
/*attributes*/
|
|
101712
101848
|
void 0
|
|
101713
101849
|
);
|
|
101714
101850
|
setParentRecursive(
|
|
@@ -111115,7 +111251,9 @@ function transformECMAScriptModule(context) {
|
|
|
111115
111251
|
)
|
|
111116
111252
|
])
|
|
111117
111253
|
),
|
|
111118
|
-
factory2.createStringLiteral("module")
|
|
111254
|
+
factory2.createStringLiteral("module"),
|
|
111255
|
+
/*attributes*/
|
|
111256
|
+
void 0
|
|
111119
111257
|
);
|
|
111120
111258
|
const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
111121
111259
|
const requireStatement = factory2.createVariableStatement(
|
|
@@ -111232,7 +111370,7 @@ function transformECMAScriptModule(context) {
|
|
|
111232
111370
|
)
|
|
111233
111371
|
),
|
|
111234
111372
|
node.moduleSpecifier,
|
|
111235
|
-
node.
|
|
111373
|
+
node.attributes
|
|
111236
111374
|
);
|
|
111237
111375
|
setOriginalNode(importDecl, node.exportClause);
|
|
111238
111376
|
const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration(
|
|
@@ -111685,8 +111823,7 @@ function transformDeclarations(context) {
|
|
|
111685
111823
|
trackReferencedAmbientModule,
|
|
111686
111824
|
trackExternalModuleSymbolOfImportTypeNode,
|
|
111687
111825
|
reportNonlocalAugmentation,
|
|
111688
|
-
reportNonSerializableProperty
|
|
111689
|
-
reportImportTypeNodeResolutionModeOverride
|
|
111826
|
+
reportNonSerializableProperty
|
|
111690
111827
|
};
|
|
111691
111828
|
let errorNameNode;
|
|
111692
111829
|
let errorFallbackNode;
|
|
@@ -111810,11 +111947,6 @@ function transformDeclarations(context) {
|
|
|
111810
111947
|
context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
|
|
111811
111948
|
}
|
|
111812
111949
|
}
|
|
111813
|
-
function reportImportTypeNodeResolutionModeOverride() {
|
|
111814
|
-
if (!isNightly() && (errorNameNode || errorFallbackNode)) {
|
|
111815
|
-
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));
|
|
111816
|
-
}
|
|
111817
|
-
}
|
|
111818
111950
|
function transformDeclarationsForJS(sourceFile, bundled) {
|
|
111819
111951
|
const oldDiag = getSymbolAccessibilityDiagnostic;
|
|
111820
111952
|
getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : {
|
|
@@ -112319,7 +112451,7 @@ function transformDeclarations(context) {
|
|
|
112319
112451
|
decl.modifiers,
|
|
112320
112452
|
decl.importClause,
|
|
112321
112453
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
112322
|
-
|
|
112454
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
112323
112455
|
);
|
|
112324
112456
|
}
|
|
112325
112457
|
const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0;
|
|
@@ -112335,7 +112467,7 @@ function transformDeclarations(context) {
|
|
|
112335
112467
|
void 0
|
|
112336
112468
|
),
|
|
112337
112469
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
112338
|
-
|
|
112470
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
112339
112471
|
);
|
|
112340
112472
|
}
|
|
112341
112473
|
if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) {
|
|
@@ -112353,7 +112485,7 @@ function transformDeclarations(context) {
|
|
|
112353
112485
|
namedBindings
|
|
112354
112486
|
),
|
|
112355
112487
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
112356
|
-
|
|
112488
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
112357
112489
|
) : void 0;
|
|
112358
112490
|
}
|
|
112359
112491
|
const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0);
|
|
@@ -112368,7 +112500,7 @@ function transformDeclarations(context) {
|
|
|
112368
112500
|
bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0
|
|
112369
112501
|
),
|
|
112370
112502
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
112371
|
-
|
|
112503
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
112372
112504
|
);
|
|
112373
112505
|
}
|
|
112374
112506
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
@@ -112378,19 +112510,13 @@ function transformDeclarations(context) {
|
|
|
112378
112510
|
/*importClause*/
|
|
112379
112511
|
void 0,
|
|
112380
112512
|
rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
112381
|
-
|
|
112513
|
+
tryGetResolutionModeOverride(decl.attributes)
|
|
112382
112514
|
);
|
|
112383
112515
|
}
|
|
112384
112516
|
}
|
|
112385
|
-
function
|
|
112386
|
-
const mode =
|
|
112387
|
-
|
|
112388
|
-
if (!isNightly()) {
|
|
112389
|
-
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));
|
|
112390
|
-
}
|
|
112391
|
-
return assertClause;
|
|
112392
|
-
}
|
|
112393
|
-
return void 0;
|
|
112517
|
+
function tryGetResolutionModeOverride(node) {
|
|
112518
|
+
const mode = getResolutionModeOverride(node);
|
|
112519
|
+
return node && mode !== void 0 ? node : void 0;
|
|
112394
112520
|
}
|
|
112395
112521
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
112396
112522
|
while (length(lateMarkedStatements)) {
|
|
@@ -112676,7 +112802,7 @@ function transformDeclarations(context) {
|
|
|
112676
112802
|
return cleanup(factory2.updateImportTypeNode(
|
|
112677
112803
|
input,
|
|
112678
112804
|
factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
|
|
112679
|
-
input.
|
|
112805
|
+
input.attributes,
|
|
112680
112806
|
input.qualifier,
|
|
112681
112807
|
visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode),
|
|
112682
112808
|
input.isTypeOf
|
|
@@ -112730,7 +112856,7 @@ function transformDeclarations(context) {
|
|
|
112730
112856
|
input.isTypeOnly,
|
|
112731
112857
|
input.exportClause,
|
|
112732
112858
|
rewriteModuleSpecifier(input, input.moduleSpecifier),
|
|
112733
|
-
|
|
112859
|
+
tryGetResolutionModeOverride(input.attributes)
|
|
112734
112860
|
);
|
|
112735
112861
|
}
|
|
112736
112862
|
case 277 /* ExportAssignment */: {
|
|
@@ -115236,10 +115362,10 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
115236
115362
|
return emitNamedExports(node);
|
|
115237
115363
|
case 281 /* ExportSpecifier */:
|
|
115238
115364
|
return emitExportSpecifier(node);
|
|
115239
|
-
case 300 /*
|
|
115240
|
-
return
|
|
115241
|
-
case 301 /*
|
|
115242
|
-
return
|
|
115365
|
+
case 300 /* ImportAttributes */:
|
|
115366
|
+
return emitImportAttributes(node);
|
|
115367
|
+
case 301 /* ImportAttribute */:
|
|
115368
|
+
return emitImportAttribute(node);
|
|
115243
115369
|
case 282 /* MissingDeclaration */:
|
|
115244
115370
|
return;
|
|
115245
115371
|
case 283 /* ExternalModuleReference */:
|
|
@@ -116014,16 +116140,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
116014
116140
|
writeKeyword("import");
|
|
116015
116141
|
writePunctuation("(");
|
|
116016
116142
|
emit(node.argument);
|
|
116017
|
-
if (node.
|
|
116143
|
+
if (node.attributes) {
|
|
116018
116144
|
writePunctuation(",");
|
|
116019
116145
|
writeSpace();
|
|
116020
116146
|
writePunctuation("{");
|
|
116021
116147
|
writeSpace();
|
|
116022
|
-
writeKeyword("assert");
|
|
116148
|
+
writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
|
|
116023
116149
|
writePunctuation(":");
|
|
116024
116150
|
writeSpace();
|
|
116025
|
-
const elements = node.
|
|
116026
|
-
emitList(node.
|
|
116151
|
+
const elements = node.attributes.elements;
|
|
116152
|
+
emitList(node.attributes, elements, 526226 /* ImportAttributes */);
|
|
116027
116153
|
writeSpace();
|
|
116028
116154
|
writePunctuation("}");
|
|
116029
116155
|
}
|
|
@@ -117012,8 +117138,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
117012
117138
|
writeSpace();
|
|
117013
117139
|
}
|
|
117014
117140
|
emitExpression(node.moduleSpecifier);
|
|
117015
|
-
if (node.
|
|
117016
|
-
emitWithLeadingSpace(node.
|
|
117141
|
+
if (node.attributes) {
|
|
117142
|
+
emitWithLeadingSpace(node.attributes);
|
|
117017
117143
|
}
|
|
117018
117144
|
writeTrailingSemicolon();
|
|
117019
117145
|
}
|
|
@@ -117082,18 +117208,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
117082
117208
|
writeSpace();
|
|
117083
117209
|
emitExpression(node.moduleSpecifier);
|
|
117084
117210
|
}
|
|
117085
|
-
if (node.
|
|
117086
|
-
emitWithLeadingSpace(node.
|
|
117211
|
+
if (node.attributes) {
|
|
117212
|
+
emitWithLeadingSpace(node.attributes);
|
|
117087
117213
|
}
|
|
117088
117214
|
writeTrailingSemicolon();
|
|
117089
117215
|
}
|
|
117090
|
-
function
|
|
117091
|
-
emitTokenWithComment(
|
|
117216
|
+
function emitImportAttributes(node) {
|
|
117217
|
+
emitTokenWithComment(node.token, node.pos, writeKeyword, node);
|
|
117092
117218
|
writeSpace();
|
|
117093
117219
|
const elements = node.elements;
|
|
117094
|
-
emitList(node, elements, 526226 /*
|
|
117220
|
+
emitList(node, elements, 526226 /* ImportAttributes */);
|
|
117095
117221
|
}
|
|
117096
|
-
function
|
|
117222
|
+
function emitImportAttribute(node) {
|
|
117097
117223
|
emit(node.name);
|
|
117098
117224
|
writePunctuation(":");
|
|
117099
117225
|
writeSpace();
|
|
@@ -120180,8 +120306,6 @@ function getModeForFileReference(ref, containingFileMode) {
|
|
|
120180
120306
|
return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
|
|
120181
120307
|
}
|
|
120182
120308
|
function getModeForResolutionAtIndex(file, index) {
|
|
120183
|
-
if (file.impliedNodeFormat === void 0)
|
|
120184
|
-
return void 0;
|
|
120185
120309
|
return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
|
|
120186
120310
|
}
|
|
120187
120311
|
function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
@@ -120195,42 +120319,48 @@ function isExclusivelyTypeOnlyImportOrExport(decl) {
|
|
|
120195
120319
|
return false;
|
|
120196
120320
|
}
|
|
120197
120321
|
function getModeForUsageLocation(file, usage) {
|
|
120198
|
-
var _a
|
|
120199
|
-
if (file.impliedNodeFormat === void 0)
|
|
120200
|
-
return void 0;
|
|
120322
|
+
var _a;
|
|
120201
120323
|
if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) {
|
|
120202
120324
|
const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
|
|
120203
120325
|
if (isTypeOnly) {
|
|
120204
|
-
const override =
|
|
120326
|
+
const override = getResolutionModeOverride(usage.parent.attributes);
|
|
120205
120327
|
if (override) {
|
|
120206
120328
|
return override;
|
|
120207
120329
|
}
|
|
120208
120330
|
}
|
|
120209
120331
|
}
|
|
120210
120332
|
if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) {
|
|
120211
|
-
const override =
|
|
120333
|
+
const override = getResolutionModeOverride(usage.parent.parent.attributes);
|
|
120212
120334
|
if (override) {
|
|
120213
120335
|
return override;
|
|
120214
120336
|
}
|
|
120215
120337
|
}
|
|
120338
|
+
if (file.impliedNodeFormat === void 0)
|
|
120339
|
+
return void 0;
|
|
120216
120340
|
if (file.impliedNodeFormat !== 99 /* ESNext */) {
|
|
120217
120341
|
return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
120218
120342
|
}
|
|
120219
|
-
const exprParentParent = (
|
|
120343
|
+
const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent;
|
|
120220
120344
|
return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */;
|
|
120221
120345
|
}
|
|
120222
|
-
function
|
|
120223
|
-
if (!
|
|
120346
|
+
function getResolutionModeOverride(node, grammarErrorOnNode) {
|
|
120347
|
+
if (!node)
|
|
120224
120348
|
return void 0;
|
|
120225
|
-
if (length(
|
|
120226
|
-
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
120349
|
+
if (length(node.elements) !== 1) {
|
|
120350
|
+
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
120351
|
+
node,
|
|
120352
|
+
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
|
|
120353
|
+
);
|
|
120227
120354
|
return void 0;
|
|
120228
120355
|
}
|
|
120229
|
-
const elem =
|
|
120356
|
+
const elem = node.elements[0];
|
|
120230
120357
|
if (!isStringLiteralLike(elem.name))
|
|
120231
120358
|
return void 0;
|
|
120232
120359
|
if (elem.name.text !== "resolution-mode") {
|
|
120233
|
-
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
120360
|
+
grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(
|
|
120361
|
+
elem.name,
|
|
120362
|
+
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
|
|
120363
|
+
);
|
|
120234
120364
|
return void 0;
|
|
120235
120365
|
}
|
|
120236
120366
|
if (!isStringLiteralLike(elem.value))
|
|
@@ -120529,7 +120659,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
120529
120659
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
120530
120660
|
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,
|
|
120531
120661
|
Diagnostics.Duplicate_label_0.code,
|
|
120532
|
-
Diagnostics.
|
|
120662
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
120533
120663
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
120534
120664
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
120535
120665
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|
|
@@ -122063,7 +122193,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122063
122193
|
/*importClause*/
|
|
122064
122194
|
void 0,
|
|
122065
122195
|
externalHelpersModuleReference,
|
|
122066
|
-
/*
|
|
122196
|
+
/*attributes*/
|
|
122067
122197
|
void 0
|
|
122068
122198
|
);
|
|
122069
122199
|
addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */);
|
|
@@ -122539,14 +122669,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122539
122669
|
const fileName = toFileNameLowerCase(ref.fileName);
|
|
122540
122670
|
resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective);
|
|
122541
122671
|
const mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
122542
|
-
if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) {
|
|
122543
|
-
(fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({
|
|
122544
|
-
kind: 2 /* ResolutionDiagnostics */,
|
|
122545
|
-
diagnostics: [
|
|
122546
|
-
createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext)
|
|
122547
|
-
]
|
|
122548
|
-
});
|
|
122549
|
-
}
|
|
122550
122672
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index });
|
|
122551
122673
|
}
|
|
122552
122674
|
}
|
|
@@ -132187,7 +132309,7 @@ function makeImport(defaultImport, namedImports, moduleSpecifier, quotePreferenc
|
|
|
132187
132309
|
void 0,
|
|
132188
132310
|
defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0,
|
|
132189
132311
|
typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier,
|
|
132190
|
-
/*
|
|
132312
|
+
/*attributes*/
|
|
132191
132313
|
void 0
|
|
132192
132314
|
);
|
|
132193
132315
|
}
|
|
@@ -137900,7 +138022,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam
|
|
|
137900
138022
|
}
|
|
137901
138023
|
case 205 /* ImportType */:
|
|
137902
138024
|
const importTypeNode = parent2;
|
|
137903
|
-
changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.
|
|
138025
|
+
changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf));
|
|
137904
138026
|
break;
|
|
137905
138027
|
default:
|
|
137906
138028
|
Debug.failBadSyntaxKind(parent2);
|
|
@@ -138175,7 +138297,7 @@ function updateImport(old, defaultImportName, elements) {
|
|
|
138175
138297
|
elements && elements.length ? factory.createNamedImports(elements) : void 0
|
|
138176
138298
|
),
|
|
138177
138299
|
old.moduleSpecifier,
|
|
138178
|
-
/*
|
|
138300
|
+
/*attributes*/
|
|
138179
138301
|
void 0
|
|
138180
138302
|
);
|
|
138181
138303
|
}
|
|
@@ -139017,7 +139139,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie
|
|
|
139017
139139
|
factory.createNamespaceImport(newNamespaceId)
|
|
139018
139140
|
),
|
|
139019
139141
|
newModuleString,
|
|
139020
|
-
/*
|
|
139142
|
+
/*attributes*/
|
|
139021
139143
|
void 0
|
|
139022
139144
|
);
|
|
139023
139145
|
case 271 /* ImportEqualsDeclaration */:
|
|
@@ -139306,7 +139428,7 @@ function filterImport(i, moduleSpecifier, keep) {
|
|
|
139306
139428
|
void 0,
|
|
139307
139429
|
factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings),
|
|
139308
139430
|
getSynthesizedDeepClone(moduleSpecifier),
|
|
139309
|
-
/*
|
|
139431
|
+
/*attributes*/
|
|
139310
139432
|
void 0
|
|
139311
139433
|
) : void 0;
|
|
139312
139434
|
}
|
|
@@ -139630,7 +139752,7 @@ function moveStatementsToTargetFile(changes, program, statements, targetFile, to
|
|
|
139630
139752
|
continue;
|
|
139631
139753
|
}
|
|
139632
139754
|
if (length(updatedElements) < length(elements)) {
|
|
139633
|
-
changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.
|
|
139755
|
+
changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes));
|
|
139634
139756
|
}
|
|
139635
139757
|
}
|
|
139636
139758
|
}
|
|
@@ -149769,7 +149891,7 @@ function fixSingleExportDeclaration(changes, exportSpecifier, context) {
|
|
|
149769
149891
|
false,
|
|
149770
149892
|
factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))),
|
|
149771
149893
|
exportDeclaration.moduleSpecifier,
|
|
149772
|
-
/*
|
|
149894
|
+
/*attributes*/
|
|
149773
149895
|
void 0
|
|
149774
149896
|
);
|
|
149775
149897
|
const typeExportDeclaration = factory.createExportDeclaration(
|
|
@@ -149779,7 +149901,7 @@ function fixSingleExportDeclaration(changes, exportSpecifier, context) {
|
|
|
149779
149901
|
true,
|
|
149780
149902
|
factory.createNamedExports(typeExportSpecifiers),
|
|
149781
149903
|
exportDeclaration.moduleSpecifier,
|
|
149782
|
-
/*
|
|
149904
|
+
/*attributes*/
|
|
149783
149905
|
void 0
|
|
149784
149906
|
);
|
|
149785
149907
|
changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, {
|
|
@@ -149912,7 +150034,7 @@ function doChange11(changes, sourceFile, declaration) {
|
|
|
149912
150034
|
true
|
|
149913
150035
|
),
|
|
149914
150036
|
getSynthesizedDeepClone(
|
|
149915
|
-
declaration.
|
|
150037
|
+
declaration.attributes,
|
|
149916
150038
|
/*includeTrivia*/
|
|
149917
150039
|
true
|
|
149918
150040
|
)
|
|
@@ -149940,7 +150062,7 @@ function doChange11(changes, sourceFile, declaration) {
|
|
|
149940
150062
|
true
|
|
149941
150063
|
),
|
|
149942
150064
|
getSynthesizedDeepClone(
|
|
149943
|
-
declaration.
|
|
150065
|
+
declaration.attributes,
|
|
149944
150066
|
/*includeTrivia*/
|
|
149945
150067
|
true
|
|
149946
150068
|
)
|
|
@@ -149963,7 +150085,7 @@ function doChange11(changes, sourceFile, declaration) {
|
|
|
149963
150085
|
true,
|
|
149964
150086
|
importClause.name,
|
|
149965
150087
|
newNamedBindings
|
|
149966
|
-
), declaration.moduleSpecifier, declaration.
|
|
150088
|
+
), declaration.moduleSpecifier, declaration.attributes);
|
|
149967
150089
|
changes.replaceNode(sourceFile, declaration, importDeclaration);
|
|
149968
150090
|
}
|
|
149969
150091
|
}
|
|
@@ -151462,7 +151584,7 @@ function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImp
|
|
|
151462
151584
|
factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name))
|
|
151463
151585
|
),
|
|
151464
151586
|
quotedModuleSpecifier,
|
|
151465
|
-
/*
|
|
151587
|
+
/*attributes*/
|
|
151466
151588
|
void 0
|
|
151467
151589
|
);
|
|
151468
151590
|
statements = combine(statements, declaration);
|
|
@@ -152041,7 +152163,7 @@ function updateExport(changes, program, sourceFile, node, names) {
|
|
|
152041
152163
|
)
|
|
152042
152164
|
),
|
|
152043
152165
|
node.moduleSpecifier,
|
|
152044
|
-
node.
|
|
152166
|
+
node.attributes
|
|
152045
152167
|
)
|
|
152046
152168
|
);
|
|
152047
152169
|
}
|
|
@@ -152058,7 +152180,7 @@ function createExport(changes, program, sourceFile, names) {
|
|
|
152058
152180
|
)),
|
|
152059
152181
|
/*moduleSpecifier*/
|
|
152060
152182
|
void 0,
|
|
152061
|
-
/*
|
|
152183
|
+
/*attributes*/
|
|
152062
152184
|
void 0
|
|
152063
152185
|
));
|
|
152064
152186
|
}
|
|
@@ -156733,7 +156855,7 @@ function doChange34(changes, sourceFile, info) {
|
|
|
156733
156855
|
namedImports
|
|
156734
156856
|
),
|
|
156735
156857
|
required,
|
|
156736
|
-
/*
|
|
156858
|
+
/*attributes*/
|
|
156737
156859
|
void 0
|
|
156738
156860
|
)
|
|
156739
156861
|
);
|
|
@@ -156872,7 +156994,7 @@ function doChange36(changes, sourceFile, importType) {
|
|
|
156872
156994
|
const newTypeNode = factory.updateImportTypeNode(
|
|
156873
156995
|
importType,
|
|
156874
156996
|
importType.argument,
|
|
156875
|
-
importType.
|
|
156997
|
+
importType.attributes,
|
|
156876
156998
|
importType.qualifier,
|
|
156877
156999
|
importType.typeArguments,
|
|
156878
157000
|
/*isTypeOf*/
|
|
@@ -157103,7 +157225,7 @@ function splitTypeOnlyImport(changes, importDeclaration, context) {
|
|
|
157103
157225
|
void 0
|
|
157104
157226
|
),
|
|
157105
157227
|
importDeclaration.moduleSpecifier,
|
|
157106
|
-
importDeclaration.
|
|
157228
|
+
importDeclaration.attributes
|
|
157107
157229
|
)
|
|
157108
157230
|
);
|
|
157109
157231
|
changes.insertNodeAfter(
|
|
@@ -157120,7 +157242,7 @@ function splitTypeOnlyImport(changes, importDeclaration, context) {
|
|
|
157120
157242
|
importClause.namedBindings
|
|
157121
157243
|
),
|
|
157122
157244
|
importDeclaration.moduleSpecifier,
|
|
157123
|
-
importDeclaration.
|
|
157245
|
+
importDeclaration.attributes
|
|
157124
157246
|
)
|
|
157125
157247
|
);
|
|
157126
157248
|
}
|
|
@@ -166209,7 +166331,7 @@ function removeUnusedImports(oldImports, sourceFile, program) {
|
|
|
166209
166331
|
/*importClause*/
|
|
166210
166332
|
void 0,
|
|
166211
166333
|
moduleSpecifier,
|
|
166212
|
-
/*
|
|
166334
|
+
/*attributes*/
|
|
166213
166335
|
void 0
|
|
166214
166336
|
));
|
|
166215
166337
|
} else {
|
|
@@ -166375,7 +166497,7 @@ function coalesceExportsWorker(exportGroup, comparer) {
|
|
|
166375
166497
|
exportDecl.isTypeOnly,
|
|
166376
166498
|
exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)),
|
|
166377
166499
|
exportDecl.moduleSpecifier,
|
|
166378
|
-
exportDecl.
|
|
166500
|
+
exportDecl.attributes
|
|
166379
166501
|
)
|
|
166380
166502
|
);
|
|
166381
166503
|
}
|
|
@@ -166407,7 +166529,7 @@ function updateImportDeclarationAndClause(importDeclaration, name, namedBindings
|
|
|
166407
166529
|
factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings),
|
|
166408
166530
|
// TODO: GH#18217
|
|
166409
166531
|
importDeclaration.moduleSpecifier,
|
|
166410
|
-
importDeclaration.
|
|
166532
|
+
importDeclaration.attributes
|
|
166411
166533
|
);
|
|
166412
166534
|
}
|
|
166413
166535
|
function sortSpecifiers(specifiers, comparer) {
|
|
@@ -166902,10 +167024,11 @@ function getOutliningSpanForNode(n, sourceFile) {
|
|
|
166902
167024
|
return spanForParenthesizedExpression(n);
|
|
166903
167025
|
case 275 /* NamedImports */:
|
|
166904
167026
|
case 279 /* NamedExports */:
|
|
167027
|
+
case 300 /* ImportAttributes */:
|
|
166905
167028
|
case 300 /* AssertClause */:
|
|
166906
|
-
return
|
|
167029
|
+
return spanForImportExportElements(n);
|
|
166907
167030
|
}
|
|
166908
|
-
function
|
|
167031
|
+
function spanForImportExportElements(node) {
|
|
166909
167032
|
if (!node.elements.length) {
|
|
166910
167033
|
return void 0;
|
|
166911
167034
|
}
|
|
@@ -173614,7 +173737,7 @@ __export(ts_exports2, {
|
|
|
173614
173737
|
getRenameLocation: () => getRenameLocation,
|
|
173615
173738
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
173616
173739
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
173617
|
-
|
|
173740
|
+
getResolutionModeOverride: () => getResolutionModeOverride,
|
|
173618
173741
|
getResolveJsonModule: () => getResolveJsonModule,
|
|
173619
173742
|
getResolvePackageJsonExports: () => getResolvePackageJsonExports,
|
|
173620
173743
|
getResolvePackageJsonImports: () => getResolvePackageJsonImports,
|
|
@@ -173746,6 +173869,7 @@ __export(ts_exports2, {
|
|
|
173746
173869
|
hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName,
|
|
173747
173870
|
hasQuestionToken: () => hasQuestionToken,
|
|
173748
173871
|
hasRecordedExternalHelpers: () => hasRecordedExternalHelpers,
|
|
173872
|
+
hasResolutionModeOverride: () => hasResolutionModeOverride,
|
|
173749
173873
|
hasRestParameter: () => hasRestParameter,
|
|
173750
173874
|
hasScopeMarker: () => hasScopeMarker,
|
|
173751
173875
|
hasStaticModifier: () => hasStaticModifier,
|
|
@@ -173819,7 +173943,6 @@ __export(ts_exports2, {
|
|
|
173819
173943
|
isAssertClause: () => isAssertClause,
|
|
173820
173944
|
isAssertEntry: () => isAssertEntry,
|
|
173821
173945
|
isAssertionExpression: () => isAssertionExpression,
|
|
173822
|
-
isAssertionKey: () => isAssertionKey,
|
|
173823
173946
|
isAssertsKeyword: () => isAssertsKeyword,
|
|
173824
173947
|
isAssignmentDeclaration: () => isAssignmentDeclaration,
|
|
173825
173948
|
isAssignmentExpression: () => isAssignmentExpression,
|
|
@@ -174029,6 +174152,9 @@ __export(ts_exports2, {
|
|
|
174029
174152
|
isIfStatement: () => isIfStatement,
|
|
174030
174153
|
isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching,
|
|
174031
174154
|
isImplicitGlob: () => isImplicitGlob,
|
|
174155
|
+
isImportAttribute: () => isImportAttribute,
|
|
174156
|
+
isImportAttributeName: () => isImportAttributeName,
|
|
174157
|
+
isImportAttributes: () => isImportAttributes,
|
|
174032
174158
|
isImportCall: () => isImportCall,
|
|
174033
174159
|
isImportClause: () => isImportClause,
|
|
174034
174160
|
isImportDeclaration: () => isImportDeclaration,
|
|
@@ -174220,7 +174346,6 @@ __export(ts_exports2, {
|
|
|
174220
174346
|
isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration,
|
|
174221
174347
|
isNewExpression: () => isNewExpression,
|
|
174222
174348
|
isNewExpressionTarget: () => isNewExpressionTarget,
|
|
174223
|
-
isNightly: () => isNightly,
|
|
174224
174349
|
isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral,
|
|
174225
174350
|
isNode: () => isNode,
|
|
174226
174351
|
isNodeArray: () => isNodeArray,
|
|
@@ -188293,7 +188418,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188293
188418
|
getRenameLocation,
|
|
188294
188419
|
getReplacementSpanForContextToken,
|
|
188295
188420
|
getResolutionDiagnostic,
|
|
188296
|
-
|
|
188421
|
+
getResolutionModeOverride,
|
|
188297
188422
|
getResolveJsonModule,
|
|
188298
188423
|
getResolvePackageJsonExports,
|
|
188299
188424
|
getResolvePackageJsonImports,
|
|
@@ -188425,6 +188550,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188425
188550
|
hasPropertyAccessExpressionWithName,
|
|
188426
188551
|
hasQuestionToken,
|
|
188427
188552
|
hasRecordedExternalHelpers,
|
|
188553
|
+
hasResolutionModeOverride,
|
|
188428
188554
|
hasRestParameter,
|
|
188429
188555
|
hasScopeMarker,
|
|
188430
188556
|
hasStaticModifier,
|
|
@@ -188498,7 +188624,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188498
188624
|
isAssertClause,
|
|
188499
188625
|
isAssertEntry,
|
|
188500
188626
|
isAssertionExpression,
|
|
188501
|
-
isAssertionKey,
|
|
188502
188627
|
isAssertsKeyword,
|
|
188503
188628
|
isAssignmentDeclaration,
|
|
188504
188629
|
isAssignmentExpression,
|
|
@@ -188708,6 +188833,9 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188708
188833
|
isIfStatement,
|
|
188709
188834
|
isIgnoredFileFromWildCardWatching,
|
|
188710
188835
|
isImplicitGlob,
|
|
188836
|
+
isImportAttribute,
|
|
188837
|
+
isImportAttributeName,
|
|
188838
|
+
isImportAttributes,
|
|
188711
188839
|
isImportCall,
|
|
188712
188840
|
isImportClause,
|
|
188713
188841
|
isImportDeclaration,
|
|
@@ -188899,7 +189027,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188899
189027
|
isNamespaceReexportDeclaration,
|
|
188900
189028
|
isNewExpression,
|
|
188901
189029
|
isNewExpressionTarget,
|
|
188902
|
-
isNightly,
|
|
188903
189030
|
isNoSubstitutionTemplateLiteral,
|
|
188904
189031
|
isNode,
|
|
188905
189032
|
isNodeArray,
|