typescript 4.7.0-dev.20220307 → 4.7.0-dev.20220310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +186 -113
- package/lib/tsserver.js +357 -209
- package/lib/tsserverlibrary.d.ts +3 -1
- package/lib/tsserverlibrary.js +357 -209
- package/lib/typescript.d.ts +3 -1
- package/lib/typescript.js +234 -128
- package/lib/typescriptServices.d.ts +3 -1
- package/lib/typescriptServices.js +234 -128
- package/lib/typingsInstaller.js +234 -128
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220310";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -4358,6 +4358,7 @@ var ts;
|
|
|
4358
4358
|
SyntaxKind[SyntaxKind["JSDocFunctionType"] = 316] = "JSDocFunctionType";
|
|
4359
4359
|
SyntaxKind[SyntaxKind["JSDocVariadicType"] = 317] = "JSDocVariadicType";
|
|
4360
4360
|
SyntaxKind[SyntaxKind["JSDocNamepathType"] = 318] = "JSDocNamepathType";
|
|
4361
|
+
/** @deprecated Use SyntaxKind.JSDoc */
|
|
4361
4362
|
SyntaxKind[SyntaxKind["JSDocComment"] = 319] = "JSDocComment";
|
|
4362
4363
|
SyntaxKind[SyntaxKind["JSDocText"] = 320] = "JSDocText";
|
|
4363
4364
|
SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 321] = "JSDocTypeLiteral";
|
|
@@ -4431,6 +4432,7 @@ var ts;
|
|
|
4431
4432
|
SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 346] = "LastJSDocTagNode";
|
|
4432
4433
|
/* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 126] = "FirstContextualKeyword";
|
|
4433
4434
|
/* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 159] = "LastContextualKeyword";
|
|
4435
|
+
SyntaxKind[SyntaxKind["JSDoc"] = 319] = "JSDoc";
|
|
4434
4436
|
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
|
|
4435
4437
|
var NodeFlags;
|
|
4436
4438
|
(function (NodeFlags) {
|
|
@@ -9218,7 +9220,6 @@ var ts;
|
|
|
9218
9220
|
Command_line_Options: diag(6171, ts.DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"),
|
|
9219
9221
|
Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, ts.DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),
|
|
9220
9222
|
Enable_all_strict_type_checking_options: diag(6180, ts.DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."),
|
|
9221
|
-
List_of_language_service_plugins: diag(6181, ts.DiagnosticCategory.Message, "List_of_language_service_plugins_6181", "List of language service plugins."),
|
|
9222
9223
|
Scoped_package_detected_looking_in_0: diag(6182, ts.DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"),
|
|
9223
9224
|
Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),
|
|
9224
9225
|
Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),
|
|
@@ -9325,7 +9326,7 @@ var ts;
|
|
|
9325
9326
|
Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, ts.DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"),
|
|
9326
9327
|
Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, ts.DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"),
|
|
9327
9328
|
Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, ts.DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"),
|
|
9328
|
-
Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"),
|
|
9329
|
+
Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."),
|
|
9329
9330
|
Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, ts.DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"),
|
|
9330
9331
|
Option_build_must_be_the_first_command_line_argument: diag(6369, ts.DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."),
|
|
9331
9332
|
Options_0_and_1_cannot_be_combined: diag(6370, ts.DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."),
|
|
@@ -9336,7 +9337,6 @@ var ts;
|
|
|
9336
9337
|
A_non_dry_build_would_update_output_of_project_0: diag(6375, ts.DiagnosticCategory.Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"),
|
|
9337
9338
|
Cannot_update_output_of_project_0_because_there_was_error_reading_file_1: diag(6376, ts.DiagnosticCategory.Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"),
|
|
9338
9339
|
Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: diag(6377, ts.DiagnosticCategory.Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),
|
|
9339
|
-
Enable_incremental_compilation: diag(6378, ts.DiagnosticCategory.Message, "Enable_incremental_compilation_6378", "Enable incremental compilation"),
|
|
9340
9340
|
Composite_projects_may_not_disable_incremental_compilation: diag(6379, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."),
|
|
9341
9341
|
Specify_file_to_store_incremental_compilation_information: diag(6380, ts.DiagnosticCategory.Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"),
|
|
9342
9342
|
Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, ts.DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),
|
|
@@ -9364,13 +9364,13 @@ var ts;
|
|
|
9364
9364
|
File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),
|
|
9365
9365
|
Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, ts.DiagnosticCategory.Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."),
|
|
9366
9366
|
Consider_adding_a_declare_modifier_to_this_class: diag(6506, ts.DiagnosticCategory.Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."),
|
|
9367
|
-
Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, ts.DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the
|
|
9367
|
+
Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, ts.DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),
|
|
9368
9368
|
Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, ts.DiagnosticCategory.Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."),
|
|
9369
9369
|
Allow_accessing_UMD_globals_from_modules: diag(6602, ts.DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."),
|
|
9370
9370
|
Disable_error_reporting_for_unreachable_code: diag(6603, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."),
|
|
9371
9371
|
Disable_error_reporting_for_unused_labels: diag(6604, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."),
|
|
9372
9372
|
Ensure_use_strict_is_always_emitted: diag(6605, ts.DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."),
|
|
9373
|
-
Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, ts.DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use
|
|
9373
|
+
Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, ts.DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),
|
|
9374
9374
|
Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, ts.DiagnosticCategory.Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."),
|
|
9375
9375
|
No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, ts.DiagnosticCategory.Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."),
|
|
9376
9376
|
Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, ts.DiagnosticCategory.Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."),
|
|
@@ -9383,13 +9383,13 @@ var ts;
|
|
|
9383
9383
|
Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, ts.DiagnosticCategory.Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."),
|
|
9384
9384
|
Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, ts.DiagnosticCategory.Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),
|
|
9385
9385
|
Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, ts.DiagnosticCategory.Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."),
|
|
9386
|
-
Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, ts.DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects"),
|
|
9386
|
+
Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, ts.DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."),
|
|
9387
9387
|
Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, ts.DiagnosticCategory.Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."),
|
|
9388
9388
|
Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, ts.DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),
|
|
9389
9389
|
Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, ts.DiagnosticCategory.Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."),
|
|
9390
9390
|
Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, ts.DiagnosticCategory.Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."),
|
|
9391
9391
|
Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, ts.DiagnosticCategory.Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"),
|
|
9392
|
-
Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, ts.DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables
|
|
9392
|
+
Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, ts.DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),
|
|
9393
9393
|
Filters_results_from_the_include_option: diag(6627, ts.DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."),
|
|
9394
9394
|
Remove_a_list_of_directories_from_the_watch_process: diag(6628, ts.DiagnosticCategory.Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."),
|
|
9395
9395
|
Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, ts.DiagnosticCategory.Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."),
|
|
@@ -9399,7 +9399,7 @@ var ts;
|
|
|
9399
9399
|
Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, ts.DiagnosticCategory.Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."),
|
|
9400
9400
|
Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, ts.DiagnosticCategory.Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."),
|
|
9401
9401
|
Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, ts.DiagnosticCategory.Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."),
|
|
9402
|
-
Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, ts.DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date"),
|
|
9402
|
+
Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, ts.DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."),
|
|
9403
9403
|
Ensure_that_casing_is_correct_in_imports: diag(6637, ts.DiagnosticCategory.Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."),
|
|
9404
9404
|
Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, ts.DiagnosticCategory.Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."),
|
|
9405
9405
|
Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, ts.DiagnosticCategory.Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."),
|
|
@@ -9409,77 +9409,76 @@ var ts;
|
|
|
9409
9409
|
Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, ts.DiagnosticCategory.Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."),
|
|
9410
9410
|
Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, ts.DiagnosticCategory.Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."),
|
|
9411
9411
|
Specify_what_JSX_code_is_generated: diag(6646, ts.DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."),
|
|
9412
|
-
Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, ts.DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'"),
|
|
9412
|
+
Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, ts.DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),
|
|
9413
9413
|
Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, ts.DiagnosticCategory.Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),
|
|
9414
|
-
Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, ts.DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using
|
|
9414
|
+
Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, ts.DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),
|
|
9415
9415
|
Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, ts.DiagnosticCategory.Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."),
|
|
9416
9416
|
Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, ts.DiagnosticCategory.Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."),
|
|
9417
9417
|
Print_the_names_of_emitted_files_after_a_compilation: diag(6652, ts.DiagnosticCategory.Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."),
|
|
9418
9418
|
Print_all_of_the_files_read_during_the_compilation: diag(6653, ts.DiagnosticCategory.Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."),
|
|
9419
9419
|
Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, ts.DiagnosticCategory.Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."),
|
|
9420
9420
|
Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, ts.DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."),
|
|
9421
|
-
Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, ts.DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from
|
|
9421
|
+
Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, ts.DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),
|
|
9422
9422
|
Specify_what_module_code_is_generated: diag(6657, ts.DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."),
|
|
9423
9423
|
Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, ts.DiagnosticCategory.Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."),
|
|
9424
9424
|
Set_the_newline_character_for_emitting_files: diag(6659, ts.DiagnosticCategory.Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."),
|
|
9425
9425
|
Disable_emitting_files_from_a_compilation: diag(6660, ts.DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."),
|
|
9426
|
-
Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, ts.DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like
|
|
9426
|
+
Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, ts.DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."),
|
|
9427
9427
|
Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, ts.DiagnosticCategory.Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."),
|
|
9428
9428
|
Disable_truncating_types_in_error_messages: diag(6663, ts.DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."),
|
|
9429
9429
|
Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."),
|
|
9430
|
-
Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied
|
|
9430
|
+
Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."),
|
|
9431
9431
|
Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, ts.DiagnosticCategory.Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."),
|
|
9432
9432
|
Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."),
|
|
9433
|
-
Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, ts.DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when
|
|
9433
|
+
Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, ts.DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."),
|
|
9434
9434
|
Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, ts.DiagnosticCategory.Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."),
|
|
9435
9435
|
Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, ts.DiagnosticCategory.Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."),
|
|
9436
|
-
Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, ts.DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type"),
|
|
9437
|
-
Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, ts.DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow
|
|
9436
|
+
Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, ts.DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."),
|
|
9437
|
+
Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, ts.DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project."),
|
|
9438
9438
|
Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, ts.DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."),
|
|
9439
|
-
Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, ts.DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add
|
|
9440
|
-
|
|
9441
|
-
Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, ts.DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read"),
|
|
9442
|
-
Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use
|
|
9439
|
+
Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, ts.DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."),
|
|
9440
|
+
Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, ts.DiagnosticCategory.Message, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."),
|
|
9441
|
+
Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, ts.DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."),
|
|
9442
|
+
Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."),
|
|
9443
9443
|
Specify_an_output_folder_for_all_emitted_files: diag(6678, ts.DiagnosticCategory.Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."),
|
|
9444
|
-
Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, ts.DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If
|
|
9444
|
+
Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, ts.DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),
|
|
9445
9445
|
Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, ts.DiagnosticCategory.Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."),
|
|
9446
9446
|
Specify_a_list_of_language_service_plugins_to_include: diag(6681, ts.DiagnosticCategory.Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."),
|
|
9447
|
-
Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, ts.DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing
|
|
9447
|
+
Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, ts.DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."),
|
|
9448
9448
|
Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, ts.DiagnosticCategory.Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."),
|
|
9449
|
-
Disable_wiping_the_console_in_watch_mode: diag(6684, ts.DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode"),
|
|
9450
|
-
Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, ts.DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read"),
|
|
9451
|
-
Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, ts.DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for
|
|
9449
|
+
Disable_wiping_the_console_in_watch_mode: diag(6684, ts.DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."),
|
|
9450
|
+
Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, ts.DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."),
|
|
9451
|
+
Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, ts.DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),
|
|
9452
9452
|
Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, ts.DiagnosticCategory.Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."),
|
|
9453
9453
|
Disable_emitting_comments: diag(6688, ts.DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."),
|
|
9454
|
-
Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files"),
|
|
9454
|
+
Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."),
|
|
9455
9455
|
Specify_the_root_folder_within_your_source_files: diag(6690, ts.DiagnosticCategory.Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."),
|
|
9456
9456
|
Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, ts.DiagnosticCategory.Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."),
|
|
9457
9457
|
Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, ts.DiagnosticCategory.Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."),
|
|
9458
9458
|
Skip_type_checking_all_d_ts_files: diag(6693, ts.DiagnosticCategory.Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."),
|
|
9459
9459
|
Create_source_map_files_for_emitted_JavaScript_files: diag(6694, ts.DiagnosticCategory.Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."),
|
|
9460
9460
|
Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, ts.DiagnosticCategory.Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."),
|
|
9461
|
-
Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, ts.DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for
|
|
9461
|
+
Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, ts.DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),
|
|
9462
9462
|
When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, ts.DiagnosticCategory.Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."),
|
|
9463
|
-
When_type_checking_take_into_account_null_and_undefined: diag(6699, ts.DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account
|
|
9463
|
+
When_type_checking_take_into_account_null_and_undefined: diag(6699, ts.DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."),
|
|
9464
9464
|
Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, ts.DiagnosticCategory.Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."),
|
|
9465
|
-
Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, ts.DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have
|
|
9465
|
+
Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, ts.DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."),
|
|
9466
9466
|
Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, ts.DiagnosticCategory.Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."),
|
|
9467
|
-
Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress
|
|
9467
|
+
Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),
|
|
9468
9468
|
Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),
|
|
9469
9469
|
Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, ts.DiagnosticCategory.Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),
|
|
9470
|
-
Log_paths_used_during_the_moduleResolution_process: diag(6706, ts.DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the
|
|
9470
|
+
Log_paths_used_during_the_moduleResolution_process: diag(6706, ts.DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."),
|
|
9471
9471
|
Specify_the_folder_for_tsbuildinfo_incremental_compilation_files: diag(6707, ts.DiagnosticCategory.Message, "Specify_the_folder_for_tsbuildinfo_incremental_compilation_files_6707", "Specify the folder for .tsbuildinfo incremental compilation files."),
|
|
9472
9472
|
Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, ts.DiagnosticCategory.Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."),
|
|
9473
|
-
Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, ts.DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like
|
|
9473
|
+
Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, ts.DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."),
|
|
9474
9474
|
Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, ts.DiagnosticCategory.Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."),
|
|
9475
9475
|
Emit_ECMAScript_standard_compliant_class_fields: diag(6712, ts.DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."),
|
|
9476
|
-
Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging"),
|
|
9476
|
+
Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."),
|
|
9477
9477
|
Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, ts.DiagnosticCategory.Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."),
|
|
9478
9478
|
Specify_how_the_TypeScript_watch_mode_works: diag(6715, ts.DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."),
|
|
9479
|
-
Include_undefined_in_index_signature_results: diag(6716, ts.DiagnosticCategory.Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"),
|
|
9480
9479
|
Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, ts.DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."),
|
|
9481
|
-
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, ts.DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types"),
|
|
9482
|
-
|
|
9480
|
+
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, ts.DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
|
|
9481
|
+
Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, ts.DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
|
|
9483
9482
|
one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
|
|
9484
9483
|
one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
|
|
9485
9484
|
type_Colon: diag(6902, ts.DiagnosticCategory.Message, "type_Colon_6902", "type:"),
|
|
@@ -13030,7 +13029,7 @@ var ts;
|
|
|
13030
13029
|
return ts.emptyArray;
|
|
13031
13030
|
}
|
|
13032
13031
|
if (ts.isJSDocTypeAlias(node)) {
|
|
13033
|
-
ts.Debug.assert(node.parent.kind === 319 /*
|
|
13032
|
+
ts.Debug.assert(node.parent.kind === 319 /* JSDoc */);
|
|
13034
13033
|
return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
|
|
13035
13034
|
}
|
|
13036
13035
|
if (node.typeParameters) {
|
|
@@ -13977,7 +13976,7 @@ var ts;
|
|
|
13977
13976
|
ts.isJSDocNode = isJSDocNode;
|
|
13978
13977
|
/** True if node is of a kind that may contain comment text. */
|
|
13979
13978
|
function isJSDocCommentContainingNode(node) {
|
|
13980
|
-
return node.kind === 319 /*
|
|
13979
|
+
return node.kind === 319 /* JSDoc */
|
|
13981
13980
|
|| node.kind === 318 /* JSDocNamepathType */
|
|
13982
13981
|
|| node.kind === 320 /* JSDocText */
|
|
13983
13982
|
|| isJSDocLinkLike(node)
|
|
@@ -15027,7 +15026,7 @@ var ts;
|
|
|
15027
15026
|
return name.kind === 161 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
|
|
15028
15027
|
}
|
|
15029
15028
|
ts.isComputedNonLiteralName = isComputedNonLiteralName;
|
|
15030
|
-
function
|
|
15029
|
+
function tryGetTextOfPropertyName(name) {
|
|
15031
15030
|
switch (name.kind) {
|
|
15032
15031
|
case 79 /* Identifier */:
|
|
15033
15032
|
case 80 /* PrivateIdentifier */:
|
|
@@ -15039,11 +15038,15 @@ var ts;
|
|
|
15039
15038
|
case 161 /* ComputedPropertyName */:
|
|
15040
15039
|
if (isStringOrNumericLiteralLike(name.expression))
|
|
15041
15040
|
return ts.escapeLeadingUnderscores(name.expression.text);
|
|
15042
|
-
return
|
|
15041
|
+
return undefined;
|
|
15043
15042
|
default:
|
|
15044
15043
|
return ts.Debug.assertNever(name);
|
|
15045
15044
|
}
|
|
15046
15045
|
}
|
|
15046
|
+
ts.tryGetTextOfPropertyName = tryGetTextOfPropertyName;
|
|
15047
|
+
function getTextOfPropertyName(name) {
|
|
15048
|
+
return ts.Debug.checkDefined(tryGetTextOfPropertyName(name));
|
|
15049
|
+
}
|
|
15047
15050
|
ts.getTextOfPropertyName = getTextOfPropertyName;
|
|
15048
15051
|
function entityNameToString(name) {
|
|
15049
15052
|
switch (name.kind) {
|
|
@@ -15538,10 +15541,23 @@ var ts;
|
|
|
15538
15541
|
&& node.parent.parent.kind === 236 /* VariableStatement */;
|
|
15539
15542
|
}
|
|
15540
15543
|
ts.isVariableDeclarationInVariableStatement = isVariableDeclarationInVariableStatement;
|
|
15544
|
+
function isCommonJsExportedExpression(node) {
|
|
15545
|
+
if (!isInJSFile(node))
|
|
15546
|
+
return false;
|
|
15547
|
+
return (ts.isObjectLiteralExpression(node.parent) && ts.isBinaryExpression(node.parent.parent) && getAssignmentDeclarationKind(node.parent.parent) === 2 /* ModuleExports */) ||
|
|
15548
|
+
isCommonJsExportPropertyAssignment(node.parent);
|
|
15549
|
+
}
|
|
15550
|
+
ts.isCommonJsExportedExpression = isCommonJsExportedExpression;
|
|
15551
|
+
function isCommonJsExportPropertyAssignment(node) {
|
|
15552
|
+
if (!isInJSFile(node))
|
|
15553
|
+
return false;
|
|
15554
|
+
return (ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 1 /* ExportsProperty */);
|
|
15555
|
+
}
|
|
15556
|
+
ts.isCommonJsExportPropertyAssignment = isCommonJsExportPropertyAssignment;
|
|
15541
15557
|
function isValidESSymbolDeclaration(node) {
|
|
15542
|
-
return ts.isVariableDeclaration(node) ? isVarConst(node) && ts.isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) :
|
|
15558
|
+
return (ts.isVariableDeclaration(node) ? isVarConst(node) && ts.isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) :
|
|
15543
15559
|
ts.isPropertyDeclaration(node) ? hasEffectiveReadonlyModifier(node) && hasStaticModifier(node) :
|
|
15544
|
-
ts.isPropertySignature(node) && hasEffectiveReadonlyModifier(node);
|
|
15560
|
+
ts.isPropertySignature(node) && hasEffectiveReadonlyModifier(node)) || isCommonJsExportPropertyAssignment(node);
|
|
15545
15561
|
}
|
|
15546
15562
|
ts.isValidESSymbolDeclaration = isValidESSymbolDeclaration;
|
|
15547
15563
|
function introducesArgumentsExoticObject(node) {
|
|
@@ -15595,7 +15611,7 @@ var ts;
|
|
|
15595
15611
|
function getPropertyAssignment(objectLiteral, key, key2) {
|
|
15596
15612
|
return objectLiteral.properties.filter(function (property) {
|
|
15597
15613
|
if (property.kind === 295 /* PropertyAssignment */) {
|
|
15598
|
-
var propName =
|
|
15614
|
+
var propName = tryGetTextOfPropertyName(property.name);
|
|
15599
15615
|
return key === propName || (!!key2 && key2 === propName);
|
|
15600
15616
|
}
|
|
15601
15617
|
return false;
|
|
@@ -18435,7 +18451,7 @@ var ts;
|
|
|
18435
18451
|
ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
|
|
18436
18452
|
/** template tags are only available when a typedef isn't already using them */
|
|
18437
18453
|
function isNonTypeAliasTemplate(tag) {
|
|
18438
|
-
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /*
|
|
18454
|
+
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias));
|
|
18439
18455
|
}
|
|
18440
18456
|
/**
|
|
18441
18457
|
* Gets the effective type annotation of the value parameter of a set accessor. If the node
|
|
@@ -25412,7 +25428,7 @@ var ts;
|
|
|
25412
25428
|
}
|
|
25413
25429
|
// @api
|
|
25414
25430
|
function createJSDocComment(comment, tags) {
|
|
25415
|
-
var node = createBaseNode(319 /*
|
|
25431
|
+
var node = createBaseNode(319 /* JSDoc */);
|
|
25416
25432
|
node.comment = comment;
|
|
25417
25433
|
node.tags = asNodeArray(tags);
|
|
25418
25434
|
return node;
|
|
@@ -28921,7 +28937,7 @@ var ts;
|
|
|
28921
28937
|
}
|
|
28922
28938
|
ts.isJSDocNamepathType = isJSDocNamepathType;
|
|
28923
28939
|
function isJSDoc(node) {
|
|
28924
|
-
return node.kind === 319 /*
|
|
28940
|
+
return node.kind === 319 /* JSDoc */;
|
|
28925
28941
|
}
|
|
28926
28942
|
ts.isJSDoc = isJSDoc;
|
|
28927
28943
|
function isJSDocTypeLiteral(node) {
|
|
@@ -30546,7 +30562,7 @@ var ts;
|
|
|
30546
30562
|
case 316 /* JSDocFunctionType */:
|
|
30547
30563
|
return visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
30548
30564
|
visitNode(cbNode, node.type);
|
|
30549
|
-
case 319 /*
|
|
30565
|
+
case 319 /* JSDoc */:
|
|
30550
30566
|
return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
30551
30567
|
|| visitNodes(cbNode, cbNodes, node.tags);
|
|
30552
30568
|
case 345 /* JSDocSeeTag */:
|
|
@@ -38780,7 +38796,7 @@ var ts;
|
|
|
38780
38796
|
shortName: "i",
|
|
38781
38797
|
type: "boolean",
|
|
38782
38798
|
category: ts.Diagnostics.Projects,
|
|
38783
|
-
description: ts.Diagnostics.
|
|
38799
|
+
description: ts.Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,
|
|
38784
38800
|
transpileOptionValue: undefined,
|
|
38785
38801
|
defaultValueDescription: ts.Diagnostics.false_unless_composite_is_set
|
|
38786
38802
|
},
|
|
@@ -39180,7 +39196,7 @@ var ts;
|
|
|
39180
39196
|
affectsSemanticDiagnostics: true,
|
|
39181
39197
|
strictFlag: true,
|
|
39182
39198
|
category: ts.Diagnostics.Type_Checking,
|
|
39183
|
-
description: ts.Diagnostics.
|
|
39199
|
+
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
39184
39200
|
defaultValueDescription: false,
|
|
39185
39201
|
},
|
|
39186
39202
|
{
|
|
@@ -39198,7 +39214,7 @@ var ts;
|
|
|
39198
39214
|
type: "boolean",
|
|
39199
39215
|
affectsSemanticDiagnostics: true,
|
|
39200
39216
|
category: ts.Diagnostics.Type_Checking,
|
|
39201
|
-
description: ts.Diagnostics.
|
|
39217
|
+
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
39202
39218
|
defaultValueDescription: false,
|
|
39203
39219
|
},
|
|
39204
39220
|
{
|
|
@@ -39239,7 +39255,7 @@ var ts;
|
|
|
39239
39255
|
type: "boolean",
|
|
39240
39256
|
affectsSemanticDiagnostics: true,
|
|
39241
39257
|
category: ts.Diagnostics.Type_Checking,
|
|
39242
|
-
description: ts.Diagnostics.
|
|
39258
|
+
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
39243
39259
|
defaultValueDescription: false,
|
|
39244
39260
|
},
|
|
39245
39261
|
{
|
|
@@ -39715,7 +39731,7 @@ var ts;
|
|
|
39715
39731
|
name: "plugin",
|
|
39716
39732
|
type: "object"
|
|
39717
39733
|
},
|
|
39718
|
-
description: ts.Diagnostics.
|
|
39734
|
+
description: ts.Diagnostics.Specify_a_list_of_language_service_plugins_to_include,
|
|
39719
39735
|
category: ts.Diagnostics.Editor_Support,
|
|
39720
39736
|
},
|
|
39721
39737
|
];
|
|
@@ -47860,6 +47876,8 @@ var ts;
|
|
|
47860
47876
|
var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]);
|
|
47861
47877
|
var restrictiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t; });
|
|
47862
47878
|
var permissiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? wildcardType : t; });
|
|
47879
|
+
var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); // `uniqueLiteralType` is a special `never` flagged by union reduction to behave as a literal
|
|
47880
|
+
var uniqueLiteralMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t; }); // replace all type parameters with the unique literal type (disregarding constraints)
|
|
47863
47881
|
var emptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47864
47882
|
var emptyJsxObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47865
47883
|
emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
|
|
@@ -48798,7 +48816,7 @@ var ts;
|
|
|
48798
48816
|
// - parameters are only in the scope of function body
|
|
48799
48817
|
// This restriction does not apply to JSDoc comment types because they are parented
|
|
48800
48818
|
// at a higher level than type parameters would normally be
|
|
48801
|
-
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /*
|
|
48819
|
+
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /* JSDoc */) {
|
|
48802
48820
|
useResult = result.flags & 262144 /* TypeParameter */
|
|
48803
48821
|
// type parameters are visible in parameter list, return type and type parameter list
|
|
48804
48822
|
? lastLocation === location.type ||
|
|
@@ -51764,10 +51782,16 @@ var ts;
|
|
|
51764
51782
|
var readonlyToken = type.declaration.readonlyToken ? ts.factory.createToken(type.declaration.readonlyToken.kind) : undefined;
|
|
51765
51783
|
var questionToken = type.declaration.questionToken ? ts.factory.createToken(type.declaration.questionToken.kind) : undefined;
|
|
51766
51784
|
var appropriateConstraintTypeNode;
|
|
51785
|
+
var newTypeVariable;
|
|
51767
51786
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
51768
51787
|
// We have a { [P in keyof T]: X }
|
|
51769
51788
|
// We do this to ensure we retain the toplevel keyof-ness of the type which may be lost due to keyof distribution during `getConstraintTypeFromMappedType`
|
|
51770
|
-
|
|
51789
|
+
if (!(getModifiersTypeFromMappedType(type).flags & 262144 /* TypeParameter */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51790
|
+
var newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T"));
|
|
51791
|
+
var name = typeParameterToName(newParam, context);
|
|
51792
|
+
newTypeVariable = ts.factory.createTypeReferenceNode(name);
|
|
51793
|
+
}
|
|
51794
|
+
appropriateConstraintTypeNode = ts.factory.createTypeOperatorNode(140 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context));
|
|
51771
51795
|
}
|
|
51772
51796
|
else {
|
|
51773
51797
|
appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context);
|
|
@@ -51777,7 +51801,14 @@ var ts;
|
|
|
51777
51801
|
var templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & 4 /* IncludeOptional */)), context);
|
|
51778
51802
|
var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, /*members*/ undefined);
|
|
51779
51803
|
context.approximateLength += 10;
|
|
51780
|
-
|
|
51804
|
+
var result = ts.setEmitFlags(mappedTypeNode, 1 /* SingleLine */);
|
|
51805
|
+
if (isMappedTypeWithKeyofConstraintDeclaration(type) && !(getModifiersTypeFromMappedType(type).flags & 262144 /* TypeParameter */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51806
|
+
// homomorphic mapped type with a non-homomorphic naive inlining
|
|
51807
|
+
// wrap it with a conditional like `SomeModifiersType extends infer U ? {..the mapped type...} : never` to ensure the resulting
|
|
51808
|
+
// type stays homomorphic
|
|
51809
|
+
return ts.factory.createConditionalTypeNode(typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context), ts.factory.createInferTypeNode(ts.factory.createTypeParameterDeclaration(ts.factory.cloneNode(newTypeVariable.typeName))), result, ts.factory.createKeywordTypeNode(143 /* NeverKeyword */));
|
|
51810
|
+
}
|
|
51811
|
+
return result;
|
|
51781
51812
|
}
|
|
51782
51813
|
function createAnonymousTypeNode(type) {
|
|
51783
51814
|
var _a;
|
|
@@ -53398,7 +53429,7 @@ var ts;
|
|
|
53398
53429
|
// If it's a class/interface/function: emit a class/interface/function with a `default` modifier
|
|
53399
53430
|
// These forms can merge, eg (`export default 12; export default interface A {}`)
|
|
53400
53431
|
function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) {
|
|
53401
|
-
var _a, _b;
|
|
53432
|
+
var _a, _b, _c, _d;
|
|
53402
53433
|
var symbolName = ts.unescapeLeadingUnderscores(symbol.escapedName);
|
|
53403
53434
|
var isDefault = symbol.escapedName === "default" /* Default */;
|
|
53404
53435
|
if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && ts.isStringANonContextualKeyword(symbolName) && !isDefault) {
|
|
@@ -53449,17 +53480,21 @@ var ts;
|
|
|
53449
53480
|
else {
|
|
53450
53481
|
// A Class + Property merge is made for a `module.exports.Member = class {}`, and it doesn't serialize well as either a class _or_ a property symbol - in fact, _it behaves like an alias!_
|
|
53451
53482
|
// `var` is `FunctionScopedVariable`, `const` and `let` are `BlockScopedVariable`, and `module.exports.thing =` is `Property`
|
|
53452
|
-
var flags = !(symbol.flags & 2 /* BlockScopedVariable */)
|
|
53453
|
-
:
|
|
53483
|
+
var flags = !(symbol.flags & 2 /* BlockScopedVariable */)
|
|
53484
|
+
? ((_a = symbol.parent) === null || _a === void 0 ? void 0 : _a.valueDeclaration) && ts.isSourceFile((_b = symbol.parent) === null || _b === void 0 ? void 0 : _b.valueDeclaration)
|
|
53485
|
+
? 2 /* Const */
|
|
53486
|
+
: undefined
|
|
53487
|
+
: isConstVariable(symbol)
|
|
53488
|
+
? 2 /* Const */
|
|
53454
53489
|
: 1 /* Let */;
|
|
53455
53490
|
var name = (needsPostExportDefault || !(symbol.flags & 4 /* Property */)) ? localName : getUnusedName(localName, symbol);
|
|
53456
53491
|
var textRange = symbol.declarations && ts.find(symbol.declarations, function (d) { return ts.isVariableDeclaration(d); });
|
|
53457
53492
|
if (textRange && ts.isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {
|
|
53458
53493
|
textRange = textRange.parent.parent;
|
|
53459
53494
|
}
|
|
53460
|
-
var propertyAccessRequire = (
|
|
53495
|
+
var propertyAccessRequire = (_c = symbol.declarations) === null || _c === void 0 ? void 0 : _c.find(ts.isPropertyAccessExpression);
|
|
53461
53496
|
if (propertyAccessRequire && ts.isBinaryExpression(propertyAccessRequire.parent) && ts.isIdentifier(propertyAccessRequire.parent.right)
|
|
53462
|
-
&& ((
|
|
53497
|
+
&& ((_d = type.symbol) === null || _d === void 0 ? void 0 : _d.valueDeclaration) && ts.isSourceFile(type.symbol.valueDeclaration)) {
|
|
53463
53498
|
var alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right;
|
|
53464
53499
|
addResult(ts.factory.createExportDeclaration(
|
|
53465
53500
|
/*decorators*/ undefined,
|
|
@@ -53539,8 +53574,8 @@ var ts;
|
|
|
53539
53574
|
// synthesize export * from "moduleReference"
|
|
53540
53575
|
// Straightforward - only one thing to do - make an export declaration
|
|
53541
53576
|
if (symbol.declarations) {
|
|
53542
|
-
for (var _i = 0,
|
|
53543
|
-
var node =
|
|
53577
|
+
for (var _i = 0, _e = symbol.declarations; _i < _e.length; _i++) {
|
|
53578
|
+
var node = _e[_i];
|
|
53544
53579
|
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
|
|
53545
53580
|
if (!resolvedModule)
|
|
53546
53581
|
continue;
|
|
@@ -55346,7 +55381,10 @@ var ts;
|
|
|
55346
55381
|
if (containsSameNamedThisProperty(expression.left, expression.right)) {
|
|
55347
55382
|
return anyType;
|
|
55348
55383
|
}
|
|
55349
|
-
var
|
|
55384
|
+
var isDirectExport = kind === 1 /* ExportsProperty */ && (ts.isPropertyAccessExpression(expression.left) || ts.isElementAccessExpression(expression.left)) && (ts.isModuleExportsAccessExpression(expression.left.expression) || (ts.isIdentifier(expression.left.expression) && ts.isExportsIdentifier(expression.left.expression)));
|
|
55385
|
+
var type = resolvedSymbol ? getTypeOfSymbol(resolvedSymbol)
|
|
55386
|
+
: isDirectExport ? getRegularTypeOfLiteralType(checkExpressionCached(expression.right))
|
|
55387
|
+
: getWidenedLiteralType(checkExpressionCached(expression.right));
|
|
55350
55388
|
if (type.flags & 524288 /* Object */ &&
|
|
55351
55389
|
kind === 2 /* ModuleExports */ &&
|
|
55352
55390
|
symbol.escapedName === "export=" /* ExportEquals */) {
|
|
@@ -56090,7 +56128,7 @@ var ts;
|
|
|
56090
56128
|
node = paramSymbol.valueDeclaration;
|
|
56091
56129
|
}
|
|
56092
56130
|
break;
|
|
56093
|
-
case 319 /*
|
|
56131
|
+
case 319 /* JSDoc */: {
|
|
56094
56132
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
56095
56133
|
return node.tags
|
|
56096
56134
|
? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
|
|
@@ -58351,10 +58389,10 @@ var ts;
|
|
|
58351
58389
|
else if (type !== firstType) {
|
|
58352
58390
|
checkFlags |= 64 /* HasNonUniformType */;
|
|
58353
58391
|
}
|
|
58354
|
-
if (isLiteralType(type) || isPatternLiteralType(type)) {
|
|
58392
|
+
if (isLiteralType(type) || isPatternLiteralType(type) || type === uniqueLiteralType) {
|
|
58355
58393
|
checkFlags |= 128 /* HasLiteralType */;
|
|
58356
58394
|
}
|
|
58357
|
-
if (type.flags & 131072 /* Never */) {
|
|
58395
|
+
if (type.flags & 131072 /* Never */ && type !== uniqueLiteralType) {
|
|
58358
58396
|
checkFlags |= 131072 /* HasNeverType */;
|
|
58359
58397
|
}
|
|
58360
58398
|
propTypes.push(type);
|
|
@@ -59539,7 +59577,7 @@ var ts;
|
|
|
59539
59577
|
function getConditionalFlowTypeOfType(type, node) {
|
|
59540
59578
|
var constraints;
|
|
59541
59579
|
var covariant = true;
|
|
59542
|
-
while (node && !ts.isStatement(node) && node.kind !== 319 /*
|
|
59580
|
+
while (node && !ts.isStatement(node) && node.kind !== 319 /* JSDoc */) {
|
|
59543
59581
|
var parent = node.parent;
|
|
59544
59582
|
// only consider variance flipped by parameter locations - `keyof` types would usually be considered variance inverting, but
|
|
59545
59583
|
// often get used in indexed accesses where they behave sortof invariantly, but our checking is lax
|
|
@@ -60206,6 +60244,10 @@ var ts;
|
|
|
60206
60244
|
return includes;
|
|
60207
60245
|
}
|
|
60208
60246
|
function removeSubtypes(types, hasObjectTypes) {
|
|
60247
|
+
// [] and [T] immediately reduce to [] and [T] respectively
|
|
60248
|
+
if (types.length < 2) {
|
|
60249
|
+
return types;
|
|
60250
|
+
}
|
|
60209
60251
|
var id = getTypeListId(types);
|
|
60210
60252
|
var match = subtypeReductionCache.get(id);
|
|
60211
60253
|
if (match) {
|
|
@@ -60891,10 +60933,24 @@ var ts;
|
|
|
60891
60933
|
return getUnionType(ts.concatenate(propertyTypes, indexKeyTypes), 1 /* Literal */,
|
|
60892
60934
|
/*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, origin);
|
|
60893
60935
|
}
|
|
60936
|
+
/**
|
|
60937
|
+
* A union type which is reducible upon instantiation (meaning some members are removed under certain instantiations)
|
|
60938
|
+
* must be kept generic, as that instantiation information needs to flow through the type system. By replacing all
|
|
60939
|
+
* type parameters in the union with a special never type that is treated as a literal in `getReducedType`, we can cause the `getReducedType` logic
|
|
60940
|
+
* to reduce the resulting type if possible (since only intersections with conflicting literal-typed properties are reducible).
|
|
60941
|
+
*/
|
|
60942
|
+
function isPossiblyReducibleByInstantiation(type) {
|
|
60943
|
+
return ts.some(type.types, function (t) {
|
|
60944
|
+
var uniqueFilled = getUniqueLiteralFilledInstantiation(t);
|
|
60945
|
+
return getReducedType(uniqueFilled) !== uniqueFilled;
|
|
60946
|
+
});
|
|
60947
|
+
}
|
|
60894
60948
|
function getIndexType(type, stringsOnly, noIndexSignatures) {
|
|
60895
60949
|
if (stringsOnly === void 0) { stringsOnly = keyofStringsOnly; }
|
|
60896
60950
|
type = getReducedType(type);
|
|
60897
|
-
return type.flags & 1048576 /* Union */ ?
|
|
60951
|
+
return type.flags & 1048576 /* Union */ ? isPossiblyReducibleByInstantiation(type)
|
|
60952
|
+
? getIndexTypeForGenericType(type, stringsOnly)
|
|
60953
|
+
: getIntersectionType(ts.map(type.types, function (t) { return getIndexType(t, stringsOnly, noIndexSignatures); })) :
|
|
60898
60954
|
type.flags & 2097152 /* Intersection */ ? getUnionType(ts.map(type.types, function (t) { return getIndexType(t, stringsOnly, noIndexSignatures); })) :
|
|
60899
60955
|
type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) ? getIndexTypeForGenericType(type, stringsOnly) :
|
|
60900
60956
|
ts.getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, stringsOnly, noIndexSignatures) :
|
|
@@ -61522,6 +61578,10 @@ var ts;
|
|
|
61522
61578
|
}
|
|
61523
61579
|
return type;
|
|
61524
61580
|
}
|
|
61581
|
+
function maybeCloneTypeParameter(p) {
|
|
61582
|
+
var constraint = getConstraintOfTypeParameter(p);
|
|
61583
|
+
return constraint && (isGenericObjectType(constraint) || isGenericIndexType(constraint)) ? cloneTypeParameter(p) : p;
|
|
61584
|
+
}
|
|
61525
61585
|
function isTypicalNondistributiveConditional(root) {
|
|
61526
61586
|
return !root.isDistributive && isSingletonTupleType(root.node.checkType) && isSingletonTupleType(root.node.extendsType);
|
|
61527
61587
|
}
|
|
@@ -61540,37 +61600,65 @@ var ts;
|
|
|
61540
61600
|
var result;
|
|
61541
61601
|
var extraTypes;
|
|
61542
61602
|
var tailCount = 0;
|
|
61543
|
-
|
|
61544
|
-
// types of the form 'A extends B ? X : C extends D ? Y : E extends F ? Z : ...' as a single construct for
|
|
61545
|
-
// purposes of resolution. We also loop here when resolution of a conditional type ends in resolution of
|
|
61546
|
-
// another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
|
|
61547
|
-
// cases we increment the tail recursion counter and stop after 1000 iterations.
|
|
61548
|
-
while (true) {
|
|
61603
|
+
var _loop_18 = function () {
|
|
61549
61604
|
if (tailCount === 1000) {
|
|
61550
61605
|
error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
61551
61606
|
result = errorType;
|
|
61552
|
-
break;
|
|
61607
|
+
return "break";
|
|
61553
61608
|
}
|
|
61554
61609
|
var isUnwrapped = isTypicalNondistributiveConditional(root);
|
|
61555
61610
|
var checkType = instantiateType(unwrapNondistributiveConditionalTuple(root, getActualTypeVariable(root.checkType)), mapper);
|
|
61556
61611
|
var checkTypeInstantiable = isGenericType(checkType);
|
|
61557
61612
|
var extendsType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), mapper);
|
|
61558
61613
|
if (checkType === wildcardType || extendsType === wildcardType) {
|
|
61559
|
-
return wildcardType;
|
|
61614
|
+
return { value: wildcardType };
|
|
61560
61615
|
}
|
|
61561
61616
|
var combinedMapper = void 0;
|
|
61562
61617
|
if (root.inferTypeParameters) {
|
|
61563
|
-
|
|
61564
|
-
|
|
61618
|
+
// When we're looking at making an inference for an infer type, when we get its constraint, it'll automagically be
|
|
61619
|
+
// instantiated with the context, so it doesn't need the mapper for the inference contex - however the constraint
|
|
61620
|
+
// may refer to another _root_, _uncloned_ `infer` type parameter [1], or to something mapped by `mapper` [2].
|
|
61621
|
+
// [1] Eg, if we have `Foo<T, U extends T>` and `Foo<number, infer B>` - `B` is constrained to `T`, which, in turn, has been instantiated
|
|
61622
|
+
// as `number`
|
|
61623
|
+
// Conversely, if we have `Foo<infer A, infer B>`, `B` is still constrained to `T` and `T` is instantiated as `A`
|
|
61624
|
+
// [2] Eg, if we have `Foo<T, U extends T>` and `Foo<Q, infer B>` where `Q` is mapped by `mapper` into `number` - `B` is constrained to `T`
|
|
61625
|
+
// which is in turn instantiated as `Q`, which is in turn instantiated as `number`.
|
|
61626
|
+
// So we need to:
|
|
61627
|
+
// * Clone the type parameters so their constraints can be instantiated in the context of `mapper` (otherwise theyd only get inference context information)
|
|
61628
|
+
// * Set the clones to both map the conditional's enclosing `mapper` and the original params
|
|
61629
|
+
// * instantiate the extends type with the clones
|
|
61630
|
+
// * incorporate all of the component mappers into the combined mapper for the true and false members
|
|
61631
|
+
// This means we have three mappers that need applying:
|
|
61632
|
+
// * The original `mapper` used to create this conditional
|
|
61633
|
+
// * The mapper that maps the old root type parameter to the clone (`freshMapper`)
|
|
61634
|
+
// * The mapper that maps the clone to its inference result (`context.mapper`)
|
|
61635
|
+
var freshParams = ts.sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
|
|
61636
|
+
var freshMapper = freshParams !== root.inferTypeParameters ? createTypeMapper(root.inferTypeParameters, freshParams) : undefined;
|
|
61637
|
+
var context = createInferenceContext(freshParams, /*signature*/ undefined, 0 /* None */);
|
|
61638
|
+
if (freshMapper) {
|
|
61639
|
+
var freshCombinedMapper = combineTypeMappers(mapper, freshMapper);
|
|
61640
|
+
for (var _i = 0, freshParams_1 = freshParams; _i < freshParams_1.length; _i++) {
|
|
61641
|
+
var p = freshParams_1[_i];
|
|
61642
|
+
if (root.inferTypeParameters.indexOf(p) === -1) {
|
|
61643
|
+
p.mapper = freshCombinedMapper;
|
|
61644
|
+
}
|
|
61645
|
+
}
|
|
61646
|
+
}
|
|
61647
|
+
// We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type
|
|
61648
|
+
// if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to
|
|
61649
|
+
// "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint
|
|
61650
|
+
// so in those cases we refain from performing inference and retain the uninfered type parameter
|
|
61651
|
+
if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) {
|
|
61565
61652
|
// We don't want inferences from constraints as they may cause us to eagerly resolve the
|
|
61566
61653
|
// conditional type instead of deferring resolution. Also, we always want strict function
|
|
61567
61654
|
// types rules (i.e. proper contravariance) for inferences.
|
|
61568
|
-
inferTypes(context.inferences, checkType, extendsType, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
|
|
61655
|
+
inferTypes(context.inferences, checkType, instantiateType(extendsType, freshMapper), 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
|
|
61569
61656
|
}
|
|
61657
|
+
var innerMapper = combineTypeMappers(freshMapper, context.mapper);
|
|
61570
61658
|
// It's possible for 'infer T' type paramteters to be given uninstantiated constraints when the
|
|
61571
61659
|
// those type parameters are used in type references (see getInferredTypeParameterConstraint). For
|
|
61572
61660
|
// that reason we need context.mapper to be first in the combined mapper. See #42636 for examples.
|
|
61573
|
-
combinedMapper = mapper ? combineTypeMappers(
|
|
61661
|
+
combinedMapper = mapper ? combineTypeMappers(innerMapper, mapper) : innerMapper;
|
|
61574
61662
|
}
|
|
61575
61663
|
// Instantiate the extends type including inferences for 'infer T' type parameters
|
|
61576
61664
|
var inferredExtendsType = combinedMapper ? instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), combinedMapper) : extendsType;
|
|
@@ -61592,14 +61680,14 @@ var ts;
|
|
|
61592
61680
|
var newRoot = falseType_1.root;
|
|
61593
61681
|
if (newRoot.node.parent === root.node && (!newRoot.isDistributive || newRoot.checkType === root.checkType)) {
|
|
61594
61682
|
root = newRoot;
|
|
61595
|
-
continue;
|
|
61683
|
+
return "continue";
|
|
61596
61684
|
}
|
|
61597
61685
|
if (canTailRecurse(falseType_1, mapper)) {
|
|
61598
|
-
continue;
|
|
61686
|
+
return "continue";
|
|
61599
61687
|
}
|
|
61600
61688
|
}
|
|
61601
61689
|
result = instantiateType(falseType_1, mapper);
|
|
61602
|
-
break;
|
|
61690
|
+
return "break";
|
|
61603
61691
|
}
|
|
61604
61692
|
// Return trueType for a definitely true extends check. We check instantiations of the two
|
|
61605
61693
|
// types with type parameters mapped to their restrictive form, i.e. a form of the type parameter
|
|
@@ -61610,10 +61698,10 @@ var ts;
|
|
|
61610
61698
|
var trueType_1 = getTypeFromTypeNode(root.node.trueType);
|
|
61611
61699
|
var trueMapper = combinedMapper || mapper;
|
|
61612
61700
|
if (canTailRecurse(trueType_1, trueMapper)) {
|
|
61613
|
-
continue;
|
|
61701
|
+
return "continue";
|
|
61614
61702
|
}
|
|
61615
61703
|
result = instantiateType(trueType_1, trueMapper);
|
|
61616
|
-
break;
|
|
61704
|
+
return "break";
|
|
61617
61705
|
}
|
|
61618
61706
|
}
|
|
61619
61707
|
// Return a deferred type for a check that is neither definitely true nor definitely false
|
|
@@ -61625,7 +61713,19 @@ var ts;
|
|
|
61625
61713
|
result.combinedMapper = combinedMapper;
|
|
61626
61714
|
result.aliasSymbol = aliasSymbol || root.aliasSymbol;
|
|
61627
61715
|
result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(root.aliasTypeArguments, mapper); // TODO: GH#18217
|
|
61628
|
-
break;
|
|
61716
|
+
return "break";
|
|
61717
|
+
};
|
|
61718
|
+
// We loop here for an immediately nested conditional type in the false position, effectively treating
|
|
61719
|
+
// types of the form 'A extends B ? X : C extends D ? Y : E extends F ? Z : ...' as a single construct for
|
|
61720
|
+
// purposes of resolution. We also loop here when resolution of a conditional type ends in resolution of
|
|
61721
|
+
// another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
|
|
61722
|
+
// cases we increment the tail recursion counter and stop after 1000 iterations.
|
|
61723
|
+
while (true) {
|
|
61724
|
+
var state_5 = _loop_18();
|
|
61725
|
+
if (typeof state_5 === "object")
|
|
61726
|
+
return state_5.value;
|
|
61727
|
+
if (state_5 === "break")
|
|
61728
|
+
break;
|
|
61629
61729
|
}
|
|
61630
61730
|
return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
|
|
61631
61731
|
// We tail-recurse for generic conditional types that (a) have not already been evaluated and cached, and
|
|
@@ -62047,9 +62147,11 @@ var ts;
|
|
|
62047
62147
|
}
|
|
62048
62148
|
function getESSymbolLikeTypeForNode(node) {
|
|
62049
62149
|
if (ts.isValidESSymbolDeclaration(node)) {
|
|
62050
|
-
var symbol = getSymbolOfNode(node);
|
|
62051
|
-
|
|
62052
|
-
|
|
62150
|
+
var symbol = ts.isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
62151
|
+
if (symbol) {
|
|
62152
|
+
var links = getSymbolLinks(symbol);
|
|
62153
|
+
return links.uniqueESSymbolType || (links.uniqueESSymbolType = createUniqueESSymbolType(symbol));
|
|
62154
|
+
}
|
|
62053
62155
|
}
|
|
62054
62156
|
return esSymbolType;
|
|
62055
62157
|
}
|
|
@@ -62693,6 +62795,10 @@ var ts;
|
|
|
62693
62795
|
}
|
|
62694
62796
|
return type; // Nested invocation of `inferTypeForHomomorphicMappedType` or the `source` instantiated into something unmappable
|
|
62695
62797
|
}
|
|
62798
|
+
function getUniqueLiteralFilledInstantiation(type) {
|
|
62799
|
+
return type.flags & (131068 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type :
|
|
62800
|
+
type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
|
|
62801
|
+
}
|
|
62696
62802
|
function getPermissiveInstantiation(type) {
|
|
62697
62803
|
return type.flags & (131068 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type :
|
|
62698
62804
|
type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper));
|
|
@@ -64152,7 +64258,7 @@ var ts;
|
|
|
64152
64258
|
reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
|
|
64153
64259
|
checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget];
|
|
64154
64260
|
}
|
|
64155
|
-
var
|
|
64261
|
+
var _loop_19 = function (prop) {
|
|
64156
64262
|
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
|
|
64157
64263
|
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
|
|
64158
64264
|
if (reportErrors) {
|
|
@@ -64215,9 +64321,9 @@ var ts;
|
|
|
64215
64321
|
};
|
|
64216
64322
|
for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
|
|
64217
64323
|
var prop = _b[_i];
|
|
64218
|
-
var
|
|
64219
|
-
if (typeof
|
|
64220
|
-
return
|
|
64324
|
+
var state_6 = _loop_19(prop);
|
|
64325
|
+
if (typeof state_6 === "object")
|
|
64326
|
+
return state_6.value;
|
|
64221
64327
|
}
|
|
64222
64328
|
return false;
|
|
64223
64329
|
}
|
|
@@ -65207,11 +65313,11 @@ var ts;
|
|
|
65207
65313
|
// constituents of 'target'. If any combination does not have a match then 'source' is not relatable.
|
|
65208
65314
|
var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
|
|
65209
65315
|
var matchingTypes = [];
|
|
65210
|
-
var
|
|
65316
|
+
var _loop_20 = function (combination) {
|
|
65211
65317
|
var hasMatch = false;
|
|
65212
65318
|
outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
|
|
65213
65319
|
var type = _d[_c];
|
|
65214
|
-
var
|
|
65320
|
+
var _loop_21 = function (i) {
|
|
65215
65321
|
var sourceProperty = sourcePropertiesFiltered[i];
|
|
65216
65322
|
var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
|
|
65217
65323
|
if (!targetProperty)
|
|
@@ -65227,8 +65333,8 @@ var ts;
|
|
|
65227
65333
|
}
|
|
65228
65334
|
};
|
|
65229
65335
|
for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
|
|
65230
|
-
var
|
|
65231
|
-
switch (
|
|
65336
|
+
var state_8 = _loop_21(i);
|
|
65337
|
+
switch (state_8) {
|
|
65232
65338
|
case "continue-outer": continue outer;
|
|
65233
65339
|
}
|
|
65234
65340
|
}
|
|
@@ -65241,9 +65347,9 @@ var ts;
|
|
|
65241
65347
|
};
|
|
65242
65348
|
for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
|
|
65243
65349
|
var combination = discriminantCombinations_1[_a];
|
|
65244
|
-
var
|
|
65245
|
-
if (typeof
|
|
65246
|
-
return
|
|
65350
|
+
var state_7 = _loop_20(combination);
|
|
65351
|
+
if (typeof state_7 === "object")
|
|
65352
|
+
return state_7.value;
|
|
65247
65353
|
}
|
|
65248
65354
|
// Compare the remaining non-discriminant properties of each match.
|
|
65249
65355
|
var result = -1 /* True */;
|
|
@@ -65956,7 +66062,7 @@ var ts;
|
|
|
65956
66062
|
// The emptyArray singleton is used to signal a recursive invocation.
|
|
65957
66063
|
cache.variances = ts.emptyArray;
|
|
65958
66064
|
variances = [];
|
|
65959
|
-
var
|
|
66065
|
+
var _loop_22 = function (tp) {
|
|
65960
66066
|
var unmeasurable = false;
|
|
65961
66067
|
var unreliable = false;
|
|
65962
66068
|
var oldHandler = outofbandVarianceMarkerHandler;
|
|
@@ -65988,7 +66094,7 @@ var ts;
|
|
|
65988
66094
|
};
|
|
65989
66095
|
for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
|
|
65990
66096
|
var tp = typeParameters_1[_i];
|
|
65991
|
-
|
|
66097
|
+
_loop_22(tp);
|
|
65992
66098
|
}
|
|
65993
66099
|
cache.variances = variances;
|
|
65994
66100
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
@@ -68359,7 +68465,7 @@ var ts;
|
|
|
68359
68465
|
function mapTypesByKeyProperty(types, name) {
|
|
68360
68466
|
var map = new ts.Map();
|
|
68361
68467
|
var count = 0;
|
|
68362
|
-
var
|
|
68468
|
+
var _loop_23 = function (type) {
|
|
68363
68469
|
if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {
|
|
68364
68470
|
var discriminant = getTypeOfPropertyOfType(type, name);
|
|
68365
68471
|
if (discriminant) {
|
|
@@ -68385,9 +68491,9 @@ var ts;
|
|
|
68385
68491
|
};
|
|
68386
68492
|
for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
|
|
68387
68493
|
var type = types_16[_i];
|
|
68388
|
-
var
|
|
68389
|
-
if (typeof
|
|
68390
|
-
return
|
|
68494
|
+
var state_9 = _loop_23(type);
|
|
68495
|
+
if (typeof state_9 === "object")
|
|
68496
|
+
return state_9.value;
|
|
68391
68497
|
}
|
|
68392
68498
|
return count >= 10 && count * 2 >= types.length ? map : undefined;
|
|
68393
68499
|
}
|
|
@@ -74718,7 +74824,7 @@ var ts;
|
|
|
74718
74824
|
if (spreadIndex >= 0) {
|
|
74719
74825
|
// Create synthetic arguments from spreads of tuple types.
|
|
74720
74826
|
var effectiveArgs_1 = args.slice(0, spreadIndex);
|
|
74721
|
-
var
|
|
74827
|
+
var _loop_24 = function (i) {
|
|
74722
74828
|
var arg = args[i];
|
|
74723
74829
|
// We can call checkExpressionCached because spread expressions never have a contextual type.
|
|
74724
74830
|
var spreadType = arg.kind === 224 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
|
|
@@ -74735,7 +74841,7 @@ var ts;
|
|
|
74735
74841
|
}
|
|
74736
74842
|
};
|
|
74737
74843
|
for (var i = spreadIndex; i < args.length; i++) {
|
|
74738
|
-
|
|
74844
|
+
_loop_24(i);
|
|
74739
74845
|
}
|
|
74740
74846
|
return effectiveArgs_1;
|
|
74741
74847
|
}
|
|
@@ -75048,7 +75154,7 @@ var ts;
|
|
|
75048
75154
|
var min_3 = Number.MAX_VALUE;
|
|
75049
75155
|
var minIndex = 0;
|
|
75050
75156
|
var i_1 = 0;
|
|
75051
|
-
var
|
|
75157
|
+
var _loop_25 = function (c) {
|
|
75052
75158
|
var chain_2 = function () { return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
|
|
75053
75159
|
var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0 /* Normal */, /*reportErrors*/ true, chain_2);
|
|
75054
75160
|
if (diags_2) {
|
|
@@ -75066,7 +75172,7 @@ var ts;
|
|
|
75066
75172
|
};
|
|
75067
75173
|
for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
|
|
75068
75174
|
var c = candidatesForArgumentError_1[_a];
|
|
75069
|
-
|
|
75175
|
+
_loop_25(c);
|
|
75070
75176
|
}
|
|
75071
75177
|
var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
|
|
75072
75178
|
ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
@@ -75224,7 +75330,7 @@ var ts;
|
|
|
75224
75330
|
}
|
|
75225
75331
|
var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
|
|
75226
75332
|
var parameters = [];
|
|
75227
|
-
var
|
|
75333
|
+
var _loop_26 = function (i) {
|
|
75228
75334
|
var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
|
|
75229
75335
|
i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
|
|
75230
75336
|
i < s.parameters.length ? s.parameters[i] : undefined; });
|
|
@@ -75232,7 +75338,7 @@ var ts;
|
|
|
75232
75338
|
parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
|
|
75233
75339
|
};
|
|
75234
75340
|
for (var i = 0; i < maxNonRestParam; i++) {
|
|
75235
|
-
|
|
75341
|
+
_loop_26(i);
|
|
75236
75342
|
}
|
|
75237
75343
|
var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
|
|
75238
75344
|
var flags = 0 /* None */;
|
|
@@ -78459,7 +78565,7 @@ var ts;
|
|
|
78459
78565
|
}
|
|
78460
78566
|
function checkExpressionForMutableLocation(node, checkMode, contextualType, forceTuple) {
|
|
78461
78567
|
var type = checkExpression(node, checkMode, forceTuple);
|
|
78462
|
-
return isConstContext(node) ? getRegularTypeOfLiteralType(type) :
|
|
78568
|
+
return isConstContext(node) || ts.isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) :
|
|
78463
78569
|
isTypeAssertion(node) ? type :
|
|
78464
78570
|
getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType(node) : contextualType, node));
|
|
78465
78571
|
}
|
|
@@ -79228,7 +79334,7 @@ var ts;
|
|
|
79228
79334
|
var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
|
|
79229
79335
|
if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
|
|
79230
79336
|
var indexSignatureMap_1 = new ts.Map();
|
|
79231
|
-
var
|
|
79337
|
+
var _loop_27 = function (declaration) {
|
|
79232
79338
|
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
|
|
79233
79339
|
forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
|
|
79234
79340
|
var entry = indexSignatureMap_1.get(getTypeId(type));
|
|
@@ -79243,7 +79349,7 @@ var ts;
|
|
|
79243
79349
|
};
|
|
79244
79350
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
79245
79351
|
var declaration = _a[_i];
|
|
79246
|
-
|
|
79352
|
+
_loop_27(declaration);
|
|
79247
79353
|
}
|
|
79248
79354
|
indexSignatureMap_1.forEach(function (entry) {
|
|
79249
79355
|
if (entry.declarations.length > 1) {
|
|
@@ -82622,7 +82728,7 @@ var ts;
|
|
|
82622
82728
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 257 /* InterfaceDeclaration */) : undefined;
|
|
82623
82729
|
var localPropDeclaration = declaration && declaration.kind === 220 /* BinaryExpression */ ||
|
|
82624
82730
|
name && name.kind === 161 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
|
|
82625
|
-
var
|
|
82731
|
+
var _loop_28 = function (info) {
|
|
82626
82732
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
82627
82733
|
// We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
|
|
82628
82734
|
// in the containing type, or (c) the containing type is an interface and no base interface contains both the property and
|
|
@@ -82635,7 +82741,7 @@ var ts;
|
|
|
82635
82741
|
};
|
|
82636
82742
|
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
82637
82743
|
var info = indexInfos_9[_i];
|
|
82638
|
-
|
|
82744
|
+
_loop_28(info);
|
|
82639
82745
|
}
|
|
82640
82746
|
}
|
|
82641
82747
|
function checkIndexConstraintForIndexSignature(type, checkInfo) {
|
|
@@ -82643,7 +82749,7 @@ var ts;
|
|
|
82643
82749
|
var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
|
|
82644
82750
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 257 /* InterfaceDeclaration */) : undefined;
|
|
82645
82751
|
var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
|
|
82646
|
-
var
|
|
82752
|
+
var _loop_29 = function (info) {
|
|
82647
82753
|
if (info === checkInfo)
|
|
82648
82754
|
return "continue";
|
|
82649
82755
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
@@ -82658,7 +82764,7 @@ var ts;
|
|
|
82658
82764
|
};
|
|
82659
82765
|
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
82660
82766
|
var info = indexInfos_10[_i];
|
|
82661
|
-
|
|
82767
|
+
_loop_29(info);
|
|
82662
82768
|
}
|
|
82663
82769
|
}
|
|
82664
82770
|
function checkTypeNameIsReserved(name, message) {
|
|
@@ -82969,7 +83075,7 @@ var ts;
|
|
|
82969
83075
|
var baseTypes = baseTypeNode && getBaseTypes(type);
|
|
82970
83076
|
var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
|
|
82971
83077
|
var baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
82972
|
-
var
|
|
83078
|
+
var _loop_30 = function (member) {
|
|
82973
83079
|
if (ts.hasAmbientModifier(member)) {
|
|
82974
83080
|
return "continue";
|
|
82975
83081
|
}
|
|
@@ -82986,7 +83092,7 @@ var ts;
|
|
|
82986
83092
|
};
|
|
82987
83093
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
82988
83094
|
var member = _a[_i];
|
|
82989
|
-
|
|
83095
|
+
_loop_30(member);
|
|
82990
83096
|
}
|
|
82991
83097
|
}
|
|
82992
83098
|
/**
|
|
@@ -83074,7 +83180,7 @@ var ts;
|
|
|
83074
83180
|
function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
|
|
83075
83181
|
// iterate over all implemented properties and issue errors on each one which isn't compatible, rather than the class as a whole, if possible
|
|
83076
83182
|
var issuedMemberError = false;
|
|
83077
|
-
var
|
|
83183
|
+
var _loop_31 = function (member) {
|
|
83078
83184
|
if (ts.isStatic(member)) {
|
|
83079
83185
|
return "continue";
|
|
83080
83186
|
}
|
|
@@ -83093,7 +83199,7 @@ var ts;
|
|
|
83093
83199
|
};
|
|
83094
83200
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
83095
83201
|
var member = _a[_i];
|
|
83096
|
-
|
|
83202
|
+
_loop_31(member);
|
|
83097
83203
|
}
|
|
83098
83204
|
if (!issuedMemberError) {
|
|
83099
83205
|
// check again with diagnostics to generate a less-specific error
|
|
@@ -110058,7 +110164,7 @@ var ts;
|
|
|
110058
110164
|
return emitRestOrJSDocVariadicType(node);
|
|
110059
110165
|
case 318 /* JSDocNamepathType */:
|
|
110060
110166
|
return;
|
|
110061
|
-
case 319 /*
|
|
110167
|
+
case 319 /* JSDoc */:
|
|
110062
110168
|
return emitJSDoc(node);
|
|
110063
110169
|
case 321 /* JSDocTypeLiteral */:
|
|
110064
110170
|
return emitJSDocTypeLiteral(node);
|
|
@@ -120880,7 +120986,7 @@ var ts;
|
|
|
120880
120986
|
});
|
|
120881
120987
|
// Sort by paths closest to importing file Name directory
|
|
120882
120988
|
var sortedPaths = [];
|
|
120883
|
-
var
|
|
120989
|
+
var _loop_32 = function (directory) {
|
|
120884
120990
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
120885
120991
|
var pathsInDirectory;
|
|
120886
120992
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -120904,9 +121010,9 @@ var ts;
|
|
|
120904
121010
|
};
|
|
120905
121011
|
var out_directory_1;
|
|
120906
121012
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
120907
|
-
var
|
|
121013
|
+
var state_10 = _loop_32(directory);
|
|
120908
121014
|
directory = out_directory_1;
|
|
120909
|
-
if (
|
|
121015
|
+
if (state_10 === "break")
|
|
120910
121016
|
break;
|
|
120911
121017
|
}
|
|
120912
121018
|
if (allFileNames.size) {
|
|
@@ -172619,47 +172725,18 @@ var ts;
|
|
|
172619
172725
|
}
|
|
172620
172726
|
return ts.deduplicate(outputs, ts.equateValues);
|
|
172621
172727
|
}
|
|
172622
|
-
|
|
172623
|
-
|
|
172624
|
-
|
|
172625
|
-
return ts.contains(result, output, areEqual);
|
|
172626
|
-
});
|
|
172627
|
-
}
|
|
172628
|
-
function addToCombineOutputResult(outputs, project, result) {
|
|
172629
|
-
if (result.length)
|
|
172630
|
-
outputs.push({ project: project, result: result });
|
|
172631
|
-
}
|
|
172632
|
-
function combineProjectOutputFromEveryProject(projectService, action, areEqual) {
|
|
172633
|
-
var outputs = [];
|
|
172634
|
-
projectService.loadAncestorProjectTree();
|
|
172635
|
-
projectService.forEachEnabledProject(function (project) {
|
|
172636
|
-
var theseOutputs = action(project);
|
|
172637
|
-
addToCombineOutputResult(outputs, project, ts.filter(theseOutputs, function (output) { return !combineOutputResultContains(outputs, output, areEqual); }));
|
|
172638
|
-
});
|
|
172639
|
-
return outputs;
|
|
172640
|
-
}
|
|
172641
|
-
function flattenCombineOutputResult(outputs) {
|
|
172642
|
-
return ts.flatMap(outputs, function (_a) {
|
|
172643
|
-
var result = _a.result;
|
|
172644
|
-
return result;
|
|
172645
|
-
});
|
|
172646
|
-
}
|
|
172647
|
-
function combineProjectOutputWhileOpeningReferencedProjects(projects, defaultProject, action, getLocation, resultsEqual) {
|
|
172648
|
-
var outputs = [];
|
|
172649
|
-
combineProjectOutputWorker(projects, defaultProject,
|
|
172650
|
-
/*initialLocation*/ undefined, function (project, _, tryAddToTodo) {
|
|
172651
|
-
var theseOutputs = action(project);
|
|
172652
|
-
addToCombineOutputResult(outputs, project, ts.filter(theseOutputs, function (output) { return !combineOutputResultContains(outputs, output, resultsEqual) && !tryAddToTodo(project, getLocation(output)); }));
|
|
172653
|
-
});
|
|
172654
|
-
return outputs;
|
|
172655
|
-
}
|
|
172656
|
-
function combineProjectOutputForRenameLocations(projects, defaultProject, initialLocation, findInStrings, findInComments, hostPreferences) {
|
|
172728
|
+
;
|
|
172729
|
+
function combineProjectOutputForRenameLocations(projects, defaultProject, initialLocation, findInStrings, findInComments, _a) {
|
|
172730
|
+
var providePrefixAndSuffixTextForRename = _a.providePrefixAndSuffixTextForRename;
|
|
172657
172731
|
var outputs = [];
|
|
172658
172732
|
combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, tryAddToTodo) {
|
|
172659
|
-
|
|
172660
|
-
|
|
172661
|
-
|
|
172662
|
-
|
|
172733
|
+
var projectOutputs = project.getLanguageService().findRenameLocations(location.fileName, location.pos, findInStrings, findInComments, providePrefixAndSuffixTextForRename);
|
|
172734
|
+
if (projectOutputs) {
|
|
172735
|
+
for (var _i = 0, projectOutputs_1 = projectOutputs; _i < projectOutputs_1.length; _i++) {
|
|
172736
|
+
var output = projectOutputs_1[_i];
|
|
172737
|
+
if (!ts.contains(outputs, output, ts.documentSpansEqual) && !tryAddToTodo(project, documentSpanLocation(output))) {
|
|
172738
|
+
outputs.push(output);
|
|
172739
|
+
}
|
|
172663
172740
|
}
|
|
172664
172741
|
}
|
|
172665
172742
|
});
|
|
@@ -172674,43 +172751,33 @@ var ts;
|
|
|
172674
172751
|
var outputs = [];
|
|
172675
172752
|
combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, getMappedLocation) {
|
|
172676
172753
|
logger.info("Finding references to " + location.fileName + " position " + location.pos + " in project " + project.getProjectName());
|
|
172677
|
-
var
|
|
172678
|
-
|
|
172679
|
-
var
|
|
172680
|
-
|
|
172681
|
-
|
|
172682
|
-
|
|
172683
|
-
symbolToAddTo = {
|
|
172684
|
-
|
|
172685
|
-
|
|
172686
|
-
|
|
172687
|
-
|
|
172688
|
-
|
|
172689
|
-
|
|
172690
|
-
|
|
172754
|
+
var projectOutputs = project.getLanguageService().findReferences(location.fileName, location.pos);
|
|
172755
|
+
if (projectOutputs) {
|
|
172756
|
+
var _loop_8 = function (referencedSymbol) {
|
|
172757
|
+
var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(referencedSymbol.definition));
|
|
172758
|
+
var definition = mappedDefinitionFile === undefined ?
|
|
172759
|
+
referencedSymbol.definition : __assign(__assign({}, referencedSymbol.definition), { textSpan: ts.createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length), fileName: mappedDefinitionFile.fileName, contextSpan: getMappedContextSpan(referencedSymbol.definition, project) });
|
|
172760
|
+
var symbolToAddTo = ts.find(outputs, function (o) { return ts.documentSpansEqual(o.definition, definition); });
|
|
172761
|
+
if (!symbolToAddTo) {
|
|
172762
|
+
symbolToAddTo = { definition: definition, references: [] };
|
|
172763
|
+
outputs.push(symbolToAddTo);
|
|
172764
|
+
}
|
|
172765
|
+
for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) {
|
|
172766
|
+
var ref = _b[_a];
|
|
172767
|
+
// If it's in a mapped file, that is added to the todo list by `getMappedLocation`.
|
|
172768
|
+
if (!ts.contains(symbolToAddTo.references, ref, ts.documentSpansEqual) && !getMappedLocation(project, documentSpanLocation(ref))) {
|
|
172769
|
+
symbolToAddTo.references.push(ref);
|
|
172770
|
+
}
|
|
172691
172771
|
}
|
|
172772
|
+
};
|
|
172773
|
+
for (var _i = 0, projectOutputs_2 = projectOutputs; _i < projectOutputs_2.length; _i++) {
|
|
172774
|
+
var referencedSymbol = projectOutputs_2[_i];
|
|
172775
|
+
_loop_8(referencedSymbol);
|
|
172692
172776
|
}
|
|
172693
|
-
};
|
|
172694
|
-
for (var _i = 0, _a = project.getLanguageService().findReferences(location.fileName, location.pos) || server.emptyArray; _i < _a.length; _i++) {
|
|
172695
|
-
var outputReferencedSymbol = _a[_i];
|
|
172696
|
-
_loop_8(outputReferencedSymbol);
|
|
172697
172777
|
}
|
|
172698
172778
|
});
|
|
172699
172779
|
return outputs.filter(function (o) { return o.references.length !== 0; });
|
|
172700
172780
|
}
|
|
172701
|
-
function combineProjectOutputForFileReferences(projects, defaultProject, fileName) {
|
|
172702
|
-
var outputs = [];
|
|
172703
|
-
combineProjectOutputWorker(projects, defaultProject,
|
|
172704
|
-
/*initialLocation*/ undefined, function (project) {
|
|
172705
|
-
for (var _i = 0, _a = project.getLanguageService().getFileReferences(fileName) || server.emptyArray; _i < _a.length; _i++) {
|
|
172706
|
-
var referenceEntry = _a[_i];
|
|
172707
|
-
if (!ts.contains(outputs, referenceEntry, ts.documentSpansEqual)) {
|
|
172708
|
-
outputs.push(referenceEntry);
|
|
172709
|
-
}
|
|
172710
|
-
}
|
|
172711
|
-
});
|
|
172712
|
-
return outputs;
|
|
172713
|
-
}
|
|
172714
172781
|
function forEachProjectInProjects(projects, path, cb) {
|
|
172715
172782
|
for (var _i = 0, _a = ts.isArray(projects) ? projects : projects.projects; _i < _a.length; _i++) {
|
|
172716
172783
|
var project = _a[_i];
|
|
@@ -174049,7 +174116,21 @@ var ts;
|
|
|
174049
174116
|
Session.prototype.getFileReferences = function (args, simplifiedResult) {
|
|
174050
174117
|
var _this = this;
|
|
174051
174118
|
var projects = this.getProjects(args);
|
|
174052
|
-
var
|
|
174119
|
+
var fileName = args.file;
|
|
174120
|
+
var references = [];
|
|
174121
|
+
forEachProjectInProjects(projects, /*path*/ undefined, function (project) {
|
|
174122
|
+
if (project.getCancellationToken().isCancellationRequested())
|
|
174123
|
+
return;
|
|
174124
|
+
var projectOutputs = project.getLanguageService().getFileReferences(fileName);
|
|
174125
|
+
if (projectOutputs) {
|
|
174126
|
+
for (var _i = 0, projectOutputs_3 = projectOutputs; _i < projectOutputs_3.length; _i++) {
|
|
174127
|
+
var referenceEntry = projectOutputs_3[_i];
|
|
174128
|
+
if (!ts.contains(references, referenceEntry, ts.documentSpansEqual)) {
|
|
174129
|
+
references.push(referenceEntry);
|
|
174130
|
+
}
|
|
174131
|
+
}
|
|
174132
|
+
}
|
|
174133
|
+
});
|
|
174053
174134
|
if (!simplifiedResult)
|
|
174054
174135
|
return references;
|
|
174055
174136
|
var refs = references.map(function (entry) { return referenceEntryToReferencesResponseItem(_this.projectService, entry); });
|
|
@@ -174448,10 +174529,13 @@ var ts;
|
|
|
174448
174529
|
Session.prototype.getNavigateToItems = function (args, simplifiedResult) {
|
|
174449
174530
|
var full = this.getFullNavigateToItems(args);
|
|
174450
174531
|
return !simplifiedResult ?
|
|
174451
|
-
flattenCombineOutputResult(full) :
|
|
174452
174532
|
ts.flatMap(full, function (_a) {
|
|
174453
|
-
var
|
|
174454
|
-
return
|
|
174533
|
+
var navigateToItems = _a.navigateToItems;
|
|
174534
|
+
return navigateToItems;
|
|
174535
|
+
}) :
|
|
174536
|
+
ts.flatMap(full, function (_a) {
|
|
174537
|
+
var project = _a.project, navigateToItems = _a.navigateToItems;
|
|
174538
|
+
return navigateToItems.map(function (navItem) {
|
|
174455
174539
|
var scriptInfo = project.getScriptInfo(navItem.fileName);
|
|
174456
174540
|
var bakedItem = {
|
|
174457
174541
|
name: navItem.name,
|
|
@@ -174481,13 +174565,57 @@ var ts;
|
|
|
174481
174565
|
if (currentFileOnly) {
|
|
174482
174566
|
ts.Debug.assertIsDefined(args.file);
|
|
174483
174567
|
var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
|
|
174484
|
-
return [{ project: project,
|
|
174568
|
+
return [{ project: project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }];
|
|
174569
|
+
}
|
|
174570
|
+
var outputs = [];
|
|
174571
|
+
// This is effectively a hashset with `name` as the custom hash and `navigateToItemIsEqualTo` as the custom equals.
|
|
174572
|
+
// `name` is a very cheap hash function, but we could incorporate other properties to reduce collisions.
|
|
174573
|
+
var seenItems = new ts.Map(); // name to items with that name
|
|
174574
|
+
if (!args.file && !projectFileName) {
|
|
174575
|
+
// VS Code's `Go to symbol in workspaces` sends request like this
|
|
174576
|
+
// TODO (https://github.com/microsoft/TypeScript/issues/47839)
|
|
174577
|
+
// This appears to have been intended to search all projects but, in practice, it seems to only search
|
|
174578
|
+
// those that are downstream from already-loaded projects.
|
|
174579
|
+
// Filtering by !isSourceOfProjectReferenceRedirect is new, but seems appropriate and consistent with
|
|
174580
|
+
// the case below.
|
|
174581
|
+
this.projectService.loadAncestorProjectTree();
|
|
174582
|
+
this.projectService.forEachEnabledProject(function (project) { return addItemsForProject(project); });
|
|
174485
174583
|
}
|
|
174486
|
-
else
|
|
174487
|
-
|
|
174584
|
+
else {
|
|
174585
|
+
// VS's `Go to symbol` sends requests with just a project and doesn't want cascading since it will
|
|
174586
|
+
// send a separate request for each project of interest
|
|
174587
|
+
// TODO (https://github.com/microsoft/TypeScript/issues/47839)
|
|
174588
|
+
// This doesn't really make sense unless it's a single project matching `projectFileName`
|
|
174589
|
+
var projects = this.getProjects(args);
|
|
174590
|
+
forEachProjectInProjects(projects, /*path*/ undefined, function (project) { return addItemsForProject(project); });
|
|
174591
|
+
}
|
|
174592
|
+
return outputs;
|
|
174593
|
+
// Mutates `outputs`
|
|
174594
|
+
function addItemsForProject(project) {
|
|
174595
|
+
var projectItems = project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*filename*/ undefined, /*excludeDts*/ project.isNonTsProject());
|
|
174596
|
+
var unseenItems = ts.filter(projectItems, function (item) { return tryAddSeenItem(item) && !getMappedLocation(documentSpanLocation(item), project); });
|
|
174597
|
+
if (unseenItems.length) {
|
|
174598
|
+
outputs.push({ project: project, navigateToItems: unseenItems });
|
|
174599
|
+
}
|
|
174600
|
+
}
|
|
174601
|
+
// Returns true if the item had not been seen before
|
|
174602
|
+
// Mutates `seenItems`
|
|
174603
|
+
function tryAddSeenItem(item) {
|
|
174604
|
+
var name = item.name;
|
|
174605
|
+
if (!seenItems.has(name)) {
|
|
174606
|
+
seenItems.set(name, [item]);
|
|
174607
|
+
return true;
|
|
174608
|
+
}
|
|
174609
|
+
var seen = seenItems.get(name);
|
|
174610
|
+
for (var _i = 0, seen_1 = seen; _i < seen_1.length; _i++) {
|
|
174611
|
+
var seenItem = seen_1[_i];
|
|
174612
|
+
if (navigateToItemIsEqualTo(seenItem, item)) {
|
|
174613
|
+
return false;
|
|
174614
|
+
}
|
|
174615
|
+
}
|
|
174616
|
+
seen.push(item);
|
|
174617
|
+
return true;
|
|
174488
174618
|
}
|
|
174489
|
-
var fileArgs = args;
|
|
174490
|
-
return combineProjectOutputWhileOpeningReferencedProjects(this.getProjects(fileArgs), this.getDefaultProject(fileArgs), function (project) { return project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*fileName*/ undefined, /*excludeDts*/ project.isNonTsProject()); }, documentSpanLocation, navigateToItemIsEqualTo);
|
|
174491
174619
|
function navigateToItemIsEqualTo(a, b) {
|
|
174492
174620
|
if (a === b) {
|
|
174493
174621
|
return true;
|
|
@@ -174579,8 +174707,28 @@ var ts;
|
|
|
174579
174707
|
var newPath = server.toNormalizedPath(args.newFilePath);
|
|
174580
174708
|
var formatOptions = this.getHostFormatOptions();
|
|
174581
174709
|
var preferences = this.getHostPreferences();
|
|
174582
|
-
var
|
|
174583
|
-
|
|
174710
|
+
var seenFiles = new ts.Set();
|
|
174711
|
+
var textChanges = [];
|
|
174712
|
+
// TODO (https://github.com/microsoft/TypeScript/issues/47839)
|
|
174713
|
+
// This appears to have been intended to search all projects but, in practice, it seems to only search
|
|
174714
|
+
// those that are downstream from already-loaded projects.
|
|
174715
|
+
this.projectService.loadAncestorProjectTree();
|
|
174716
|
+
this.projectService.forEachEnabledProject(function (project) {
|
|
174717
|
+
var projectTextChanges = project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences);
|
|
174718
|
+
var projectFiles = [];
|
|
174719
|
+
for (var _i = 0, projectTextChanges_1 = projectTextChanges; _i < projectTextChanges_1.length; _i++) {
|
|
174720
|
+
var textChange = projectTextChanges_1[_i];
|
|
174721
|
+
if (!seenFiles.has(textChange.fileName)) {
|
|
174722
|
+
textChanges.push(textChange);
|
|
174723
|
+
projectFiles.push(textChange.fileName);
|
|
174724
|
+
}
|
|
174725
|
+
}
|
|
174726
|
+
for (var _a = 0, projectFiles_1 = projectFiles; _a < projectFiles_1.length; _a++) {
|
|
174727
|
+
var file = projectFiles_1[_a];
|
|
174728
|
+
seenFiles.add(file);
|
|
174729
|
+
}
|
|
174730
|
+
});
|
|
174731
|
+
return simplifiedResult ? textChanges.map(function (c) { return _this.mapTextChangeToCodeEdit(c); }) : textChanges;
|
|
174584
174732
|
};
|
|
174585
174733
|
Session.prototype.getCodeFixes = function (args, simplifiedResult) {
|
|
174586
174734
|
var _this = this;
|