@typescript-deploys/pr-build 4.7.0-pr-48112-6 → 4.7.0-pr-48168-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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-insiders.20220304";
297
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220309";
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) {
@@ -8901,7 +8903,6 @@ var ts;
8901
8903
  Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"),
8902
8904
  Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
8903
8905
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
8904
- All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
8905
8906
  Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
8906
8907
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
8907
8908
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -9219,7 +9220,6 @@ var ts;
9219
9220
  Command_line_Options: diag(6171, ts.DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"),
9220
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'."),
9221
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."),
9222
- List_of_language_service_plugins: diag(6181, ts.DiagnosticCategory.Message, "List_of_language_service_plugins_6181", "List of language service plugins."),
9223
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}'"),
9224
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}'."),
9225
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}'."),
@@ -9326,7 +9326,7 @@ var ts;
9326
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"),
9327
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"),
9328
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"),
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
+ Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."),
9330
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')"),
9331
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."),
9332
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."),
@@ -9337,7 +9337,6 @@ var ts;
9337
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}'"),
9338
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}'"),
9339
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}'"),
9340
- Enable_incremental_compilation: diag(6378, ts.DiagnosticCategory.Message, "Enable_incremental_compilation_6378", "Enable incremental compilation"),
9341
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."),
9342
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"),
9343
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}'"),
@@ -9365,13 +9364,13 @@ var ts;
9365
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?"),
9366
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."),
9367
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."),
9368
- 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."),
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."),
9369
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."),
9370
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."),
9371
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."),
9372
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."),
9373
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."),
9374
- 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."),
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."),
9375
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."),
9376
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."),
9377
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."),
@@ -9384,13 +9383,13 @@ var ts;
9384
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."),
9385
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."),
9386
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."),
9387
- 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."),
9388
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."),
9389
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."),
9390
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."),
9391
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."),
9392
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"),
9393
- 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."),
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."),
9394
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."),
9395
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."),
9396
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."),
@@ -9400,7 +9399,7 @@ var ts;
9400
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."),
9401
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."),
9402
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`."),
9403
- 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."),
9404
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."),
9405
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."),
9406
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."),
@@ -9410,77 +9409,76 @@ var ts;
9410
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."),
9411
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."),
9412
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."),
9413
- 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'."),
9414
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'."),
9415
- 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*`.`"),
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*'."),
9416
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."),
9417
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."),
9418
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."),
9419
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."),
9420
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."),
9421
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."),
9422
- 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`."),
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'."),
9423
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."),
9424
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."),
9425
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."),
9426
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."),
9427
- 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."),
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."),
9428
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."),
9429
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."),
9430
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."),
9431
- 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.."),
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."),
9432
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."),
9433
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."),
9434
- 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`."),
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'."),
9435
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."),
9436
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."),
9437
- 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"),
9438
- 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."),
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."),
9439
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."),
9440
- 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."),
9441
- Enable_error_reporting_when_a_local_variables_aren_t_read: diag(6675, ts.DiagnosticCategory.Message, "Enable_error_reporting_when_a_local_variables_aren_t_read_6675", "Enable error reporting when a local variables aren't read."),
9442
- 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"),
9443
- Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use `outFile` instead."),
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."),
9444
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."),
9445
- 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."),
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."),
9446
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."),
9447
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."),
9448
- 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."),
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."),
9449
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."),
9450
- 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"),
9451
- 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"),
9452
- 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."),
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."),
9453
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."),
9454
9453
  Disable_emitting_comments: diag(6688, ts.DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."),
9455
- 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."),
9456
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."),
9457
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."),
9458
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."),
9459
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."),
9460
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."),
9461
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."),
9462
- 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."),
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."),
9463
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."),
9464
- 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`."),
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'."),
9465
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."),
9466
- 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."),
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."),
9467
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."),
9468
- 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."),
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."),
9469
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."),
9470
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."),
9471
- 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."),
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."),
9472
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."),
9473
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."),
9474
- 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`."),
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'."),
9475
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."),
9476
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."),
9477
- 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."),
9478
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."),
9479
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."),
9480
- Include_undefined_in_index_signature_results: diag(6716, ts.DiagnosticCategory.Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"),
9481
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."),
9482
- 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"),
9483
- Type_catch_clause_variables_as_unknown_instead_of_any: diag(6803, ts.DiagnosticCategory.Message, "Type_catch_clause_variables_as_unknown_instead_of_any_6803", "Type catch clause variables as 'unknown' instead of 'any'."),
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'."),
9484
9482
  one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
9485
9483
  one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
9486
9484
  type_Colon: diag(6902, ts.DiagnosticCategory.Message, "type_Colon_6902", "type:"),
@@ -13031,7 +13029,7 @@ var ts;
13031
13029
  return ts.emptyArray;
13032
13030
  }
13033
13031
  if (ts.isJSDocTypeAlias(node)) {
13034
- ts.Debug.assert(node.parent.kind === 319 /* JSDocComment */);
13032
+ ts.Debug.assert(node.parent.kind === 319 /* JSDoc */);
13035
13033
  return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
13036
13034
  }
13037
13035
  if (node.typeParameters) {
@@ -13978,7 +13976,7 @@ var ts;
13978
13976
  ts.isJSDocNode = isJSDocNode;
13979
13977
  /** True if node is of a kind that may contain comment text. */
13980
13978
  function isJSDocCommentContainingNode(node) {
13981
- return node.kind === 319 /* JSDocComment */
13979
+ return node.kind === 319 /* JSDoc */
13982
13980
  || node.kind === 318 /* JSDocNamepathType */
13983
13981
  || node.kind === 320 /* JSDocText */
13984
13982
  || isJSDocLinkLike(node)
@@ -15028,7 +15026,7 @@ var ts;
15028
15026
  return name.kind === 161 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
15029
15027
  }
15030
15028
  ts.isComputedNonLiteralName = isComputedNonLiteralName;
15031
- function getTextOfPropertyName(name) {
15029
+ function tryGetTextOfPropertyName(name) {
15032
15030
  switch (name.kind) {
15033
15031
  case 79 /* Identifier */:
15034
15032
  case 80 /* PrivateIdentifier */:
@@ -15040,11 +15038,15 @@ var ts;
15040
15038
  case 161 /* ComputedPropertyName */:
15041
15039
  if (isStringOrNumericLiteralLike(name.expression))
15042
15040
  return ts.escapeLeadingUnderscores(name.expression.text);
15043
- return ts.Debug.fail("Text of property name cannot be read from non-literal-valued ComputedPropertyNames");
15041
+ return undefined;
15044
15042
  default:
15045
15043
  return ts.Debug.assertNever(name);
15046
15044
  }
15047
15045
  }
15046
+ ts.tryGetTextOfPropertyName = tryGetTextOfPropertyName;
15047
+ function getTextOfPropertyName(name) {
15048
+ return ts.Debug.checkDefined(tryGetTextOfPropertyName(name));
15049
+ }
15048
15050
  ts.getTextOfPropertyName = getTextOfPropertyName;
15049
15051
  function entityNameToString(name) {
15050
15052
  switch (name.kind) {
@@ -15596,7 +15598,7 @@ var ts;
15596
15598
  function getPropertyAssignment(objectLiteral, key, key2) {
15597
15599
  return objectLiteral.properties.filter(function (property) {
15598
15600
  if (property.kind === 295 /* PropertyAssignment */) {
15599
- var propName = getTextOfPropertyName(property.name);
15601
+ var propName = tryGetTextOfPropertyName(property.name);
15600
15602
  return key === propName || (!!key2 && key2 === propName);
15601
15603
  }
15602
15604
  return false;
@@ -18436,7 +18438,7 @@ var ts;
18436
18438
  ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
18437
18439
  /** template tags are only available when a typedef isn't already using them */
18438
18440
  function isNonTypeAliasTemplate(tag) {
18439
- return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /* JSDocComment */ && tag.parent.tags.some(isJSDocTypeAlias));
18441
+ return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias));
18440
18442
  }
18441
18443
  /**
18442
18444
  * Gets the effective type annotation of the value parameter of a set accessor. If the node
@@ -21208,7 +21210,6 @@ var ts;
21208
21210
  parenthesizeExpressionForDisallowedComma: parenthesizeExpressionForDisallowedComma,
21209
21211
  parenthesizeExpressionOfExpressionStatement: parenthesizeExpressionOfExpressionStatement,
21210
21212
  parenthesizeConciseBodyOfArrowFunction: parenthesizeConciseBodyOfArrowFunction,
21211
- parenthesizeCheckTypeOfConditionalType: parenthesizeCheckTypeOfConditionalType,
21212
21213
  parenthesizeMemberOfConditionalType: parenthesizeMemberOfConditionalType,
21213
21214
  parenthesizeMemberOfElementType: parenthesizeMemberOfElementType,
21214
21215
  parenthesizeElementTypeOfArrayType: parenthesizeElementTypeOfArrayType,
@@ -21525,10 +21526,6 @@ var ts;
21525
21526
  }
21526
21527
  return body;
21527
21528
  }
21528
- function parenthesizeCheckTypeOfConditionalType(member) {
21529
- return ts.isInferTypeNode(member) ? factory.createParenthesizedType(member) :
21530
- parenthesizeMemberOfConditionalType(member);
21531
- }
21532
21529
  function parenthesizeMemberOfConditionalType(member) {
21533
21530
  return member.kind === 188 /* ConditionalType */ ? factory.createParenthesizedType(member) : member;
21534
21531
  }
@@ -21581,7 +21578,6 @@ var ts;
21581
21578
  parenthesizeExpressionForDisallowedComma: ts.identity,
21582
21579
  parenthesizeExpressionOfExpressionStatement: ts.identity,
21583
21580
  parenthesizeConciseBodyOfArrowFunction: ts.identity,
21584
- parenthesizeCheckTypeOfConditionalType: ts.identity,
21585
21581
  parenthesizeMemberOfConditionalType: ts.identity,
21586
21582
  parenthesizeMemberOfElementType: ts.identity,
21587
21583
  parenthesizeElementTypeOfArrayType: ts.identity,
@@ -23198,7 +23194,7 @@ var ts;
23198
23194
  // @api
23199
23195
  function createConditionalTypeNode(checkType, extendsType, trueType, falseType) {
23200
23196
  var node = createBaseNode(188 /* ConditionalType */);
23201
- node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType);
23197
+ node.checkType = parenthesizerRules().parenthesizeMemberOfConditionalType(checkType);
23202
23198
  node.extendsType = parenthesizerRules().parenthesizeMemberOfConditionalType(extendsType);
23203
23199
  node.trueType = trueType;
23204
23200
  node.falseType = falseType;
@@ -25419,7 +25415,7 @@ var ts;
25419
25415
  }
25420
25416
  // @api
25421
25417
  function createJSDocComment(comment, tags) {
25422
- var node = createBaseNode(319 /* JSDocComment */);
25418
+ var node = createBaseNode(319 /* JSDoc */);
25423
25419
  node.comment = comment;
25424
25420
  node.tags = asNodeArray(tags);
25425
25421
  return node;
@@ -28928,7 +28924,7 @@ var ts;
28928
28924
  }
28929
28925
  ts.isJSDocNamepathType = isJSDocNamepathType;
28930
28926
  function isJSDoc(node) {
28931
- return node.kind === 319 /* JSDocComment */;
28927
+ return node.kind === 319 /* JSDoc */;
28932
28928
  }
28933
28929
  ts.isJSDoc = isJSDoc;
28934
28930
  function isJSDocTypeLiteral(node) {
@@ -30553,7 +30549,7 @@ var ts;
30553
30549
  case 316 /* JSDocFunctionType */:
30554
30550
  return visitNodes(cbNode, cbNodes, node.parameters) ||
30555
30551
  visitNode(cbNode, node.type);
30556
- case 319 /* JSDocComment */:
30552
+ case 319 /* JSDoc */:
30557
30553
  return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
30558
30554
  || visitNodes(cbNode, cbNodes, node.tags);
30559
30555
  case 345 /* JSDocSeeTag */:
@@ -32772,9 +32768,6 @@ var ts;
32772
32768
  return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
32773
32769
  }
32774
32770
  function parseTypeParameter() {
32775
- return parseTypeParameterWorker(/*canHaveDefault*/ true);
32776
- }
32777
- function parseTypeParameterWorker(canHaveDefault) {
32778
32771
  var pos = getNodePos();
32779
32772
  var name = parseIdentifier();
32780
32773
  var constraint;
@@ -32798,7 +32791,7 @@ var ts;
32798
32791
  expression = parseUnaryExpressionOrHigher();
32799
32792
  }
32800
32793
  }
32801
- var defaultType = canHaveDefault && parseOptional(63 /* EqualsToken */) ? parseType() : undefined;
32794
+ var defaultType = parseOptional(63 /* EqualsToken */) ? parseType() : undefined;
32802
32795
  var node = factory.createTypeParameterDeclaration(name, constraint, defaultType);
32803
32796
  node.expression = expression;
32804
32797
  return finishNode(node, pos);
@@ -33463,10 +33456,16 @@ var ts;
33463
33456
  parseExpected(operator);
33464
33457
  return finishNode(factory.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos);
33465
33458
  }
33459
+ function parseTypeParameterOfInferType() {
33460
+ var pos = getNodePos();
33461
+ return finishNode(factory.createTypeParameterDeclaration(parseIdentifier(),
33462
+ /*constraint*/ undefined,
33463
+ /*defaultType*/ undefined), pos);
33464
+ }
33466
33465
  function parseInferType() {
33467
33466
  var pos = getNodePos();
33468
33467
  parseExpected(137 /* InferKeyword */);
33469
- return finishNode(factory.createInferTypeNode(parseTypeParameterWorker(/*canHaveDefault*/ false)), pos);
33468
+ return finishNode(factory.createInferTypeNode(parseTypeParameterOfInferType()), pos);
33470
33469
  }
33471
33470
  function parseTypeOperatorOrHigher() {
33472
33471
  var operator = token();
@@ -38784,7 +38783,7 @@ var ts;
38784
38783
  shortName: "i",
38785
38784
  type: "boolean",
38786
38785
  category: ts.Diagnostics.Projects,
38787
- description: ts.Diagnostics.Enable_incremental_compilation,
38786
+ description: ts.Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,
38788
38787
  transpileOptionValue: undefined,
38789
38788
  defaultValueDescription: ts.Diagnostics.false_unless_composite_is_set
38790
38789
  },
@@ -39184,7 +39183,7 @@ var ts;
39184
39183
  affectsSemanticDiagnostics: true,
39185
39184
  strictFlag: true,
39186
39185
  category: ts.Diagnostics.Type_Checking,
39187
- description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
39186
+ description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
39188
39187
  defaultValueDescription: false,
39189
39188
  },
39190
39189
  {
@@ -39202,7 +39201,7 @@ var ts;
39202
39201
  type: "boolean",
39203
39202
  affectsSemanticDiagnostics: true,
39204
39203
  category: ts.Diagnostics.Type_Checking,
39205
- description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
39204
+ description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
39206
39205
  defaultValueDescription: false,
39207
39206
  },
39208
39207
  {
@@ -39243,7 +39242,7 @@ var ts;
39243
39242
  type: "boolean",
39244
39243
  affectsSemanticDiagnostics: true,
39245
39244
  category: ts.Diagnostics.Type_Checking,
39246
- description: ts.Diagnostics.Include_undefined_in_index_signature_results,
39245
+ description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
39247
39246
  defaultValueDescription: false,
39248
39247
  },
39249
39248
  {
@@ -39434,7 +39433,8 @@ var ts;
39434
39433
  name: "jsxFragmentFactory",
39435
39434
  type: "string",
39436
39435
  category: ts.Diagnostics.Language_and_Environment,
39437
- description: ts.Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment
39436
+ description: ts.Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,
39437
+ defaultValueDescription: "React.Fragment",
39438
39438
  },
39439
39439
  {
39440
39440
  name: "jsxImportSource",
@@ -39718,7 +39718,7 @@ var ts;
39718
39718
  name: "plugin",
39719
39719
  type: "object"
39720
39720
  },
39721
- description: ts.Diagnostics.List_of_language_service_plugins,
39721
+ description: ts.Diagnostics.Specify_a_list_of_language_service_plugins_to_include,
39722
39722
  category: ts.Diagnostics.Editor_Support,
39723
39723
  },
39724
39724
  ];
@@ -44523,7 +44523,7 @@ var ts;
44523
44523
  return ts.isDottedName(expr)
44524
44524
  || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression)
44525
44525
  || ts.isBinaryExpression(expr) && expr.operatorToken.kind === 27 /* CommaToken */ && isNarrowableReference(expr.right)
44526
- || ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression)
44526
+ || ts.isElementAccessExpression(expr) && (ts.isStringOrNumericLiteralLike(expr.argumentExpression) || ts.isEntityNameExpression(expr.argumentExpression)) && isNarrowableReference(expr.expression)
44527
44527
  || ts.isAssignmentExpression(expr) && isNarrowableReference(expr.left);
44528
44528
  }
44529
44529
  function containsNarrowableReference(expr) {
@@ -48801,7 +48801,7 @@ var ts;
48801
48801
  // - parameters are only in the scope of function body
48802
48802
  // This restriction does not apply to JSDoc comment types because they are parented
48803
48803
  // at a higher level than type parameters would normally be
48804
- if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /* JSDocComment */) {
48804
+ if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /* JSDoc */) {
48805
48805
  useResult = result.flags & 262144 /* TypeParameter */
48806
48806
  // type parameters are visible in parameter list, return type and type parameter list
48807
48807
  ? lastLocation === location.type ||
@@ -52759,7 +52759,15 @@ var ts;
52759
52759
  });
52760
52760
  }
52761
52761
  }
52762
- if (!symbolName) {
52762
+ if (symbolName === undefined) {
52763
+ var name = ts.firstDefined(symbol.declarations, ts.getNameOfDeclaration);
52764
+ if (name && ts.isComputedPropertyName(name) && ts.isEntityName(name.expression)) {
52765
+ var LHS = createAccessFromSymbolChain(chain, index - 1, stopper);
52766
+ if (ts.isEntityName(LHS)) {
52767
+ return ts.factory.createIndexedAccessTypeNode(ts.factory.createParenthesizedType(ts.factory.createTypeQueryNode(LHS)), ts.factory.createTypeQueryNode(name.expression));
52768
+ }
52769
+ return LHS;
52770
+ }
52763
52771
  symbolName = getNameOfSymbolAsWritten(symbol, context);
52764
52772
  }
52765
52773
  context.approximateLength += symbolName.length + 1;
@@ -56085,7 +56093,7 @@ var ts;
56085
56093
  node = paramSymbol.valueDeclaration;
56086
56094
  }
56087
56095
  break;
56088
- case 319 /* JSDocComment */: {
56096
+ case 319 /* JSDoc */: {
56089
56097
  var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
56090
56098
  return node.tags
56091
56099
  ? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
@@ -59534,7 +59542,7 @@ var ts;
59534
59542
  function getConditionalFlowTypeOfType(type, node) {
59535
59543
  var constraints;
59536
59544
  var covariant = true;
59537
- while (node && !ts.isStatement(node) && node.kind !== 319 /* JSDocComment */) {
59545
+ while (node && !ts.isStatement(node) && node.kind !== 319 /* JSDoc */) {
59538
59546
  var parent = node.parent;
59539
59547
  // only consider variance flipped by parameter locations - `keyof` types would usually be considered variance inverting, but
59540
59548
  // often get used in indexed accesses where they behave sortof invariantly, but our checking is lax
@@ -60201,6 +60209,10 @@ var ts;
60201
60209
  return includes;
60202
60210
  }
60203
60211
  function removeSubtypes(types, hasObjectTypes) {
60212
+ // [] and [T] immediately reduce to [] and [T] respectively
60213
+ if (types.length < 2) {
60214
+ return types;
60215
+ }
60204
60216
  var id = getTypeListId(types);
60205
60217
  var match = subtypeReductionCache.get(id);
60206
60218
  if (match) {
@@ -65499,7 +65511,7 @@ var ts;
65499
65511
  var requireOptionalProperties = (relation === subtypeRelation || relation === strictSubtypeRelation) && !isObjectLiteralType(source) && !isEmptyArrayLiteralType(source) && !isTupleType(source);
65500
65512
  var unmatchedProperty = getUnmatchedProperty(source, target, requireOptionalProperties, /*matchDiscriminantProperties*/ false);
65501
65513
  if (unmatchedProperty) {
65502
- if (reportErrors) {
65514
+ if (reportErrors && shouldReportUnmatchedPropertyError(source, target)) {
65503
65515
  reportUnmatchedProperty(source, target, unmatchedProperty, requireOptionalProperties);
65504
65516
  }
65505
65517
  return 0 /* False */;
@@ -65655,6 +65667,19 @@ var ts;
65655
65667
  }
65656
65668
  return result;
65657
65669
  }
65670
+ function shouldReportUnmatchedPropertyError(source, target) {
65671
+ var typeCallSignatures = getSignaturesOfStructuredType(source, 0 /* Call */);
65672
+ var typeConstructSignatures = getSignaturesOfStructuredType(source, 1 /* Construct */);
65673
+ var typeProperties = getPropertiesOfObjectType(source);
65674
+ if ((typeCallSignatures.length || typeConstructSignatures.length) && !typeProperties.length) {
65675
+ if ((getSignaturesOfType(target, 0 /* Call */).length && typeCallSignatures.length) ||
65676
+ (getSignaturesOfType(target, 1 /* Construct */).length && typeConstructSignatures.length)) {
65677
+ return true; // target has similar signature kinds to source, still focus on the unmatched property
65678
+ }
65679
+ return false;
65680
+ }
65681
+ return true;
65682
+ }
65658
65683
  function reportIncompatibleCallSignatureReturn(siga, sigb) {
65659
65684
  if (siga.parameters.length === 0 && sigb.parameters.length === 0) {
65660
65685
  return function (source, target) { return reportIncompatibleError(ts.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source), typeToString(target)); };
@@ -68230,8 +68255,9 @@ var ts;
68230
68255
  return isMatchingReference(source.expression, target);
68231
68256
  case 205 /* PropertyAccessExpression */:
68232
68257
  case 206 /* ElementAccessExpression */:
68233
- return ts.isAccessExpression(target) &&
68234
- getAccessedPropertyName(source) === getAccessedPropertyName(target) &&
68258
+ var sourcePropertyName = getAccessedPropertyName(source);
68259
+ var targetPropertyName = ts.isAccessExpression(target) ? getAccessedPropertyName(target) : undefined;
68260
+ return sourcePropertyName !== undefined && targetPropertyName !== undefined && targetPropertyName === sourcePropertyName &&
68235
68261
  isMatchingReference(source.expression, target.expression);
68236
68262
  case 160 /* QualifiedName */:
68237
68263
  return ts.isAccessExpression(target) &&
@@ -68243,12 +68269,49 @@ var ts;
68243
68269
  return false;
68244
68270
  }
68245
68271
  function getAccessedPropertyName(access) {
68246
- var propertyName;
68247
- return access.kind === 205 /* PropertyAccessExpression */ ? access.name.escapedText :
68248
- access.kind === 206 /* ElementAccessExpression */ && ts.isStringOrNumericLiteralLike(access.argumentExpression) ? ts.escapeLeadingUnderscores(access.argumentExpression.text) :
68249
- access.kind === 202 /* BindingElement */ && (propertyName = getDestructuringPropertyName(access)) ? ts.escapeLeadingUnderscores(propertyName) :
68250
- access.kind === 163 /* Parameter */ ? ("" + access.parent.parameters.indexOf(access)) :
68251
- undefined;
68272
+ if (ts.isPropertyAccessExpression(access)) {
68273
+ return access.name.escapedText;
68274
+ }
68275
+ if (ts.isElementAccessExpression(access)) {
68276
+ return tryGetElementAccessExpressionName(access);
68277
+ }
68278
+ if (ts.isBindingElement(access)) {
68279
+ var name = getDestructuringPropertyName(access);
68280
+ return name ? ts.escapeLeadingUnderscores(name) : undefined;
68281
+ }
68282
+ if (ts.isParameter(access)) {
68283
+ return ("" + access.parent.parameters.indexOf(access));
68284
+ }
68285
+ return undefined;
68286
+ }
68287
+ function tryGetNameFromType(type) {
68288
+ return type.flags & 8192 /* UniqueESSymbol */ ? type.escapedName :
68289
+ type.flags & 384 /* StringOrNumberLiteral */ ? ts.escapeLeadingUnderscores("" + type.value) : undefined;
68290
+ }
68291
+ function tryGetElementAccessExpressionName(node) {
68292
+ if (ts.isStringOrNumericLiteralLike(node.argumentExpression)) {
68293
+ return ts.escapeLeadingUnderscores(node.argumentExpression.text);
68294
+ }
68295
+ if (ts.isEntityNameExpression(node.argumentExpression)) {
68296
+ var symbol = resolveEntityName(node.argumentExpression, 111551 /* Value */, /*ignoreErrors*/ true);
68297
+ if (!symbol || !isConstVariable(symbol))
68298
+ return undefined;
68299
+ var declaration = symbol.valueDeclaration;
68300
+ if (declaration === undefined)
68301
+ return undefined;
68302
+ var type = tryGetTypeFromEffectiveTypeNode(declaration);
68303
+ if (type) {
68304
+ var name = tryGetNameFromType(type);
68305
+ if (name !== undefined) {
68306
+ return name;
68307
+ }
68308
+ }
68309
+ if (ts.hasOnlyExpressionInitializer(declaration)) {
68310
+ var initializer = ts.getEffectiveInitializer(declaration);
68311
+ return initializer && tryGetNameFromType(getTypeOfExpression(initializer));
68312
+ }
68313
+ }
68314
+ return undefined;
68252
68315
  }
68253
68316
  function containsMatchingReference(source, target) {
68254
68317
  while (ts.isAccessExpression(source)) {
@@ -71754,11 +71817,21 @@ var ts;
71754
71817
  }
71755
71818
  return false;
71756
71819
  }
71820
+ function uniqueStrings(strings) {
71821
+ var unique = new ts.Set(strings);
71822
+ var result = [];
71823
+ unique.forEach(function (str) { return result.push(str); });
71824
+ return result;
71825
+ }
71757
71826
  function discriminateContextualTypeByObjectMembers(node, contextualType) {
71758
- return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 295 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
71827
+ return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 295 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(uniqueStrings(ts.flatMap(contextualType.types, function (memberType) {
71828
+ return ts.map(ts.filter(getPropertiesOfType(memberType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return s.escapedName; });
71829
+ })), function (name) { return [function () { return undefinedType; }, name]; })), isTypeAssignableTo, contextualType);
71759
71830
  }
71760
71831
  function discriminateContextualTypeByJSXAttributes(node, contextualType) {
71761
- return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return getContextFreeTypeOfExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
71832
+ return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return getContextFreeTypeOfExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(uniqueStrings(ts.flatMap(contextualType.types, function (memberType) {
71833
+ return ts.map(ts.filter(getPropertiesOfType(memberType), function (s) { var _a; return !!(s.flags & 16777216 /* Optional */) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return s.escapedName; });
71834
+ })), function (name) { return [function () { return undefinedType; }, name]; })), isTypeAssignableTo, contextualType);
71762
71835
  }
71763
71836
  // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily
71764
71837
  // be "pushed" onto a node using the contextualType property.
@@ -73253,21 +73326,20 @@ var ts;
73253
73326
  // of the property as base classes
73254
73327
  var enclosingClass = forEachEnclosingClass(location, function (enclosingDeclaration) {
73255
73328
  var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
73256
- return isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing) ? enclosingClass : undefined;
73329
+ return isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);
73257
73330
  });
73258
73331
  // A protected property is accessible if the property is within the declaring class or classes derived from it
73259
73332
  if (!enclosingClass) {
73260
73333
  // allow PropertyAccessibility if context is in function with this parameter
73261
- // static member access is disallow
73262
- var thisParameter = void 0;
73263
- if (flags & 32 /* Static */ || !(thisParameter = getThisParameterFromNodeContext(location)) || !thisParameter.type) {
73334
+ // static member access is disallowed
73335
+ enclosingClass = getEnclosingClassFromThisParameter(location);
73336
+ enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);
73337
+ if (flags & 32 /* Static */ || !enclosingClass) {
73264
73338
  if (errorNode) {
73265
73339
  error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType));
73266
73340
  }
73267
73341
  return false;
73268
73342
  }
73269
- var thisType = getTypeFromTypeNode(thisParameter.type);
73270
- enclosingClass = ((thisType.flags & 262144 /* TypeParameter */) ? getConstraintOfTypeParameter(thisType) : thisType).target;
73271
73343
  }
73272
73344
  // No further restrictions for static properties
73273
73345
  if (flags & 32 /* Static */) {
@@ -73285,6 +73357,17 @@ var ts;
73285
73357
  }
73286
73358
  return true;
73287
73359
  }
73360
+ function getEnclosingClassFromThisParameter(node) {
73361
+ var thisParameter = getThisParameterFromNodeContext(node);
73362
+ var thisType = (thisParameter === null || thisParameter === void 0 ? void 0 : thisParameter.type) && getTypeFromTypeNode(thisParameter.type);
73363
+ if (thisType && thisType.flags & 262144 /* TypeParameter */) {
73364
+ thisType = getConstraintOfTypeParameter(thisType);
73365
+ }
73366
+ if (thisType && ts.getObjectFlags(thisType) & (3 /* ClassOrInterface */ | 4 /* Reference */)) {
73367
+ return getTargetType(thisType);
73368
+ }
73369
+ return undefined;
73370
+ }
73288
73371
  function getThisParameterFromNodeContext(node) {
73289
73372
  var thisContainer = ts.getThisContainer(node, /* includeArrowFunctions */ false);
73290
73373
  return thisContainer && ts.isFunctionLike(thisContainer) ? ts.getThisParameter(thisContainer) : undefined;
@@ -75393,7 +75476,7 @@ var ts;
75393
75476
  // then it cannot be instantiated.
75394
75477
  // In the case of a merged class-module or class-interface declaration,
75395
75478
  // only the class declaration node will have the Abstract flag set.
75396
- if (constructSignatures.some(function (signature) { return signature.flags & 4 /* Abstract */; })) {
75479
+ if (someSignature(constructSignatures, function (signature) { return !!(signature.flags & 4 /* Abstract */); })) {
75397
75480
  error(node, ts.Diagnostics.Cannot_create_an_instance_of_an_abstract_class);
75398
75481
  return resolveErrorCall(node);
75399
75482
  }
@@ -75424,6 +75507,12 @@ var ts;
75424
75507
  invocationError(node.expression, expressionType, 1 /* Construct */);
75425
75508
  return resolveErrorCall(node);
75426
75509
  }
75510
+ function someSignature(signatures, f) {
75511
+ if (ts.isArray(signatures)) {
75512
+ return ts.some(signatures, function (signature) { return someSignature(signature, f); });
75513
+ }
75514
+ return signatures.compositeKind === 1048576 /* Union */ ? ts.some(signatures.compositeSignatures, f) : f(signatures);
75515
+ }
75427
75516
  function typeHasProtectedAccessibleBase(target, type) {
75428
75517
  var baseTypes = getBaseTypes(type);
75429
75518
  if (!ts.length(baseTypes)) {
@@ -77266,7 +77355,7 @@ var ts;
77266
77355
  case 40 /* MinusToken */:
77267
77356
  case 54 /* TildeToken */:
77268
77357
  checkNonNullType(operandType, node.operand);
77269
- if (maybeTypeOfKind(operandType, 12288 /* ESSymbolLike */)) {
77358
+ if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288 /* ESSymbolLike */)) {
77270
77359
  error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
77271
77360
  }
77272
77361
  if (node.operator === 39 /* PlusToken */) {
@@ -77314,6 +77403,13 @@ var ts;
77314
77403
  // If it's not a bigint type, implicit coercion will result in a number
77315
77404
  return numberType;
77316
77405
  }
77406
+ function maybeTypeOfKindConsideringBaseConstraint(type, kind) {
77407
+ if (maybeTypeOfKind(type, kind)) {
77408
+ return true;
77409
+ }
77410
+ var baseConstraint = getBaseConstraintOrType(type);
77411
+ return !!baseConstraint && maybeTypeOfKind(baseConstraint, kind);
77412
+ }
77317
77413
  // Return true if type might be of the given kind. A union or intersection type might be of a given
77318
77414
  // kind if at least one constituent type is of the given kind.
77319
77415
  function maybeTypeOfKind(type, kind) {
@@ -78023,8 +78119,8 @@ var ts;
78023
78119
  }
78024
78120
  // Return true if there was no error, false if there was an error.
78025
78121
  function checkForDisallowedESSymbolOperand(operator) {
78026
- var offendingSymbolOperand = maybeTypeOfKind(leftType, 12288 /* ESSymbolLike */) ? left :
78027
- maybeTypeOfKind(rightType, 12288 /* ESSymbolLike */) ? right :
78122
+ var offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left :
78123
+ maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right :
78028
78124
  undefined;
78029
78125
  if (offendingSymbolOperand) {
78030
78126
  error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator));
@@ -78228,7 +78324,7 @@ var ts;
78228
78324
  for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
78229
78325
  var span = _a[_i];
78230
78326
  var type = checkExpression(span.expression);
78231
- if (maybeTypeOfKind(type, 12288 /* ESSymbolLike */)) {
78327
+ if (maybeTypeOfKindConsideringBaseConstraint(type, 12288 /* ESSymbolLike */)) {
78232
78328
  error(span.expression, ts.Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String);
78233
78329
  }
78234
78330
  texts.push(span.literal.text);
@@ -79574,23 +79670,6 @@ var ts;
79574
79670
  grammarErrorOnNode(node, ts.Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type);
79575
79671
  }
79576
79672
  checkSourceElement(node.typeParameter);
79577
- var symbol = getSymbolOfNode(node.typeParameter);
79578
- if (symbol.declarations && symbol.declarations.length > 1) {
79579
- var links = getSymbolLinks(symbol);
79580
- if (!links.typeParametersChecked) {
79581
- links.typeParametersChecked = true;
79582
- var typeParameter = getDeclaredTypeOfTypeParameter(symbol);
79583
- var declarations = ts.getDeclarationsOfKind(symbol, 162 /* TypeParameter */);
79584
- if (!areTypeParametersIdentical(declarations, [typeParameter], function (decl) { return [decl]; })) {
79585
- // Report an error on every conflicting declaration.
79586
- var name = symbolToString(symbol);
79587
- for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
79588
- var declaration = declarations_4[_i];
79589
- error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_constraints, name);
79590
- }
79591
- }
79592
- }
79593
- }
79594
79673
  registerForUnusedIdentifiersCheck(node);
79595
79674
  }
79596
79675
  function checkTemplateLiteralType(node) {
@@ -79770,8 +79849,8 @@ var ts;
79770
79849
  var hasNonAmbientClass = false;
79771
79850
  var functionDeclarations = [];
79772
79851
  if (declarations) {
79773
- for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
79774
- var current = declarations_5[_i];
79852
+ for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
79853
+ var current = declarations_4[_i];
79775
79854
  var node = current;
79776
79855
  var inAmbientContext = node.flags & 8388608 /* Ambient */;
79777
79856
  var inAmbientContextOrInterface = node.parent && (node.parent.kind === 257 /* InterfaceDeclaration */ || node.parent.kind === 181 /* TypeLiteral */) || inAmbientContext;
@@ -80918,8 +80997,8 @@ var ts;
80918
80997
  : ts.createDiagnosticForNode(declarationList.parent.kind === 236 /* VariableStatement */ ? declarationList.parent : declarationList, ts.Diagnostics.All_variables_are_unused));
80919
80998
  }
80920
80999
  else {
80921
- for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
80922
- var decl = declarations_6[_i];
81000
+ for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
81001
+ var decl = declarations_5[_i];
80923
81002
  addDiagnostic(decl, 0 /* Local */, ts.createDiagnosticForNode(decl, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name)));
80924
81003
  }
80925
81004
  }
@@ -82712,23 +82791,23 @@ var ts;
82712
82791
  return;
82713
82792
  }
82714
82793
  var type = getDeclaredTypeOfSymbol(symbol);
82715
- if (!areTypeParametersIdentical(declarations, type.localTypeParameters, ts.getEffectiveTypeParameterDeclarations)) {
82794
+ if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) {
82716
82795
  // Report an error on every conflicting declaration.
82717
82796
  var name = symbolToString(symbol);
82718
- for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
82719
- var declaration = declarations_7[_i];
82797
+ for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) {
82798
+ var declaration = declarations_6[_i];
82720
82799
  error(declaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name);
82721
82800
  }
82722
82801
  }
82723
82802
  }
82724
82803
  }
82725
- function areTypeParametersIdentical(declarations, targetParameters, getTypeParameterDeclarations) {
82804
+ function areTypeParametersIdentical(declarations, targetParameters) {
82726
82805
  var maxTypeArgumentCount = ts.length(targetParameters);
82727
82806
  var minTypeArgumentCount = getMinTypeArgumentCount(targetParameters);
82728
- for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
82729
- var declaration = declarations_8[_i];
82807
+ for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) {
82808
+ var declaration = declarations_7[_i];
82730
82809
  // If this declaration has too few or too many type parameters, we report an error
82731
- var sourceParameters = getTypeParameterDeclarations(declaration);
82810
+ var sourceParameters = ts.getEffectiveTypeParameterDeclarations(declaration);
82732
82811
  var numTypeParameters = sourceParameters.length;
82733
82812
  if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) {
82734
82813
  return false;
@@ -83272,7 +83351,7 @@ var ts;
83272
83351
  }
83273
83352
  if (!ts.isStatic(member) && isPropertyWithoutInitializer(member)) {
83274
83353
  var propName = member.name;
83275
- if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName)) {
83354
+ if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName) || ts.isComputedPropertyName(propName)) {
83276
83355
  var type = getTypeOfSymbol(getSymbolOfNode(member));
83277
83356
  if (!(type.flags & 3 /* AnyOrUnknown */ || getFalsyFlags(type) & 32768 /* Undefined */)) {
83278
83357
  if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -83307,7 +83386,9 @@ var ts;
83307
83386
  return false;
83308
83387
  }
83309
83388
  function isPropertyInitializedInConstructor(propName, propType, constructor) {
83310
- var reference = ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propName);
83389
+ var reference = ts.isComputedPropertyName(propName)
83390
+ ? ts.factory.createElementAccessExpression(ts.factory.createThis(), propName.expression)
83391
+ : ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propName);
83311
83392
  ts.setParent(reference.expression, reference);
83312
83393
  ts.setParent(reference, constructor);
83313
83394
  reference.flowNode = constructor.returnFlowNode;
@@ -83596,8 +83677,8 @@ var ts;
83596
83677
  function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
83597
83678
  var declarations = symbol.declarations;
83598
83679
  if (declarations) {
83599
- for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
83600
- var declaration = declarations_9[_i];
83680
+ for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
83681
+ var declaration = declarations_8[_i];
83601
83682
  if ((declaration.kind === 256 /* ClassDeclaration */ ||
83602
83683
  (declaration.kind === 255 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) &&
83603
83684
  !(declaration.flags & 8388608 /* Ambient */)) {
@@ -92864,10 +92945,7 @@ var ts;
92864
92945
  var substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue);
92865
92946
  if (!compilerOptions.removeComments) {
92866
92947
  var originalNode = ts.getOriginalNode(node, ts.isAccessExpression);
92867
- var propertyName = ts.isPropertyAccessExpression(originalNode)
92868
- ? ts.declarationNameToString(originalNode.name)
92869
- : safeMultiLineComment(ts.getTextOfNode(originalNode.argumentExpression));
92870
- ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " " + propertyName + " ");
92948
+ ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " " + safeMultiLineComment(ts.getTextOfNode(originalNode)) + " ");
92871
92949
  }
92872
92950
  return substitute;
92873
92951
  }
@@ -98666,8 +98744,8 @@ var ts;
98666
98744
  // declarations may not be sorted by position.
98667
98745
  // pos should be the minimum* position over all nodes (that's not -1), end should be the maximum end over all nodes.
98668
98746
  var pos = -1, end = -1;
98669
- for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
98670
- var node = declarations_10[_i];
98747
+ for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
98748
+ var node = declarations_9[_i];
98671
98749
  pos = pos === -1 ? node.pos : node.pos === -1 ? pos : Math.min(pos, node.pos);
98672
98750
  end = Math.max(end, node.end);
98673
98751
  }
@@ -109987,7 +110065,7 @@ var ts;
109987
110065
  return emitRestOrJSDocVariadicType(node);
109988
110066
  case 318 /* JSDocNamepathType */:
109989
110067
  return;
109990
- case 319 /* JSDocComment */:
110068
+ case 319 /* JSDoc */:
109991
110069
  return emitJSDoc(node);
109992
110070
  case 321 /* JSDocTypeLiteral */:
109993
110071
  return emitJSDocTypeLiteral(node);
@@ -127150,6 +127228,14 @@ var ts;
127150
127228
  });
127151
127229
  }
127152
127230
  ts.signatureToDisplayParts = signatureToDisplayParts;
127231
+ function nodeToDisplayParts(node, enclosingDeclaration) {
127232
+ var file = enclosingDeclaration.getSourceFile();
127233
+ return mapToDisplayParts(function (writer) {
127234
+ var printer = ts.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
127235
+ printer.writeNode(4 /* Unspecified */, node, file, writer);
127236
+ });
127237
+ }
127238
+ ts.nodeToDisplayParts = nodeToDisplayParts;
127153
127239
  function isImportOrExportSpecifierName(location) {
127154
127240
  return !!location.parent && ts.isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location;
127155
127241
  }
@@ -130490,6 +130576,8 @@ var ts;
130490
130576
  CompletionSource["ClassMemberSnippet"] = "ClassMemberSnippet/";
130491
130577
  /** A type-only import that needs to be promoted in order to be used at the completion location */
130492
130578
  CompletionSource["TypeOnlyAlias"] = "TypeOnlyAlias/";
130579
+ /** Auto-import that comes attached to an object literal method snippet */
130580
+ CompletionSource["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
130493
130581
  })(CompletionSource = Completions.CompletionSource || (Completions.CompletionSource = {}));
130494
130582
  var SymbolOriginInfoKind;
130495
130583
  (function (SymbolOriginInfoKind) {
@@ -130500,6 +130588,7 @@ var ts;
130500
130588
  SymbolOriginInfoKind[SymbolOriginInfoKind["Nullable"] = 16] = "Nullable";
130501
130589
  SymbolOriginInfoKind[SymbolOriginInfoKind["ResolvedExport"] = 32] = "ResolvedExport";
130502
130590
  SymbolOriginInfoKind[SymbolOriginInfoKind["TypeOnlyAlias"] = 64] = "TypeOnlyAlias";
130591
+ SymbolOriginInfoKind[SymbolOriginInfoKind["ObjectLiteralMethod"] = 128] = "ObjectLiteralMethod";
130503
130592
  SymbolOriginInfoKind[SymbolOriginInfoKind["SymbolMemberNoExport"] = 2] = "SymbolMemberNoExport";
130504
130593
  SymbolOriginInfoKind[SymbolOriginInfoKind["SymbolMemberExport"] = 6] = "SymbolMemberExport";
130505
130594
  })(SymbolOriginInfoKind || (SymbolOriginInfoKind = {}));
@@ -130530,6 +130619,9 @@ var ts;
130530
130619
  function originIsTypeOnlyAlias(origin) {
130531
130620
  return !!(origin && origin.kind & 64 /* TypeOnlyAlias */);
130532
130621
  }
130622
+ function originIsObjectLiteralMethod(origin) {
130623
+ return !!(origin && origin.kind & 128 /* ObjectLiteralMethod */);
130624
+ }
130533
130625
  var KeywordCompletionFilters;
130534
130626
  (function (KeywordCompletionFilters) {
130535
130627
  KeywordCompletionFilters[KeywordCompletionFilters["None"] = 0] = "None";
@@ -130955,6 +131047,22 @@ var ts;
130955
131047
  source = CompletionSource.ClassMemberSnippet;
130956
131048
  }
130957
131049
  }
131050
+ if (preferences.includeCompletionsWithObjectLiteralMethodSnippets
131051
+ && preferences.includeCompletionsWithInsertText
131052
+ && origin && originIsObjectLiteralMethod(origin)) {
131053
+ var objectLiteral = ts.cast(tryGetObjectLikeCompletionContainer(contextToken), ts.isObjectLiteralExpression);
131054
+ var importAdder = void 0;
131055
+ var entry = getEntryForObjectLiteralMethodCompletion(symbol, name, objectLiteral, program, host, options, preferences, formatContext);
131056
+ if (!entry) {
131057
+ return undefined;
131058
+ }
131059
+ (insertText = entry.insertText, isSnippet = entry.isSnippet, importAdder = entry.importAdder, sourceDisplay = entry.sourceDisplay);
131060
+ source = CompletionSource.ObjectLiteralMethodSnippet;
131061
+ sortText = (parseInt(sortText, 10) + 1).toString();
131062
+ if (importAdder.hasFixes()) {
131063
+ hasAction = true;
131064
+ }
131065
+ }
130958
131066
  if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
130959
131067
  var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
130960
131068
  var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
@@ -131113,27 +131221,15 @@ var ts;
131113
131221
  completionNodes.push(node);
131114
131222
  }, body, 2 /* Property */, isAbstract);
131115
131223
  if (completionNodes.length) {
131224
+ var format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */;
131116
131225
  replacementSpan = modifiersSpan;
131117
131226
  // If we have access to formatting settings, we print the nodes using the emitter,
131118
131227
  // and then format the printed text.
131119
131228
  if (formatContext) {
131120
- var syntheticFile_1 = {
131121
- text: printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile),
131122
- getLineAndCharacterOfPosition: function (pos) {
131123
- return ts.getLineAndCharacterOfPosition(this, pos);
131124
- },
131125
- };
131126
- var formatOptions_1 = ts.getFormatCodeSettingsForWriting(formatContext, sourceFile);
131127
- var changes = ts.flatMap(completionNodes, function (node) {
131128
- var nodeWithPos = ts.textChanges.assignPositionsToNode(node);
131129
- return ts.formatting.formatNodeGivenIndentation(nodeWithPos, syntheticFile_1, sourceFile.languageVariant,
131130
- /* indentation */ 0,
131131
- /* delta */ 0, __assign(__assign({}, formatContext), { options: formatOptions_1 }));
131132
- });
131133
- insertText = ts.textChanges.applyChanges(syntheticFile_1.text, changes);
131229
+ insertText = printer.printAndFormatSnippetList(format, ts.factory.createNodeArray(completionNodes), sourceFile, formatContext);
131134
131230
  }
131135
131231
  else { // Otherwise, just use emitter to print the new nodes.
131136
- insertText = printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
131232
+ insertText = printer.printSnippetList(format, ts.factory.createNodeArray(completionNodes), sourceFile);
131137
131233
  }
131138
131234
  }
131139
131235
  return { insertText: insertText, isSnippet: isSnippet, importAdder: importAdder, replacementSpan: replacementSpan };
@@ -131183,12 +131279,92 @@ var ts;
131183
131279
  }
131184
131280
  return undefined;
131185
131281
  }
131282
+ function getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclaration, program, host, options, preferences, formatContext) {
131283
+ var isSnippet;
131284
+ var insertText = name;
131285
+ var sourceFile = enclosingDeclaration.getSourceFile();
131286
+ var importAdder = ts.codefix.createImportAdder(sourceFile, program, preferences, host);
131287
+ var body;
131288
+ if (preferences.includeCompletionsWithSnippetText) {
131289
+ isSnippet = true;
131290
+ var emptyStmt = ts.factory.createEmptyStatement();
131291
+ body = ts.factory.createBlock([emptyStmt], /* multiline */ true);
131292
+ ts.setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 });
131293
+ }
131294
+ else {
131295
+ body = ts.factory.createBlock([], /* multiline */ true);
131296
+ }
131297
+ var method = createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences, importAdder, /*body*/ body);
131298
+ if (!method) {
131299
+ return undefined;
131300
+ }
131301
+ var printer = createSnippetPrinter({
131302
+ removeComments: true,
131303
+ module: options.module,
131304
+ target: options.target,
131305
+ omitTrailingSemicolon: false,
131306
+ newLine: ts.getNewLineKind(ts.getNewLineCharacter(options, ts.maybeBind(host, host.getNewLine))),
131307
+ });
131308
+ if (formatContext) {
131309
+ insertText = printer.printAndFormatSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, ts.factory.createNodeArray([method], /*hasTrailingComma*/ true), sourceFile, formatContext);
131310
+ }
131311
+ else {
131312
+ insertText = printer.printSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, ts.factory.createNodeArray([method], /*hasTrailingComma*/ true), sourceFile);
131313
+ }
131314
+ var methodSignature = ts.factory.createMethodSignature(method.modifiers, method.name, method.questionToken, method.typeParameters, method.parameters, method.type);
131315
+ var sourceDisplay = ts.nodeToDisplayParts(methodSignature, enclosingDeclaration);
131316
+ return { isSnippet: isSnippet, insertText: insertText, importAdder: importAdder, sourceDisplay: sourceDisplay };
131317
+ }
131318
+ ;
131319
+ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences, importAdder, body) {
131320
+ var declarations = symbol.getDeclarations();
131321
+ if (!(declarations && declarations.length)) {
131322
+ return undefined;
131323
+ }
131324
+ var checker = program.getTypeChecker();
131325
+ var scriptTarget = ts.getEmitScriptTarget(program.getCompilerOptions());
131326
+ var declaration = declarations[0];
131327
+ var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false);
131328
+ var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
131329
+ var quotePreference = ts.getQuotePreference(sourceFile, preferences);
131330
+ var builderFlags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined;
131331
+ switch (declaration.kind) {
131332
+ case 165 /* PropertySignature */:
131333
+ case 166 /* PropertyDeclaration */:
131334
+ case 167 /* MethodSignature */:
131335
+ case 168 /* MethodDeclaration */: {
131336
+ var signatures = checker.getSignaturesOfType(type, 0 /* Call */);
131337
+ if (signatures.length > 1) {
131338
+ // We don't support overloads in object literals.
131339
+ return undefined;
131340
+ }
131341
+ var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, builderFlags, ts.codefix.getNoopSymbolTrackerWithResolver({ program: program, host: host }));
131342
+ var importableReference = ts.codefix.tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
131343
+ if (importableReference) {
131344
+ typeNode = importableReference.typeNode;
131345
+ ts.codefix.importSymbols(importAdder, importableReference.symbols);
131346
+ }
131347
+ if (!typeNode) {
131348
+ return undefined;
131349
+ }
131350
+ ts.Debug.assertNode(typeNode, ts.isFunctionTypeNode);
131351
+ return ts.factory.createMethodDeclaration(
131352
+ /*decorators*/ undefined,
131353
+ /*modifiers*/ undefined,
131354
+ /*asteriskToken*/ undefined, name,
131355
+ /*questionToken*/ undefined, typeNode.typeParameters, typeNode.parameters, typeNode.type, body);
131356
+ }
131357
+ default:
131358
+ return undefined;
131359
+ }
131360
+ }
131186
131361
  function createSnippetPrinter(printerOptions) {
131187
131362
  var baseWriter = ts.textChanges.createWriter(ts.getNewLineCharacter(printerOptions));
131188
131363
  var printer = ts.createPrinter(printerOptions, baseWriter);
131189
131364
  var writer = __assign(__assign({}, baseWriter), { write: function (s) { return baseWriter.write(ts.escapeSnippetText(s)); }, nonEscapingWrite: baseWriter.write, writeLiteral: function (s) { return baseWriter.writeLiteral(ts.escapeSnippetText(s)); }, writeStringLiteral: function (s) { return baseWriter.writeStringLiteral(ts.escapeSnippetText(s)); }, writeSymbol: function (s, symbol) { return baseWriter.writeSymbol(ts.escapeSnippetText(s), symbol); }, writeParameter: function (s) { return baseWriter.writeParameter(ts.escapeSnippetText(s)); }, writeComment: function (s) { return baseWriter.writeComment(ts.escapeSnippetText(s)); }, writeProperty: function (s) { return baseWriter.writeProperty(ts.escapeSnippetText(s)); } });
131190
131365
  return {
131191
131366
  printSnippetList: printSnippetList,
131367
+ printAndFormatSnippetList: printAndFormatSnippetList,
131192
131368
  };
131193
131369
  /* Snippet-escaping version of `printer.printList`. */
131194
131370
  function printSnippetList(format, list, sourceFile) {
@@ -131196,6 +131372,22 @@ var ts;
131196
131372
  printer.writeList(format, list, sourceFile, writer);
131197
131373
  return writer.getText();
131198
131374
  }
131375
+ function printAndFormatSnippetList(format, list, sourceFile, formatContext) {
131376
+ var syntheticFile = {
131377
+ text: printSnippetList(format, list, sourceFile),
131378
+ getLineAndCharacterOfPosition: function (pos) {
131379
+ return ts.getLineAndCharacterOfPosition(this, pos);
131380
+ },
131381
+ };
131382
+ var formatOptions = ts.getFormatCodeSettingsForWriting(formatContext, sourceFile);
131383
+ var changes = ts.flatMap(list, function (node) {
131384
+ var nodeWithPos = ts.textChanges.assignPositionsToNode(node);
131385
+ return ts.formatting.formatNodeGivenIndentation(nodeWithPos, syntheticFile, sourceFile.languageVariant,
131386
+ /* indentation */ 0,
131387
+ /* delta */ 0, __assign(__assign({}, formatContext), { options: formatOptions }));
131388
+ });
131389
+ return ts.textChanges.applyChanges(syntheticFile.text, changes);
131390
+ }
131199
131391
  }
131200
131392
  function originToCompletionEntryData(origin) {
131201
131393
  var ambientModuleName = origin.fileName ? undefined : ts.stripQuotes(origin.moduleSymbol.name);
@@ -131308,7 +131500,7 @@ var ts;
131308
131500
  var symbol = symbols[i];
131309
131501
  var origin = symbolToOriginInfoMap === null || symbolToOriginInfoMap === void 0 ? void 0 : symbolToOriginInfoMap[i];
131310
131502
  var info = getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, !!jsxIdentifierExpected);
131311
- if (!info || uniques.get(info.name) || kind === 1 /* Global */ && symbolToSortTextIdMap && !shouldIncludeSymbol(symbol, symbolToSortTextIdMap)) {
131503
+ if (!info || (uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin))) || kind === 1 /* Global */ && symbolToSortTextIdMap && !shouldIncludeSymbol(symbol, symbolToSortTextIdMap)) {
131312
131504
  continue;
131313
131505
  }
131314
131506
  var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
@@ -131439,7 +131631,9 @@ var ts;
131439
131631
  return ts.firstDefined(symbols, function (symbol, index) {
131440
131632
  var origin = symbolToOriginInfoMap[index];
131441
131633
  var info = getCompletionEntryDisplayNameForSymbol(symbol, ts.getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
131442
- return info && info.name === entryId.name && (entryId.source === CompletionSource.ClassMemberSnippet && symbol.flags & 106500 /* ClassMember */ || getSourceFromOrigin(origin) === entryId.source)
131634
+ return info && info.name === entryId.name && (entryId.source === CompletionSource.ClassMemberSnippet && symbol.flags & 106500 /* ClassMember */
131635
+ || entryId.source === CompletionSource.ObjectLiteralMethodSnippet && symbol.flags & (4 /* Property */ | 8192 /* Method */)
131636
+ || getSourceFromOrigin(origin) === entryId.source)
131443
131637
  ? { type: "symbol", symbol: symbol, location: location, origin: origin, contextToken: contextToken, previousToken: previousToken, isJsxInitializer: isJsxInitializer, isTypeOnlyLocation: isTypeOnlyLocation }
131444
131638
  : undefined;
131445
131639
  }) || { type: "none" };
@@ -131521,6 +131715,20 @@ var ts;
131521
131715
  };
131522
131716
  }
131523
131717
  }
131718
+ if (source === CompletionSource.ObjectLiteralMethodSnippet) {
131719
+ var enclosingDeclaration = tryGetObjectLikeCompletionContainer(contextToken);
131720
+ var importAdder = getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclaration, program, host, compilerOptions, preferences, formatContext).importAdder;
131721
+ if (importAdder.hasFixes()) {
131722
+ var changes = ts.textChanges.ChangeTracker.with({ host: host, formatContext: formatContext, preferences: preferences }, importAdder.writeFixes);
131723
+ return {
131724
+ sourceDisplay: undefined,
131725
+ codeActions: [{
131726
+ changes: changes,
131727
+ description: ts.diagnosticToString([ts.Diagnostics.Includes_imports_of_types_referenced_by_0, name]),
131728
+ }],
131729
+ };
131730
+ }
131731
+ }
131524
131732
  if (originIsTypeOnlyAlias(origin)) {
131525
131733
  var codeAction_1 = ts.codefix.getPromoteTypeOnlyCompletionAction(sourceFile, origin.declaration.name, program, host, formatContext, preferences);
131526
131734
  ts.Debug.assertIsDefined(codeAction_1, "Expected to have a code action for promoting type-only alias");
@@ -132407,6 +132615,45 @@ var ts;
132407
132615
  symbolToSortTextIdMap[symbolId] = importCompletionNode ? 11 /* LocationPriority */ : 16 /* AutoImportSuggestions */;
132408
132616
  symbols.push(symbol);
132409
132617
  }
132618
+ /* Mutates `symbols` and `symbolToOriginInfoMap`. */
132619
+ function collectObjectLiteralMethodSymbols(members) {
132620
+ // TODO: support JS files.
132621
+ if (ts.isInJSFile(location)) {
132622
+ return false;
132623
+ }
132624
+ members = members.slice(); // Needed in case `symbol` and `members` are the same array.
132625
+ for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
132626
+ var member = members_1[_i];
132627
+ if (!isObjectLiteralMethodSymbol(member)) {
132628
+ continue;
132629
+ }
132630
+ var origin = { kind: 128 /* ObjectLiteralMethod */ };
132631
+ symbolToOriginInfoMap[symbols.length] = origin;
132632
+ symbols.push(member);
132633
+ }
132634
+ }
132635
+ function isObjectLiteralMethodSymbol(symbol) {
132636
+ /*
132637
+ For an object type
132638
+ `type Foo = {
132639
+ bar(x: number): void;
132640
+ foo: (x: string) => string;
132641
+ }`,
132642
+ `bar` will have symbol flag `Method`,
132643
+ `foo` will have symbol flag `Property`.
132644
+ */
132645
+ if (!(symbol.flags & (4 /* Property */ | 8192 /* Method */))) {
132646
+ return false;
132647
+ }
132648
+ if (symbol.flags & 4 /* Property */) {
132649
+ var type = program.getTypeChecker().getTypeOfSymbol(symbol);
132650
+ // We ignore non-function properties.
132651
+ if (!type.getCallSignatures().length) {
132652
+ return false;
132653
+ }
132654
+ }
132655
+ return true;
132656
+ }
132410
132657
  /**
132411
132658
  * Finds the first node that "embraces" the position, so that one may
132412
132659
  * accurately aggregate locals from the closest containing scope.
@@ -132604,7 +132851,12 @@ var ts;
132604
132851
  }
132605
132852
  if (typeMembers && typeMembers.length > 0) {
132606
132853
  // Add filtered items to the completion list
132607
- symbols = ts.concatenate(symbols, filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers)));
132854
+ var filteredMembers = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers));
132855
+ symbols = ts.concatenate(symbols, filteredMembers);
132856
+ if (preferences.includeCompletionsWithObjectLiteralMethodSnippets
132857
+ && objectLikeContainer.kind === 204 /* ObjectLiteralExpression */) {
132858
+ collectObjectLiteralMethodSymbols(filteredMembers);
132859
+ }
132608
132860
  }
132609
132861
  setSortTextToOptionalMember();
132610
132862
  return 1 /* Success */;
@@ -132736,29 +132988,6 @@ var ts;
132736
132988
  }
132737
132989
  return 1 /* Success */;
132738
132990
  }
132739
- /**
132740
- * Returns the immediate owning object literal or binding pattern of a context token,
132741
- * on the condition that one exists and that the context implies completion should be given.
132742
- */
132743
- function tryGetObjectLikeCompletionContainer(contextToken) {
132744
- if (contextToken) {
132745
- var parent = contextToken.parent;
132746
- switch (contextToken.kind) {
132747
- case 18 /* OpenBraceToken */: // const x = { |
132748
- case 27 /* CommaToken */: // const x = { a: 0, |
132749
- if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
132750
- return parent;
132751
- }
132752
- break;
132753
- case 41 /* AsteriskToken */:
132754
- return ts.isMethodDeclaration(parent) ? ts.tryCast(parent.parent, ts.isObjectLiteralExpression) : undefined;
132755
- case 79 /* Identifier */:
132756
- return contextToken.text === "async" && ts.isShorthandPropertyAssignment(contextToken.parent)
132757
- ? contextToken.parent.parent : undefined;
132758
- }
132759
- }
132760
- return undefined;
132761
- }
132762
132991
  function isConstructorParameterCompletion(node) {
132763
132992
  return !!node.parent && ts.isParameter(node.parent) && ts.isConstructorDeclaration(node.parent.parent)
132764
132993
  && (ts.isParameterPropertyModifier(node.kind) || ts.isDeclarationName(node));
@@ -133181,6 +133410,29 @@ var ts;
133181
133410
  return node.getStart(sourceFile) <= position && position <= node.getEnd();
133182
133411
  }
133183
133412
  }
133413
+ /**
133414
+ * Returns the immediate owning object literal or binding pattern of a context token,
133415
+ * on the condition that one exists and that the context implies completion should be given.
133416
+ */
133417
+ function tryGetObjectLikeCompletionContainer(contextToken) {
133418
+ if (contextToken) {
133419
+ var parent = contextToken.parent;
133420
+ switch (contextToken.kind) {
133421
+ case 18 /* OpenBraceToken */: // const x = { |
133422
+ case 27 /* CommaToken */: // const x = { a: 0, |
133423
+ if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
133424
+ return parent;
133425
+ }
133426
+ break;
133427
+ case 41 /* AsteriskToken */:
133428
+ return ts.isMethodDeclaration(parent) ? ts.tryCast(parent.parent, ts.isObjectLiteralExpression) : undefined;
133429
+ case 79 /* Identifier */:
133430
+ return contextToken.text === "async" && ts.isShorthandPropertyAssignment(contextToken.parent)
133431
+ ? contextToken.parent.parent : undefined;
133432
+ }
133433
+ }
133434
+ return undefined;
133435
+ }
133184
133436
  function getRelevantTokens(position, sourceFile) {
133185
133437
  var previousToken = ts.findPrecedingToken(position, sourceFile);
133186
133438
  if (previousToken && position <= previousToken.end && (ts.isMemberName(previousToken) || ts.isKeyword(previousToken.kind))) {
@@ -151485,8 +151737,10 @@ var ts;
151485
151737
  var checker = program.getTypeChecker();
151486
151738
  var compilerOptions = program.getCompilerOptions();
151487
151739
  var symbolName = getSymbolName(sourceFile, checker, symbolToken, compilerOptions);
151488
- // "default" is a keyword and not a legal identifier for the import, so we don't expect it here
151489
- ts.Debug.assert(symbolName !== "default" /* Default */, "'default' isn't a legal identifier and couldn't occur here");
151740
+ // "default" is a keyword and not a legal identifier for the import, but appears as an identifier.
151741
+ if (symbolName === "default" /* Default */) {
151742
+ return undefined;
151743
+ }
151490
151744
  var isValidTypeOnlyUseSite = ts.isValidTypeOnlyAliasUseSite(symbolToken);
151491
151745
  var useRequire = shouldUseRequire(sourceFile, program);
151492
151746
  var exportInfo = getExportInfos(symbolName, ts.isJSXTagName(symbolToken), ts.getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences);
@@ -155576,6 +155830,7 @@ var ts;
155576
155830
  if (!ts.some(signatures)) {
155577
155831
  break;
155578
155832
  }
155833
+ // >> TODO: call `try get auto importable reference from type node` on type nodes?
155579
155834
  if (declarations.length === 1) {
155580
155835
  ts.Debug.assert(signatures.length === 1, "One declaration implies one signature");
155581
155836
  var signature = signatures[0];
@@ -155606,6 +155861,27 @@ var ts;
155606
155861
  }
155607
155862
  }
155608
155863
  codefix.addNewNodeForMemberSymbol = addNewNodeForMemberSymbol;
155864
+ // export function addNewNodeObjectLiteralProperties(
155865
+ // // changes: textChanges.ChangeTracker,
155866
+ // // context: CodeFixContextBase,
155867
+ // sourceFile: SourceFile,
155868
+ // program: Program,
155869
+ // preferences: UserPreferences,
155870
+ // host: LanguageServiceHost,
155871
+ // // info: ObjectLiteralInfo,
155872
+ // properties: Symbol[],
155873
+ // addNodes: (nodes: PropertyAssignment[]) => void,
155874
+ // ): void {
155875
+ // const importAdder = createImportAdder(sourceFile, program, preferences, host);
155876
+ // const quotePreference = getQuotePreference(sourceFile, preferences);
155877
+ // const target = getEmitScriptTarget(program.getCompilerOptions());
155878
+ // const checker = program.getTypeChecker();
155879
+ // const props = map(properties, prop => {
155880
+ // const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop));
155881
+ // return factory.createPropertyAssignment(createPropertyNameNodeForIdentifierOrLiteral(prop.name, target, quotePreference === QuotePreference.Single), initializer);
155882
+ // });
155883
+ // addNodes(props);
155884
+ // }
155609
155885
  function createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) {
155610
155886
  var program = context.program;
155611
155887
  var checker = program.getTypeChecker();
@@ -155775,6 +156051,7 @@ var ts;
155775
156051
  return createStubbedMethod(modifiers, name, optional,
155776
156052
  /*typeParameters*/ undefined, parameters, getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration), quotePreference, body);
155777
156053
  }
156054
+ codefix.createMethodImplementingSignatures = createMethodImplementingSignatures;
155778
156055
  function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {
155779
156056
  if (ts.length(signatures)) {
155780
156057
  var type = checker.getUnionType(ts.map(signatures, checker.getReturnTypeOfSignature));
@@ -159002,8 +159279,8 @@ var ts;
159002
159279
  ts.Debug.assert(members.length > 0, "Found no members"); // There must be at least one child, since we extracted from one.
159003
159280
  var prevMember;
159004
159281
  var allProperties = true;
159005
- for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
159006
- var member = members_1[_i];
159282
+ for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
159283
+ var member = members_2[_i];
159007
159284
  if (member.pos > maxPos) {
159008
159285
  return prevMember || members[0];
159009
159286
  }
@@ -172546,47 +172823,18 @@ var ts;
172546
172823
  }
172547
172824
  return ts.deduplicate(outputs, ts.equateValues);
172548
172825
  }
172549
- function combineOutputResultContains(outputs, output, areEqual) {
172550
- return outputs.some(function (_a) {
172551
- var result = _a.result;
172552
- return ts.contains(result, output, areEqual);
172553
- });
172554
- }
172555
- function addToCombineOutputResult(outputs, project, result) {
172556
- if (result.length)
172557
- outputs.push({ project: project, result: result });
172558
- }
172559
- function combineProjectOutputFromEveryProject(projectService, action, areEqual) {
172560
- var outputs = [];
172561
- projectService.loadAncestorProjectTree();
172562
- projectService.forEachEnabledProject(function (project) {
172563
- var theseOutputs = action(project);
172564
- addToCombineOutputResult(outputs, project, ts.filter(theseOutputs, function (output) { return !combineOutputResultContains(outputs, output, areEqual); }));
172565
- });
172566
- return outputs;
172567
- }
172568
- function flattenCombineOutputResult(outputs) {
172569
- return ts.flatMap(outputs, function (_a) {
172570
- var result = _a.result;
172571
- return result;
172572
- });
172573
- }
172574
- function combineProjectOutputWhileOpeningReferencedProjects(projects, defaultProject, action, getLocation, resultsEqual) {
172575
- var outputs = [];
172576
- combineProjectOutputWorker(projects, defaultProject,
172577
- /*initialLocation*/ undefined, function (project, _, tryAddToTodo) {
172578
- var theseOutputs = action(project);
172579
- addToCombineOutputResult(outputs, project, ts.filter(theseOutputs, function (output) { return !combineOutputResultContains(outputs, output, resultsEqual) && !tryAddToTodo(project, getLocation(output)); }));
172580
- });
172581
- return outputs;
172582
- }
172583
- function combineProjectOutputForRenameLocations(projects, defaultProject, initialLocation, findInStrings, findInComments, hostPreferences) {
172826
+ ;
172827
+ function combineProjectOutputForRenameLocations(projects, defaultProject, initialLocation, findInStrings, findInComments, _a) {
172828
+ var providePrefixAndSuffixTextForRename = _a.providePrefixAndSuffixTextForRename;
172584
172829
  var outputs = [];
172585
172830
  combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, tryAddToTodo) {
172586
- for (var _i = 0, _a = project.getLanguageService().findRenameLocations(location.fileName, location.pos, findInStrings, findInComments, hostPreferences.providePrefixAndSuffixTextForRename) || server.emptyArray; _i < _a.length; _i++) {
172587
- var output = _a[_i];
172588
- if (!ts.contains(outputs, output, ts.documentSpansEqual) && !tryAddToTodo(project, documentSpanLocation(output))) {
172589
- outputs.push(output);
172831
+ var projectOutputs = project.getLanguageService().findRenameLocations(location.fileName, location.pos, findInStrings, findInComments, providePrefixAndSuffixTextForRename);
172832
+ if (projectOutputs) {
172833
+ for (var _i = 0, projectOutputs_1 = projectOutputs; _i < projectOutputs_1.length; _i++) {
172834
+ var output = projectOutputs_1[_i];
172835
+ if (!ts.contains(outputs, output, ts.documentSpansEqual) && !tryAddToTodo(project, documentSpanLocation(output))) {
172836
+ outputs.push(output);
172837
+ }
172590
172838
  }
172591
172839
  }
172592
172840
  });
@@ -172601,43 +172849,33 @@ var ts;
172601
172849
  var outputs = [];
172602
172850
  combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, getMappedLocation) {
172603
172851
  logger.info("Finding references to " + location.fileName + " position " + location.pos + " in project " + project.getProjectName());
172604
- var _loop_8 = function (outputReferencedSymbol) {
172605
- var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
172606
- var definition = mappedDefinitionFile === undefined ?
172607
- outputReferencedSymbol.definition : __assign(__assign({}, outputReferencedSymbol.definition), { textSpan: ts.createTextSpan(mappedDefinitionFile.pos, outputReferencedSymbol.definition.textSpan.length), fileName: mappedDefinitionFile.fileName, contextSpan: getMappedContextSpan(outputReferencedSymbol.definition, project) });
172608
- var symbolToAddTo = ts.find(outputs, function (o) { return ts.documentSpansEqual(o.definition, definition); });
172609
- if (!symbolToAddTo) {
172610
- symbolToAddTo = { definition: definition, references: [] };
172611
- outputs.push(symbolToAddTo);
172612
- }
172613
- for (var _b = 0, _c = outputReferencedSymbol.references; _b < _c.length; _b++) {
172614
- var ref = _c[_b];
172615
- // If it's in a mapped file, that is added to the todo list by `getMappedLocation`.
172616
- if (!ts.contains(symbolToAddTo.references, ref, ts.documentSpansEqual) && !getMappedLocation(project, documentSpanLocation(ref))) {
172617
- symbolToAddTo.references.push(ref);
172852
+ var projectOutputs = project.getLanguageService().findReferences(location.fileName, location.pos);
172853
+ if (projectOutputs) {
172854
+ var _loop_8 = function (referencedSymbol) {
172855
+ var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(referencedSymbol.definition));
172856
+ var definition = mappedDefinitionFile === undefined ?
172857
+ referencedSymbol.definition : __assign(__assign({}, referencedSymbol.definition), { textSpan: ts.createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length), fileName: mappedDefinitionFile.fileName, contextSpan: getMappedContextSpan(referencedSymbol.definition, project) });
172858
+ var symbolToAddTo = ts.find(outputs, function (o) { return ts.documentSpansEqual(o.definition, definition); });
172859
+ if (!symbolToAddTo) {
172860
+ symbolToAddTo = { definition: definition, references: [] };
172861
+ outputs.push(symbolToAddTo);
172862
+ }
172863
+ for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) {
172864
+ var ref = _b[_a];
172865
+ // If it's in a mapped file, that is added to the todo list by `getMappedLocation`.
172866
+ if (!ts.contains(symbolToAddTo.references, ref, ts.documentSpansEqual) && !getMappedLocation(project, documentSpanLocation(ref))) {
172867
+ symbolToAddTo.references.push(ref);
172868
+ }
172618
172869
  }
172870
+ };
172871
+ for (var _i = 0, projectOutputs_2 = projectOutputs; _i < projectOutputs_2.length; _i++) {
172872
+ var referencedSymbol = projectOutputs_2[_i];
172873
+ _loop_8(referencedSymbol);
172619
172874
  }
172620
- };
172621
- for (var _i = 0, _a = project.getLanguageService().findReferences(location.fileName, location.pos) || server.emptyArray; _i < _a.length; _i++) {
172622
- var outputReferencedSymbol = _a[_i];
172623
- _loop_8(outputReferencedSymbol);
172624
172875
  }
172625
172876
  });
172626
172877
  return outputs.filter(function (o) { return o.references.length !== 0; });
172627
172878
  }
172628
- function combineProjectOutputForFileReferences(projects, defaultProject, fileName) {
172629
- var outputs = [];
172630
- combineProjectOutputWorker(projects, defaultProject,
172631
- /*initialLocation*/ undefined, function (project) {
172632
- for (var _i = 0, _a = project.getLanguageService().getFileReferences(fileName) || server.emptyArray; _i < _a.length; _i++) {
172633
- var referenceEntry = _a[_i];
172634
- if (!ts.contains(outputs, referenceEntry, ts.documentSpansEqual)) {
172635
- outputs.push(referenceEntry);
172636
- }
172637
- }
172638
- });
172639
- return outputs;
172640
- }
172641
172879
  function forEachProjectInProjects(projects, path, cb) {
172642
172880
  for (var _i = 0, _a = ts.isArray(projects) ? projects : projects.projects; _i < _a.length; _i++) {
172643
172881
  var project = _a[_i];
@@ -173976,7 +174214,21 @@ var ts;
173976
174214
  Session.prototype.getFileReferences = function (args, simplifiedResult) {
173977
174215
  var _this = this;
173978
174216
  var projects = this.getProjects(args);
173979
- var references = combineProjectOutputForFileReferences(projects, this.getDefaultProject(args), args.file);
174217
+ var fileName = args.file;
174218
+ var references = [];
174219
+ forEachProjectInProjects(projects, /*path*/ undefined, function (project) {
174220
+ if (project.getCancellationToken().isCancellationRequested())
174221
+ return;
174222
+ var projectOutputs = project.getLanguageService().getFileReferences(fileName);
174223
+ if (projectOutputs) {
174224
+ for (var _i = 0, projectOutputs_3 = projectOutputs; _i < projectOutputs_3.length; _i++) {
174225
+ var referenceEntry = projectOutputs_3[_i];
174226
+ if (!ts.contains(references, referenceEntry, ts.documentSpansEqual)) {
174227
+ references.push(referenceEntry);
174228
+ }
174229
+ }
174230
+ }
174231
+ });
173980
174232
  if (!simplifiedResult)
173981
174233
  return references;
173982
174234
  var refs = references.map(function (entry) { return referenceEntryToReferencesResponseItem(_this.projectService, entry); });
@@ -174375,10 +174627,13 @@ var ts;
174375
174627
  Session.prototype.getNavigateToItems = function (args, simplifiedResult) {
174376
174628
  var full = this.getFullNavigateToItems(args);
174377
174629
  return !simplifiedResult ?
174378
- flattenCombineOutputResult(full) :
174379
174630
  ts.flatMap(full, function (_a) {
174380
- var project = _a.project, result = _a.result;
174381
- return result.map(function (navItem) {
174631
+ var navigateToItems = _a.navigateToItems;
174632
+ return navigateToItems;
174633
+ }) :
174634
+ ts.flatMap(full, function (_a) {
174635
+ var project = _a.project, navigateToItems = _a.navigateToItems;
174636
+ return navigateToItems.map(function (navItem) {
174382
174637
  var scriptInfo = project.getScriptInfo(navItem.fileName);
174383
174638
  var bakedItem = {
174384
174639
  name: navItem.name,
@@ -174408,13 +174663,57 @@ var ts;
174408
174663
  if (currentFileOnly) {
174409
174664
  ts.Debug.assertIsDefined(args.file);
174410
174665
  var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
174411
- return [{ project: project, result: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }];
174666
+ return [{ project: project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }];
174667
+ }
174668
+ var outputs = [];
174669
+ // This is effectively a hashset with `name` as the custom hash and `navigateToItemIsEqualTo` as the custom equals.
174670
+ // `name` is a very cheap hash function, but we could incorporate other properties to reduce collisions.
174671
+ var seenItems = new ts.Map(); // name to items with that name
174672
+ if (!args.file && !projectFileName) {
174673
+ // VS Code's `Go to symbol in workspaces` sends request like this
174674
+ // TODO (https://github.com/microsoft/TypeScript/issues/47839)
174675
+ // This appears to have been intended to search all projects but, in practice, it seems to only search
174676
+ // those that are downstream from already-loaded projects.
174677
+ // Filtering by !isSourceOfProjectReferenceRedirect is new, but seems appropriate and consistent with
174678
+ // the case below.
174679
+ this.projectService.loadAncestorProjectTree();
174680
+ this.projectService.forEachEnabledProject(function (project) { return addItemsForProject(project); });
174412
174681
  }
174413
- else if (!args.file && !projectFileName) {
174414
- return combineProjectOutputFromEveryProject(this.projectService, function (project) { return project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*filename*/ undefined, /*excludeDts*/ project.isNonTsProject()); }, navigateToItemIsEqualTo);
174682
+ else {
174683
+ // VS's `Go to symbol` sends requests with just a project and doesn't want cascading since it will
174684
+ // send a separate request for each project of interest
174685
+ // TODO (https://github.com/microsoft/TypeScript/issues/47839)
174686
+ // This doesn't really make sense unless it's a single project matching `projectFileName`
174687
+ var projects = this.getProjects(args);
174688
+ forEachProjectInProjects(projects, /*path*/ undefined, function (project) { return addItemsForProject(project); });
174689
+ }
174690
+ return outputs;
174691
+ // Mutates `outputs`
174692
+ function addItemsForProject(project) {
174693
+ var projectItems = project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*filename*/ undefined, /*excludeDts*/ project.isNonTsProject());
174694
+ var unseenItems = ts.filter(projectItems, function (item) { return tryAddSeenItem(item) && !getMappedLocation(documentSpanLocation(item), project); });
174695
+ if (unseenItems.length) {
174696
+ outputs.push({ project: project, navigateToItems: unseenItems });
174697
+ }
174698
+ }
174699
+ // Returns true if the item had not been seen before
174700
+ // Mutates `seenItems`
174701
+ function tryAddSeenItem(item) {
174702
+ var name = item.name;
174703
+ if (!seenItems.has(name)) {
174704
+ seenItems.set(name, [item]);
174705
+ return true;
174706
+ }
174707
+ var seen = seenItems.get(name);
174708
+ for (var _i = 0, seen_1 = seen; _i < seen_1.length; _i++) {
174709
+ var seenItem = seen_1[_i];
174710
+ if (navigateToItemIsEqualTo(seenItem, item)) {
174711
+ return false;
174712
+ }
174713
+ }
174714
+ seen.push(item);
174715
+ return true;
174415
174716
  }
174416
- var fileArgs = args;
174417
- return combineProjectOutputWhileOpeningReferencedProjects(this.getProjects(fileArgs), this.getDefaultProject(fileArgs), function (project) { return project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, /*fileName*/ undefined, /*excludeDts*/ project.isNonTsProject()); }, documentSpanLocation, navigateToItemIsEqualTo);
174418
174717
  function navigateToItemIsEqualTo(a, b) {
174419
174718
  if (a === b) {
174420
174719
  return true;
@@ -174506,8 +174805,28 @@ var ts;
174506
174805
  var newPath = server.toNormalizedPath(args.newFilePath);
174507
174806
  var formatOptions = this.getHostFormatOptions();
174508
174807
  var preferences = this.getHostPreferences();
174509
- var changes = flattenCombineOutputResult(combineProjectOutputFromEveryProject(this.projectService, function (project) { return project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences); }, function (a, b) { return a.fileName === b.fileName; }));
174510
- return simplifiedResult ? changes.map(function (c) { return _this.mapTextChangeToCodeEdit(c); }) : changes;
174808
+ var seenFiles = new ts.Set();
174809
+ var textChanges = [];
174810
+ // TODO (https://github.com/microsoft/TypeScript/issues/47839)
174811
+ // This appears to have been intended to search all projects but, in practice, it seems to only search
174812
+ // those that are downstream from already-loaded projects.
174813
+ this.projectService.loadAncestorProjectTree();
174814
+ this.projectService.forEachEnabledProject(function (project) {
174815
+ var projectTextChanges = project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences);
174816
+ var projectFiles = [];
174817
+ for (var _i = 0, projectTextChanges_1 = projectTextChanges; _i < projectTextChanges_1.length; _i++) {
174818
+ var textChange = projectTextChanges_1[_i];
174819
+ if (!seenFiles.has(textChange.fileName)) {
174820
+ textChanges.push(textChange);
174821
+ projectFiles.push(textChange.fileName);
174822
+ }
174823
+ }
174824
+ for (var _a = 0, projectFiles_1 = projectFiles; _a < projectFiles_1.length; _a++) {
174825
+ var file = projectFiles_1[_a];
174826
+ seenFiles.add(file);
174827
+ }
174828
+ });
174829
+ return simplifiedResult ? textChanges.map(function (c) { return _this.mapTextChangeToCodeEdit(c); }) : textChanges;
174511
174830
  };
174512
174831
  Session.prototype.getCodeFixes = function (args, simplifiedResult) {
174513
174832
  var _this = this;