@typescript-deploys/pr-build 5.3.0-pr-55880-5 → 5.3.0-pr-55567-5
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 +325 -269
- package/lib/tsserver.js +369 -299
- package/lib/typescript.d.ts +51 -29
- package/lib/typescript.js +364 -296
- package/lib/typingsInstaller.js +170 -115
- package/package.json +2 -2
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230927`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2773,8 +2773,10 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
|
|
|
2773
2773
|
SyntaxKind4[SyntaxKind4["DefaultClause"] = 297] = "DefaultClause";
|
|
2774
2774
|
SyntaxKind4[SyntaxKind4["HeritageClause"] = 298] = "HeritageClause";
|
|
2775
2775
|
SyntaxKind4[SyntaxKind4["CatchClause"] = 299] = "CatchClause";
|
|
2776
|
-
SyntaxKind4[SyntaxKind4["
|
|
2777
|
-
SyntaxKind4[SyntaxKind4["
|
|
2776
|
+
SyntaxKind4[SyntaxKind4["ImportAttributes"] = 300] = "ImportAttributes";
|
|
2777
|
+
SyntaxKind4[SyntaxKind4["ImportAttribute"] = 301] = "ImportAttribute";
|
|
2778
|
+
SyntaxKind4[SyntaxKind4["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause";
|
|
2779
|
+
SyntaxKind4[SyntaxKind4["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry";
|
|
2778
2780
|
SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer";
|
|
2779
2781
|
SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment";
|
|
2780
2782
|
SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment";
|
|
@@ -4250,12 +4252,11 @@ var sys = (() => {
|
|
|
4250
4252
|
let activeSession;
|
|
4251
4253
|
let profilePath = "./profile.cpuprofile";
|
|
4252
4254
|
const Buffer2 = require("buffer").Buffer;
|
|
4253
|
-
const
|
|
4254
|
-
const platform = _os.platform();
|
|
4255
|
+
const isWindows = process.platform === "win32";
|
|
4255
4256
|
const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive();
|
|
4256
|
-
const fsRealpath = !!_fs.realpathSync.native ?
|
|
4257
|
+
const fsRealpath = !!_fs.realpathSync.native ? isWindows ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
|
|
4257
4258
|
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
|
|
4258
|
-
const fsSupportsRecursiveFsWatch =
|
|
4259
|
+
const fsSupportsRecursiveFsWatch = isWindows || process.platform === "darwin";
|
|
4259
4260
|
const getCurrentDirectory = memoize(() => process.cwd());
|
|
4260
4261
|
const { watchFile, watchDirectory } = createSystemWatchFunctions({
|
|
4261
4262
|
pollingWatchFileWorker: fsWatchFileWorker,
|
|
@@ -4274,7 +4275,7 @@ var sys = (() => {
|
|
|
4274
4275
|
tscWatchFile: process.env.TSC_WATCHFILE,
|
|
4275
4276
|
useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
|
|
4276
4277
|
tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
|
|
4277
|
-
inodeWatching:
|
|
4278
|
+
inodeWatching: !isWindows,
|
|
4278
4279
|
sysLog
|
|
4279
4280
|
});
|
|
4280
4281
|
const nodeSystem = {
|
|
@@ -4459,7 +4460,7 @@ var sys = (() => {
|
|
|
4459
4460
|
return Buffer2.from && Buffer2.from !== Int8Array.from ? Buffer2.from(input, encoding) : new Buffer2(input, encoding);
|
|
4460
4461
|
}
|
|
4461
4462
|
function isFileSystemCaseSensitive() {
|
|
4462
|
-
if (
|
|
4463
|
+
if (isWindows) {
|
|
4463
4464
|
return false;
|
|
4464
4465
|
}
|
|
4465
4466
|
return !fileExists(swapCase(__filename));
|
|
@@ -5431,9 +5432,8 @@ var Diagnostics = {
|
|
|
5431
5432
|
_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."),
|
|
5432
5433
|
_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."),
|
|
5433
5434
|
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."),
|
|
5434
|
-
|
|
5435
|
+
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"),
|
|
5435
5436
|
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"),
|
|
5436
|
-
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`."),
|
|
5437
5437
|
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`."),
|
|
5438
5438
|
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."),
|
|
5439
5439
|
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."),
|
|
@@ -5443,6 +5443,8 @@ var Diagnostics = {
|
|
|
5443
5443
|
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"`),
|
|
5444
5444
|
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"`),
|
|
5445
5445
|
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"),
|
|
5446
|
+
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."),
|
|
5447
|
+
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'."),
|
|
5446
5448
|
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."),
|
|
5447
5449
|
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."),
|
|
5448
5450
|
catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -5469,6 +5471,7 @@ var Diagnostics = {
|
|
|
5469
5471
|
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."),
|
|
5470
5472
|
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."),
|
|
5471
5473
|
_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."),
|
|
5474
|
+
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."),
|
|
5472
5475
|
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."),
|
|
5473
5476
|
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."),
|
|
5474
5477
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -5998,15 +6001,15 @@ var Diagnostics = {
|
|
|
5998
6001
|
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}'?"),
|
|
5999
6002
|
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'."),
|
|
6000
6003
|
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."),
|
|
6004
|
+
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'."),
|
|
6001
6005
|
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}'?"),
|
|
6002
6006
|
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."),
|
|
6003
6007
|
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}'?"),
|
|
6004
|
-
|
|
6008
|
+
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."),
|
|
6005
6009
|
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."),
|
|
6006
6010
|
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."),
|
|
6007
6011
|
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."),
|
|
6008
6012
|
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"),
|
|
6009
|
-
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'."),
|
|
6010
6013
|
_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?"),
|
|
6011
6014
|
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."),
|
|
6012
6015
|
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."),
|
|
@@ -6020,6 +6023,10 @@ var Diagnostics = {
|
|
|
6020
6023
|
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."),
|
|
6021
6024
|
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."),
|
|
6022
6025
|
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."),
|
|
6026
|
+
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."),
|
|
6027
|
+
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."),
|
|
6028
|
+
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."),
|
|
6029
|
+
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}'."),
|
|
6023
6030
|
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}'."),
|
|
6024
6031
|
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}'."),
|
|
6025
6032
|
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}'."),
|
|
@@ -6128,7 +6135,6 @@ var Diagnostics = {
|
|
|
6128
6135
|
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}'."),
|
|
6129
6136
|
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}'?"),
|
|
6130
6137
|
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'."),
|
|
6131
|
-
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'."),
|
|
6132
6138
|
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."),
|
|
6133
6139
|
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."),
|
|
6134
6140
|
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}'."),
|
|
@@ -9675,7 +9681,7 @@ function isTemplateMiddleOrTemplateTail(node) {
|
|
|
9675
9681
|
const kind = node.kind;
|
|
9676
9682
|
return kind === 17 /* TemplateMiddle */ || kind === 18 /* TemplateTail */;
|
|
9677
9683
|
}
|
|
9678
|
-
function
|
|
9684
|
+
function isImportAttributeName(node) {
|
|
9679
9685
|
return isStringLiteral(node) || isIdentifier(node);
|
|
9680
9686
|
}
|
|
9681
9687
|
function isGeneratedIdentifier(node) {
|
|
@@ -12575,6 +12581,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
12575
12581
|
updateAssertEntry,
|
|
12576
12582
|
createImportTypeAssertionContainer,
|
|
12577
12583
|
updateImportTypeAssertionContainer,
|
|
12584
|
+
createImportAttributes,
|
|
12585
|
+
updateImportAttributes,
|
|
12586
|
+
createImportAttribute,
|
|
12587
|
+
updateImportAttribute,
|
|
12578
12588
|
createNamespaceImport,
|
|
12579
12589
|
updateNamespaceImport,
|
|
12580
12590
|
createNamespaceExport,
|
|
@@ -13843,18 +13853,21 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13843
13853
|
function updateTemplateLiteralType(node, head, templateSpans) {
|
|
13844
13854
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node;
|
|
13845
13855
|
}
|
|
13846
|
-
function createImportTypeNode(argument,
|
|
13856
|
+
function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) {
|
|
13847
13857
|
const node = createBaseNode(205 /* ImportType */);
|
|
13848
13858
|
node.argument = argument;
|
|
13849
|
-
node.
|
|
13859
|
+
node.attributes = attributes;
|
|
13860
|
+
if (node.assertions && node.assertions.assertClause && node.attributes) {
|
|
13861
|
+
node.assertions.assertClause = node.attributes;
|
|
13862
|
+
}
|
|
13850
13863
|
node.qualifier = qualifier;
|
|
13851
13864
|
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
13852
13865
|
node.isTypeOf = isTypeOf;
|
|
13853
13866
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13854
13867
|
return node;
|
|
13855
13868
|
}
|
|
13856
|
-
function updateImportTypeNode(node, argument,
|
|
13857
|
-
return node.argument !== argument || node.
|
|
13869
|
+
function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) {
|
|
13870
|
+
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;
|
|
13858
13871
|
}
|
|
13859
13872
|
function createParenthesizedType(type) {
|
|
13860
13873
|
const node = createBaseNode(196 /* ParenthesizedType */);
|
|
@@ -14984,19 +14997,19 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14984
14997
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
14985
14998
|
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node;
|
|
14986
14999
|
}
|
|
14987
|
-
function createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
15000
|
+
function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) {
|
|
14988
15001
|
const node = createBaseNode(272 /* ImportDeclaration */);
|
|
14989
15002
|
node.modifiers = asNodeArray(modifiers);
|
|
14990
15003
|
node.importClause = importClause;
|
|
14991
15004
|
node.moduleSpecifier = moduleSpecifier;
|
|
14992
|
-
node.assertClause =
|
|
15005
|
+
node.attributes = node.assertClause = attributes;
|
|
14993
15006
|
node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier);
|
|
14994
15007
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
14995
15008
|
node.jsDoc = void 0;
|
|
14996
15009
|
return node;
|
|
14997
15010
|
}
|
|
14998
|
-
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier,
|
|
14999
|
-
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15011
|
+
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) {
|
|
15012
|
+
return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node;
|
|
15000
15013
|
}
|
|
15001
15014
|
function createImportClause(isTypeOnly, name, namedBindings) {
|
|
15002
15015
|
const node = createBaseDeclaration(273 /* ImportClause */);
|
|
@@ -15017,6 +15030,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15017
15030
|
const node = createBaseNode(300 /* AssertClause */);
|
|
15018
15031
|
node.elements = createNodeArray(elements);
|
|
15019
15032
|
node.multiLine = multiLine;
|
|
15033
|
+
node.token = 132 /* AssertKeyword */;
|
|
15020
15034
|
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15021
15035
|
return node;
|
|
15022
15036
|
}
|
|
@@ -15042,6 +15056,27 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15042
15056
|
function updateImportTypeAssertionContainer(node, clause, multiLine) {
|
|
15043
15057
|
return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node;
|
|
15044
15058
|
}
|
|
15059
|
+
function createImportAttributes(elements, multiLine, token) {
|
|
15060
|
+
const node = createBaseNode(300 /* ImportAttributes */);
|
|
15061
|
+
node.token = token ?? 118 /* WithKeyword */;
|
|
15062
|
+
node.elements = createNodeArray(elements);
|
|
15063
|
+
node.multiLine = multiLine;
|
|
15064
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15065
|
+
return node;
|
|
15066
|
+
}
|
|
15067
|
+
function updateImportAttributes(node, elements, multiLine) {
|
|
15068
|
+
return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node;
|
|
15069
|
+
}
|
|
15070
|
+
function createImportAttribute(name, value) {
|
|
15071
|
+
const node = createBaseNode(301 /* ImportAttribute */);
|
|
15072
|
+
node.name = name;
|
|
15073
|
+
node.value = value;
|
|
15074
|
+
node.transformFlags |= 4 /* ContainsESNext */;
|
|
15075
|
+
return node;
|
|
15076
|
+
}
|
|
15077
|
+
function updateImportAttribute(node, name, value) {
|
|
15078
|
+
return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node;
|
|
15079
|
+
}
|
|
15045
15080
|
function createNamespaceImport(name) {
|
|
15046
15081
|
const node = createBaseDeclaration(274 /* NamespaceImport */);
|
|
15047
15082
|
node.name = name;
|
|
@@ -15102,20 +15137,20 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15102
15137
|
function updateExportAssignment(node, modifiers, expression) {
|
|
15103
15138
|
return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node;
|
|
15104
15139
|
}
|
|
15105
|
-
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15140
|
+
function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15106
15141
|
const node = createBaseDeclaration(278 /* ExportDeclaration */);
|
|
15107
15142
|
node.modifiers = asNodeArray(modifiers);
|
|
15108
15143
|
node.isTypeOnly = isTypeOnly;
|
|
15109
15144
|
node.exportClause = exportClause;
|
|
15110
15145
|
node.moduleSpecifier = moduleSpecifier;
|
|
15111
|
-
node.assertClause =
|
|
15146
|
+
node.attributes = node.assertClause = attributes;
|
|
15112
15147
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier);
|
|
15113
15148
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
15114
15149
|
node.jsDoc = void 0;
|
|
15115
15150
|
return node;
|
|
15116
15151
|
}
|
|
15117
|
-
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
15118
|
-
return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.
|
|
15152
|
+
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) {
|
|
15153
|
+
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;
|
|
15119
15154
|
}
|
|
15120
15155
|
function finishUpdateExportDeclaration(updated, original) {
|
|
15121
15156
|
if (updated !== original) {
|
|
@@ -16442,7 +16477,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16442
16477
|
} else {
|
|
16443
16478
|
modifierArray = modifiers;
|
|
16444
16479
|
}
|
|
16445
|
-
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) ? updatePropertyDeclaration(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.
|
|
16480
|
+
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) ? updatePropertyDeclaration(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);
|
|
16446
16481
|
}
|
|
16447
16482
|
function updateModifierLike(node, modifierArray) {
|
|
16448
16483
|
return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration(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);
|
|
@@ -17170,14 +17205,14 @@ function isImportDeclaration(node) {
|
|
|
17170
17205
|
function isImportClause(node) {
|
|
17171
17206
|
return node.kind === 273 /* ImportClause */;
|
|
17172
17207
|
}
|
|
17173
|
-
function isImportTypeAssertionContainer(node) {
|
|
17174
|
-
return node.kind === 302 /* ImportTypeAssertionContainer */;
|
|
17175
|
-
}
|
|
17176
17208
|
function isAssertClause(node) {
|
|
17177
17209
|
return node.kind === 300 /* AssertClause */;
|
|
17178
17210
|
}
|
|
17179
|
-
function
|
|
17180
|
-
return node.kind ===
|
|
17211
|
+
function isImportAttributes(node) {
|
|
17212
|
+
return node.kind === 300 /* ImportAttributes */;
|
|
17213
|
+
}
|
|
17214
|
+
function isImportAttribute(node) {
|
|
17215
|
+
return node.kind === 301 /* ImportAttribute */;
|
|
17181
17216
|
}
|
|
17182
17217
|
function isImportSpecifier(node) {
|
|
17183
17218
|
return node.kind === 276 /* ImportSpecifier */;
|
|
@@ -17755,7 +17790,7 @@ var forEachChildTable = {
|
|
|
17755
17790
|
return visitNode2(cbNode, node.typeParameter);
|
|
17756
17791
|
},
|
|
17757
17792
|
[205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) {
|
|
17758
|
-
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.
|
|
17793
|
+
return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
17759
17794
|
},
|
|
17760
17795
|
[302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) {
|
|
17761
17796
|
return visitNode2(cbNode, node.assertClause);
|
|
@@ -17929,15 +17964,15 @@ var forEachChildTable = {
|
|
|
17929
17964
|
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference);
|
|
17930
17965
|
},
|
|
17931
17966
|
[272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) {
|
|
17932
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
17967
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17933
17968
|
},
|
|
17934
17969
|
[273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) {
|
|
17935
17970
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings);
|
|
17936
17971
|
},
|
|
17937
|
-
[300 /*
|
|
17972
|
+
[300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) {
|
|
17938
17973
|
return visitNodes(cbNode, cbNodes, node.elements);
|
|
17939
17974
|
},
|
|
17940
|
-
[301 /*
|
|
17975
|
+
[301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) {
|
|
17941
17976
|
return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value);
|
|
17942
17977
|
},
|
|
17943
17978
|
[270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) {
|
|
@@ -17952,7 +17987,7 @@ var forEachChildTable = {
|
|
|
17952
17987
|
[275 /* NamedImports */]: forEachChildInNamedImportsOrExports,
|
|
17953
17988
|
[279 /* NamedExports */]: forEachChildInNamedImportsOrExports,
|
|
17954
17989
|
[278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) {
|
|
17955
|
-
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.
|
|
17990
|
+
return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes);
|
|
17956
17991
|
},
|
|
17957
17992
|
[276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
17958
17993
|
[281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier,
|
|
@@ -19161,7 +19196,7 @@ var Parser;
|
|
|
19161
19196
|
function isLiteralPropertyName() {
|
|
19162
19197
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */;
|
|
19163
19198
|
}
|
|
19164
|
-
function
|
|
19199
|
+
function isImportAttributeName2() {
|
|
19165
19200
|
return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */;
|
|
19166
19201
|
}
|
|
19167
19202
|
function parsePropertyNameWorker(allowComputedPropertyNames) {
|
|
@@ -19280,8 +19315,8 @@ var Parser;
|
|
|
19280
19315
|
return isLiteralPropertyName();
|
|
19281
19316
|
case 9 /* ObjectBindingElements */:
|
|
19282
19317
|
return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName();
|
|
19283
|
-
case 24 /*
|
|
19284
|
-
return
|
|
19318
|
+
case 24 /* ImportAttributes */:
|
|
19319
|
+
return isImportAttributeName2();
|
|
19285
19320
|
case 7 /* HeritageClauseElement */:
|
|
19286
19321
|
if (token() === 19 /* OpenBraceToken */) {
|
|
19287
19322
|
return lookAhead(isValidHeritageClauseObjectLiteral);
|
|
@@ -19384,7 +19419,7 @@ var Parser;
|
|
|
19384
19419
|
case 12 /* ObjectLiteralMembers */:
|
|
19385
19420
|
case 9 /* ObjectBindingElements */:
|
|
19386
19421
|
case 23 /* ImportOrExportSpecifiers */:
|
|
19387
|
-
case 24 /*
|
|
19422
|
+
case 24 /* ImportAttributes */:
|
|
19388
19423
|
return token() === 20 /* CloseBraceToken */;
|
|
19389
19424
|
case 3 /* SwitchClauseStatements */:
|
|
19390
19425
|
return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */;
|
|
@@ -19690,7 +19725,7 @@ var Parser;
|
|
|
19690
19725
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19691
19726
|
case 14 /* JsxChildren */:
|
|
19692
19727
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
19693
|
-
case 24 /*
|
|
19728
|
+
case 24 /* ImportAttributes */:
|
|
19694
19729
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected);
|
|
19695
19730
|
case 25 /* JSDocComment */:
|
|
19696
19731
|
return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
|
|
@@ -20565,28 +20600,6 @@ var Parser;
|
|
|
20565
20600
|
nextToken();
|
|
20566
20601
|
return token() === 102 /* ImportKeyword */;
|
|
20567
20602
|
}
|
|
20568
|
-
function parseImportTypeAssertions() {
|
|
20569
|
-
const pos = getNodePos();
|
|
20570
|
-
const openBracePosition = scanner.getTokenStart();
|
|
20571
|
-
parseExpected(19 /* OpenBraceToken */);
|
|
20572
|
-
const multiLine = scanner.hasPrecedingLineBreak();
|
|
20573
|
-
parseExpected(132 /* AssertKeyword */);
|
|
20574
|
-
parseExpected(59 /* ColonToken */);
|
|
20575
|
-
const clause = parseAssertClause(
|
|
20576
|
-
/*skipAssertKeyword*/
|
|
20577
|
-
true
|
|
20578
|
-
);
|
|
20579
|
-
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
20580
|
-
const lastError = lastOrUndefined(parseDiagnostics);
|
|
20581
|
-
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
20582
|
-
addRelatedInfo(
|
|
20583
|
-
lastError,
|
|
20584
|
-
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
20585
|
-
);
|
|
20586
|
-
}
|
|
20587
|
-
}
|
|
20588
|
-
return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos);
|
|
20589
|
-
}
|
|
20590
20603
|
function parseImportType() {
|
|
20591
20604
|
sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */;
|
|
20592
20605
|
const pos = getNodePos();
|
|
@@ -20594,14 +20607,36 @@ var Parser;
|
|
|
20594
20607
|
parseExpected(102 /* ImportKeyword */);
|
|
20595
20608
|
parseExpected(21 /* OpenParenToken */);
|
|
20596
20609
|
const type = parseType();
|
|
20597
|
-
let
|
|
20610
|
+
let attributes;
|
|
20598
20611
|
if (parseOptional(28 /* CommaToken */)) {
|
|
20599
|
-
|
|
20612
|
+
const openBracePosition = scanner.getTokenStart();
|
|
20613
|
+
parseExpected(19 /* OpenBraceToken */);
|
|
20614
|
+
const currentToken2 = token();
|
|
20615
|
+
if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) {
|
|
20616
|
+
nextToken();
|
|
20617
|
+
} else {
|
|
20618
|
+
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */));
|
|
20619
|
+
}
|
|
20620
|
+
parseExpected(59 /* ColonToken */);
|
|
20621
|
+
attributes = parseImportAttributes(
|
|
20622
|
+
currentToken2,
|
|
20623
|
+
/*skipKeyword*/
|
|
20624
|
+
true
|
|
20625
|
+
);
|
|
20626
|
+
if (!parseExpected(20 /* CloseBraceToken */)) {
|
|
20627
|
+
const lastError = lastOrUndefined(parseDiagnostics);
|
|
20628
|
+
if (lastError && lastError.code === Diagnostics._0_expected.code) {
|
|
20629
|
+
addRelatedInfo(
|
|
20630
|
+
lastError,
|
|
20631
|
+
createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
|
|
20632
|
+
);
|
|
20633
|
+
}
|
|
20634
|
+
}
|
|
20600
20635
|
}
|
|
20601
20636
|
parseExpected(22 /* CloseParenToken */);
|
|
20602
20637
|
const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0;
|
|
20603
20638
|
const typeArguments = parseTypeArgumentsOfTypeReference();
|
|
20604
|
-
return finishNode(factory2.createImportTypeNode(type,
|
|
20639
|
+
return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos);
|
|
20605
20640
|
}
|
|
20606
20641
|
function nextTokenIsNumericOrBigIntLiteral() {
|
|
20607
20642
|
nextToken();
|
|
@@ -23663,15 +23698,16 @@ var Parser;
|
|
|
23663
23698
|
parseExpected(161 /* FromKeyword */);
|
|
23664
23699
|
}
|
|
23665
23700
|
const moduleSpecifier = parseModuleSpecifier();
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23701
|
+
const currentToken2 = token();
|
|
23702
|
+
let attributes;
|
|
23703
|
+
if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23704
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23669
23705
|
}
|
|
23670
23706
|
parseSemicolon();
|
|
23671
|
-
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier,
|
|
23707
|
+
const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes);
|
|
23672
23708
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23673
23709
|
}
|
|
23674
|
-
function
|
|
23710
|
+
function parseImportAttribute() {
|
|
23675
23711
|
const pos = getNodePos();
|
|
23676
23712
|
const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */);
|
|
23677
23713
|
parseExpected(59 /* ColonToken */);
|
|
@@ -23679,19 +23715,19 @@ var Parser;
|
|
|
23679
23715
|
/*allowReturnTypeInArrowFunction*/
|
|
23680
23716
|
true
|
|
23681
23717
|
);
|
|
23682
|
-
return finishNode(factory2.
|
|
23718
|
+
return finishNode(factory2.createImportAttribute(name, value), pos);
|
|
23683
23719
|
}
|
|
23684
|
-
function
|
|
23720
|
+
function parseImportAttributes(token2, skipKeyword) {
|
|
23685
23721
|
const pos = getNodePos();
|
|
23686
|
-
if (!
|
|
23687
|
-
parseExpected(
|
|
23722
|
+
if (!skipKeyword) {
|
|
23723
|
+
parseExpected(token2);
|
|
23688
23724
|
}
|
|
23689
23725
|
const openBracePosition = scanner.getTokenStart();
|
|
23690
23726
|
if (parseExpected(19 /* OpenBraceToken */)) {
|
|
23691
23727
|
const multiLine = scanner.hasPrecedingLineBreak();
|
|
23692
23728
|
const elements = parseDelimitedList(
|
|
23693
|
-
24 /*
|
|
23694
|
-
|
|
23729
|
+
24 /* ImportAttributes */,
|
|
23730
|
+
parseImportAttribute,
|
|
23695
23731
|
/*considerSemicolonAsDelimiter*/
|
|
23696
23732
|
true
|
|
23697
23733
|
);
|
|
@@ -23704,7 +23740,7 @@ var Parser;
|
|
|
23704
23740
|
);
|
|
23705
23741
|
}
|
|
23706
23742
|
}
|
|
23707
|
-
return finishNode(factory2.
|
|
23743
|
+
return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos);
|
|
23708
23744
|
} else {
|
|
23709
23745
|
const elements = createNodeArray(
|
|
23710
23746
|
[],
|
|
@@ -23714,10 +23750,11 @@ var Parser;
|
|
|
23714
23750
|
/*hasTrailingComma*/
|
|
23715
23751
|
false
|
|
23716
23752
|
);
|
|
23717
|
-
return finishNode(factory2.
|
|
23753
|
+
return finishNode(factory2.createImportAttributes(
|
|
23718
23754
|
elements,
|
|
23719
23755
|
/*multiLine*/
|
|
23720
|
-
false
|
|
23756
|
+
false,
|
|
23757
|
+
token2
|
|
23721
23758
|
), pos);
|
|
23722
23759
|
}
|
|
23723
23760
|
}
|
|
@@ -23849,7 +23886,7 @@ var Parser;
|
|
|
23849
23886
|
);
|
|
23850
23887
|
let exportClause;
|
|
23851
23888
|
let moduleSpecifier;
|
|
23852
|
-
let
|
|
23889
|
+
let attributes;
|
|
23853
23890
|
const isTypeOnly = parseOptional(156 /* TypeKeyword */);
|
|
23854
23891
|
const namespaceExportPos = getNodePos();
|
|
23855
23892
|
if (parseOptional(42 /* AsteriskToken */)) {
|
|
@@ -23865,12 +23902,13 @@ var Parser;
|
|
|
23865
23902
|
moduleSpecifier = parseModuleSpecifier();
|
|
23866
23903
|
}
|
|
23867
23904
|
}
|
|
23868
|
-
|
|
23869
|
-
|
|
23905
|
+
const currentToken2 = token();
|
|
23906
|
+
if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
|
|
23907
|
+
attributes = parseImportAttributes(currentToken2);
|
|
23870
23908
|
}
|
|
23871
23909
|
parseSemicolon();
|
|
23872
23910
|
setAwaitContext(savedAwaitContext);
|
|
23873
|
-
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier,
|
|
23911
|
+
const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes);
|
|
23874
23912
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
23875
23913
|
}
|
|
23876
23914
|
function parseExportAssignment(pos, hasJSDoc, modifiers) {
|
|
@@ -23920,7 +23958,7 @@ var Parser;
|
|
|
23920
23958
|
ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes";
|
|
23921
23959
|
ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses";
|
|
23922
23960
|
ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers";
|
|
23923
|
-
ParsingContext2[ParsingContext2["
|
|
23961
|
+
ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes";
|
|
23924
23962
|
ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment";
|
|
23925
23963
|
ParsingContext2[ParsingContext2["Count"] = 26] = "Count";
|
|
23926
23964
|
})(ParsingContext || (ParsingContext = {}));
|
|
@@ -27513,11 +27551,19 @@ function getNodeResolutionFeatures(options) {
|
|
|
27513
27551
|
return features;
|
|
27514
27552
|
}
|
|
27515
27553
|
function getConditions(options, esmMode) {
|
|
27516
|
-
const
|
|
27554
|
+
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
27555
|
+
if (esmMode === void 0) {
|
|
27556
|
+
if (moduleResolution === 100 /* Bundler */) {
|
|
27557
|
+
esmMode ?? (esmMode = moduleResolution === 100 /* Bundler */);
|
|
27558
|
+
} else if (moduleResolution === 2 /* Node10 */) {
|
|
27559
|
+
return [];
|
|
27560
|
+
}
|
|
27561
|
+
}
|
|
27562
|
+
const conditions = esmMode ? ["import"] : ["require"];
|
|
27517
27563
|
if (!options.noDtsResolution) {
|
|
27518
27564
|
conditions.push("types");
|
|
27519
27565
|
}
|
|
27520
|
-
if (
|
|
27566
|
+
if (moduleResolution !== 100 /* Bundler */) {
|
|
27521
27567
|
conditions.push("node");
|
|
27522
27568
|
}
|
|
27523
27569
|
return concatenate(conditions, options.customConditions);
|
|
@@ -27574,13 +27620,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca
|
|
|
27574
27620
|
result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
27575
27621
|
break;
|
|
27576
27622
|
case 2 /* Node10 */:
|
|
27577
|
-
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27623
|
+
result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
27578
27624
|
break;
|
|
27579
27625
|
case 1 /* Classic */:
|
|
27580
27626
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27581
27627
|
break;
|
|
27582
27628
|
case 100 /* Bundler */:
|
|
27583
|
-
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
27629
|
+
result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode === 99 /* ESNext */) : void 0);
|
|
27584
27630
|
break;
|
|
27585
27631
|
default:
|
|
27586
27632
|
return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`);
|
|
@@ -27745,7 +27791,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
27745
27791
|
resolutionMode
|
|
27746
27792
|
);
|
|
27747
27793
|
}
|
|
27748
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
27794
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) {
|
|
27749
27795
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
27750
27796
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
27751
27797
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
@@ -27762,7 +27808,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile,
|
|
|
27762
27808
|
extensions,
|
|
27763
27809
|
/*isConfigLookup*/
|
|
27764
27810
|
false,
|
|
27765
|
-
redirectedReference
|
|
27811
|
+
redirectedReference,
|
|
27812
|
+
conditions
|
|
27766
27813
|
);
|
|
27767
27814
|
}
|
|
27768
27815
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
@@ -27778,10 +27825,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
27778
27825
|
/*isConfigLookup*/
|
|
27779
27826
|
false,
|
|
27780
27827
|
/*redirectedReference*/
|
|
27828
|
+
void 0,
|
|
27829
|
+
/*conditions*/
|
|
27781
27830
|
void 0
|
|
27782
27831
|
);
|
|
27783
27832
|
}
|
|
27784
|
-
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
27833
|
+
function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) {
|
|
27785
27834
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
27786
27835
|
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
27787
27836
|
if (getResolveJsonModule(compilerOptions)) {
|
|
@@ -27797,10 +27846,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions,
|
|
|
27797
27846
|
extensions,
|
|
27798
27847
|
/*isConfigLookup*/
|
|
27799
27848
|
false,
|
|
27800
|
-
redirectedReference
|
|
27849
|
+
redirectedReference,
|
|
27850
|
+
conditions
|
|
27801
27851
|
);
|
|
27802
27852
|
}
|
|
27803
|
-
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
27853
|
+
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) {
|
|
27804
27854
|
let extensions;
|
|
27805
27855
|
if (isConfigLookup) {
|
|
27806
27856
|
extensions = 8 /* Json */;
|
|
@@ -27811,14 +27861,18 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
27811
27861
|
} else {
|
|
27812
27862
|
extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
27813
27863
|
}
|
|
27814
|
-
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
27864
|
+
return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions);
|
|
27815
27865
|
}
|
|
27816
|
-
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
27866
|
+
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) {
|
|
27817
27867
|
var _a, _b, _c, _d;
|
|
27818
27868
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
27819
27869
|
const failedLookupLocations = [];
|
|
27820
27870
|
const affectingLocations = [];
|
|
27821
|
-
const
|
|
27871
|
+
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
27872
|
+
conditions ?? (conditions = getConditions(
|
|
27873
|
+
compilerOptions,
|
|
27874
|
+
moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : !!(features & 32 /* EsmMode */)
|
|
27875
|
+
));
|
|
27822
27876
|
const diagnostics = [];
|
|
27823
27877
|
const state = {
|
|
27824
27878
|
compilerOptions,
|
|
@@ -27828,17 +27882,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27828
27882
|
affectingLocations,
|
|
27829
27883
|
packageJsonInfoCache: cache,
|
|
27830
27884
|
features,
|
|
27831
|
-
conditions,
|
|
27885
|
+
conditions: conditions ?? emptyArray,
|
|
27832
27886
|
requestContainingDirectory: containingDirectory,
|
|
27833
27887
|
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
27834
27888
|
isConfigLookup,
|
|
27835
27889
|
candidateIsFromPackageJsonField: false
|
|
27836
27890
|
};
|
|
27837
|
-
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(
|
|
27838
|
-
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
27891
|
+
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
27892
|
+
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", "));
|
|
27839
27893
|
}
|
|
27840
27894
|
let result;
|
|
27841
|
-
if (
|
|
27895
|
+
if (moduleResolution === 2 /* Node10 */) {
|
|
27842
27896
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
27843
27897
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
27844
27898
|
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
@@ -27846,7 +27900,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
27846
27900
|
result = tryResolve(extensions, state);
|
|
27847
27901
|
}
|
|
27848
27902
|
let legacyResult;
|
|
27849
|
-
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")) {
|
|
27903
|
+
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"))) {
|
|
27850
27904
|
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
27851
27905
|
const diagnosticState = {
|
|
27852
27906
|
...state,
|
|
@@ -28506,7 +28560,8 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
|
|
|
28506
28560
|
extensions,
|
|
28507
28561
|
/*isConfigLookup*/
|
|
28508
28562
|
false,
|
|
28509
|
-
redirectedReference
|
|
28563
|
+
redirectedReference,
|
|
28564
|
+
state.conditions
|
|
28510
28565
|
);
|
|
28511
28566
|
return toSearchResult(
|
|
28512
28567
|
result.resolvedModule ? {
|
|
@@ -29646,7 +29701,7 @@ var visitEachChildTable = {
|
|
|
29646
29701
|
return context.factory.updateImportTypeNode(
|
|
29647
29702
|
node,
|
|
29648
29703
|
Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)),
|
|
29649
|
-
nodeVisitor(node.
|
|
29704
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes),
|
|
29650
29705
|
nodeVisitor(node.qualifier, visitor, isEntityName),
|
|
29651
29706
|
nodesVisitor(node.typeArguments, visitor, isTypeNode),
|
|
29652
29707
|
node.isTypeOf
|
|
@@ -30197,20 +30252,20 @@ var visitEachChildTable = {
|
|
|
30197
30252
|
nodesVisitor(node.modifiers, visitor, isModifierLike),
|
|
30198
30253
|
nodeVisitor(node.importClause, visitor, isImportClause),
|
|
30199
30254
|
Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)),
|
|
30200
|
-
nodeVisitor(node.
|
|
30255
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30201
30256
|
);
|
|
30202
30257
|
},
|
|
30203
|
-
[300 /*
|
|
30204
|
-
return context.factory.
|
|
30258
|
+
[300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
30259
|
+
return context.factory.updateImportAttributes(
|
|
30205
30260
|
node,
|
|
30206
|
-
nodesVisitor(node.elements, visitor,
|
|
30261
|
+
nodesVisitor(node.elements, visitor, isImportAttribute),
|
|
30207
30262
|
node.multiLine
|
|
30208
30263
|
);
|
|
30209
30264
|
},
|
|
30210
|
-
[301 /*
|
|
30211
|
-
return context.factory.
|
|
30265
|
+
[301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
30266
|
+
return context.factory.updateImportAttribute(
|
|
30212
30267
|
node,
|
|
30213
|
-
Debug.checkDefined(nodeVisitor(node.name, visitor,
|
|
30268
|
+
Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)),
|
|
30214
30269
|
Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression))
|
|
30215
30270
|
);
|
|
30216
30271
|
},
|
|
@@ -30262,7 +30317,7 @@ var visitEachChildTable = {
|
|
|
30262
30317
|
node.isTypeOnly,
|
|
30263
30318
|
nodeVisitor(node.exportClause, visitor, isNamedExportBindings),
|
|
30264
30319
|
nodeVisitor(node.moduleSpecifier, visitor, isExpression),
|
|
30265
|
-
nodeVisitor(node.
|
|
30320
|
+
nodeVisitor(node.attributes, visitor, isImportAttributes)
|
|
30266
30321
|
);
|
|
30267
30322
|
},
|
|
30268
30323
|
[279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
@@ -30823,7 +30878,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
30823
30878
|
Diagnostics.Classes_may_not_have_a_field_named_constructor.code,
|
|
30824
30879
|
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,
|
|
30825
30880
|
Diagnostics.Duplicate_label_0.code,
|
|
30826
|
-
Diagnostics.
|
|
30881
|
+
Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,
|
|
30827
30882
|
Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code,
|
|
30828
30883
|
Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,
|
|
30829
30884
|
Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,
|