typescript 4.7.0-dev.20220307 → 4.7.0-dev.20220310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +186 -113
- package/lib/tsserver.js +357 -209
- package/lib/tsserverlibrary.d.ts +3 -1
- package/lib/tsserverlibrary.js +357 -209
- package/lib/typescript.d.ts +3 -1
- package/lib/typescript.js +234 -128
- package/lib/typescriptServices.d.ts +3 -1
- package/lib/typescriptServices.js +234 -128
- package/lib/typingsInstaller.js +234 -128
- package/package.json +1 -1
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220310";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -4153,6 +4153,7 @@ var ts;
|
|
|
4153
4153
|
SyntaxKind[SyntaxKind["JSDocFunctionType"] = 316] = "JSDocFunctionType";
|
|
4154
4154
|
SyntaxKind[SyntaxKind["JSDocVariadicType"] = 317] = "JSDocVariadicType";
|
|
4155
4155
|
SyntaxKind[SyntaxKind["JSDocNamepathType"] = 318] = "JSDocNamepathType";
|
|
4156
|
+
/** @deprecated Use SyntaxKind.JSDoc */
|
|
4156
4157
|
SyntaxKind[SyntaxKind["JSDocComment"] = 319] = "JSDocComment";
|
|
4157
4158
|
SyntaxKind[SyntaxKind["JSDocText"] = 320] = "JSDocText";
|
|
4158
4159
|
SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 321] = "JSDocTypeLiteral";
|
|
@@ -4226,6 +4227,7 @@ var ts;
|
|
|
4226
4227
|
SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 346] = "LastJSDocTagNode";
|
|
4227
4228
|
/* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 126] = "FirstContextualKeyword";
|
|
4228
4229
|
/* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 159] = "LastContextualKeyword";
|
|
4230
|
+
SyntaxKind[SyntaxKind["JSDoc"] = 319] = "JSDoc";
|
|
4229
4231
|
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
|
|
4230
4232
|
var NodeFlags;
|
|
4231
4233
|
(function (NodeFlags) {
|
|
@@ -9013,7 +9015,6 @@ var ts;
|
|
|
9013
9015
|
Command_line_Options: diag(6171, ts.DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"),
|
|
9014
9016
|
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'."),
|
|
9015
9017
|
Enable_all_strict_type_checking_options: diag(6180, ts.DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."),
|
|
9016
|
-
List_of_language_service_plugins: diag(6181, ts.DiagnosticCategory.Message, "List_of_language_service_plugins_6181", "List of language service plugins."),
|
|
9017
9018
|
Scoped_package_detected_looking_in_0: diag(6182, ts.DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"),
|
|
9018
9019
|
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}'."),
|
|
9019
9020
|
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}'."),
|
|
@@ -9120,7 +9121,7 @@ var ts;
|
|
|
9120
9121
|
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"),
|
|
9121
9122
|
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"),
|
|
9122
9123
|
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"),
|
|
9123
|
-
Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"),
|
|
9124
|
+
Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."),
|
|
9124
9125
|
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')"),
|
|
9125
9126
|
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."),
|
|
9126
9127
|
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."),
|
|
@@ -9131,7 +9132,6 @@ var ts;
|
|
|
9131
9132
|
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}'"),
|
|
9132
9133
|
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}'"),
|
|
9133
9134
|
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}'"),
|
|
9134
|
-
Enable_incremental_compilation: diag(6378, ts.DiagnosticCategory.Message, "Enable_incremental_compilation_6378", "Enable incremental compilation"),
|
|
9135
9135
|
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."),
|
|
9136
9136
|
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"),
|
|
9137
9137
|
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}'"),
|
|
@@ -9159,13 +9159,13 @@ var ts;
|
|
|
9159
9159
|
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?"),
|
|
9160
9160
|
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."),
|
|
9161
9161
|
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."),
|
|
9162
|
-
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
|
|
9162
|
+
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."),
|
|
9163
9163
|
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."),
|
|
9164
9164
|
Allow_accessing_UMD_globals_from_modules: diag(6602, ts.DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."),
|
|
9165
9165
|
Disable_error_reporting_for_unreachable_code: diag(6603, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."),
|
|
9166
9166
|
Disable_error_reporting_for_unused_labels: diag(6604, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."),
|
|
9167
9167
|
Ensure_use_strict_is_always_emitted: diag(6605, ts.DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."),
|
|
9168
|
-
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
|
|
9168
|
+
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."),
|
|
9169
9169
|
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."),
|
|
9170
9170
|
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."),
|
|
9171
9171
|
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."),
|
|
@@ -9178,13 +9178,13 @@ var ts;
|
|
|
9178
9178
|
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."),
|
|
9179
9179
|
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."),
|
|
9180
9180
|
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."),
|
|
9181
|
-
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"),
|
|
9181
|
+
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."),
|
|
9182
9182
|
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."),
|
|
9183
9183
|
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."),
|
|
9184
9184
|
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."),
|
|
9185
9185
|
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."),
|
|
9186
9186
|
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"),
|
|
9187
|
-
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
|
|
9187
|
+
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."),
|
|
9188
9188
|
Filters_results_from_the_include_option: diag(6627, ts.DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."),
|
|
9189
9189
|
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."),
|
|
9190
9190
|
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."),
|
|
@@ -9194,7 +9194,7 @@ var ts;
|
|
|
9194
9194
|
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."),
|
|
9195
9195
|
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."),
|
|
9196
9196
|
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`."),
|
|
9197
|
-
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"),
|
|
9197
|
+
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."),
|
|
9198
9198
|
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."),
|
|
9199
9199
|
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."),
|
|
9200
9200
|
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."),
|
|
@@ -9204,77 +9204,76 @@ var ts;
|
|
|
9204
9204
|
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."),
|
|
9205
9205
|
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."),
|
|
9206
9206
|
Specify_what_JSX_code_is_generated: diag(6646, ts.DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."),
|
|
9207
|
-
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'"),
|
|
9207
|
+
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'."),
|
|
9208
9208
|
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'."),
|
|
9209
|
-
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
|
|
9209
|
+
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*'."),
|
|
9210
9210
|
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."),
|
|
9211
9211
|
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."),
|
|
9212
9212
|
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."),
|
|
9213
9213
|
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."),
|
|
9214
9214
|
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."),
|
|
9215
9215
|
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."),
|
|
9216
|
-
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
|
|
9216
|
+
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'."),
|
|
9217
9217
|
Specify_what_module_code_is_generated: diag(6657, ts.DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."),
|
|
9218
9218
|
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."),
|
|
9219
9219
|
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."),
|
|
9220
9220
|
Disable_emitting_files_from_a_compilation: diag(6660, ts.DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."),
|
|
9221
|
-
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
|
|
9221
|
+
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."),
|
|
9222
9222
|
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."),
|
|
9223
9223
|
Disable_truncating_types_in_error_messages: diag(6663, ts.DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."),
|
|
9224
9224
|
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."),
|
|
9225
|
-
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
|
|
9225
|
+
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."),
|
|
9226
9226
|
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."),
|
|
9227
9227
|
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."),
|
|
9228
|
-
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
|
|
9228
|
+
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'."),
|
|
9229
9229
|
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."),
|
|
9230
9230
|
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."),
|
|
9231
|
-
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"),
|
|
9232
|
-
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
|
|
9231
|
+
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."),
|
|
9232
|
+
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."),
|
|
9233
9233
|
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."),
|
|
9234
|
-
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
|
|
9235
|
-
|
|
9236
|
-
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"),
|
|
9237
|
-
Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use
|
|
9234
|
+
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."),
|
|
9235
|
+
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."),
|
|
9236
|
+
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."),
|
|
9237
|
+
Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."),
|
|
9238
9238
|
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."),
|
|
9239
|
-
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
|
|
9239
|
+
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."),
|
|
9240
9240
|
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."),
|
|
9241
9241
|
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."),
|
|
9242
|
-
Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, ts.DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing
|
|
9242
|
+
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."),
|
|
9243
9243
|
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."),
|
|
9244
|
-
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"),
|
|
9245
|
-
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"),
|
|
9246
|
-
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
|
|
9244
|
+
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."),
|
|
9245
|
+
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."),
|
|
9246
|
+
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."),
|
|
9247
9247
|
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."),
|
|
9248
9248
|
Disable_emitting_comments: diag(6688, ts.DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."),
|
|
9249
|
-
Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files"),
|
|
9249
|
+
Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."),
|
|
9250
9250
|
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."),
|
|
9251
9251
|
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."),
|
|
9252
9252
|
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."),
|
|
9253
9253
|
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."),
|
|
9254
9254
|
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."),
|
|
9255
9255
|
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."),
|
|
9256
|
-
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
|
|
9256
|
+
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."),
|
|
9257
9257
|
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."),
|
|
9258
|
-
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
|
|
9258
|
+
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'."),
|
|
9259
9259
|
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."),
|
|
9260
|
-
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
|
|
9260
|
+
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."),
|
|
9261
9261
|
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."),
|
|
9262
|
-
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
|
|
9262
|
+
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."),
|
|
9263
9263
|
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."),
|
|
9264
9264
|
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."),
|
|
9265
|
-
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
|
|
9265
|
+
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."),
|
|
9266
9266
|
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."),
|
|
9267
9267
|
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."),
|
|
9268
|
-
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
|
|
9268
|
+
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'."),
|
|
9269
9269
|
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."),
|
|
9270
9270
|
Emit_ECMAScript_standard_compliant_class_fields: diag(6712, ts.DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."),
|
|
9271
|
-
Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging"),
|
|
9271
|
+
Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."),
|
|
9272
9272
|
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."),
|
|
9273
9273
|
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."),
|
|
9274
|
-
Include_undefined_in_index_signature_results: diag(6716, ts.DiagnosticCategory.Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"),
|
|
9275
9274
|
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."),
|
|
9276
|
-
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"),
|
|
9277
|
-
|
|
9275
|
+
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."),
|
|
9276
|
+
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'."),
|
|
9278
9277
|
one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
|
|
9279
9278
|
one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
|
|
9280
9279
|
type_Colon: diag(6902, ts.DiagnosticCategory.Message, "type_Colon_6902", "type:"),
|
|
@@ -12825,7 +12824,7 @@ var ts;
|
|
|
12825
12824
|
return ts.emptyArray;
|
|
12826
12825
|
}
|
|
12827
12826
|
if (ts.isJSDocTypeAlias(node)) {
|
|
12828
|
-
ts.Debug.assert(node.parent.kind === 319 /*
|
|
12827
|
+
ts.Debug.assert(node.parent.kind === 319 /* JSDoc */);
|
|
12829
12828
|
return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
|
|
12830
12829
|
}
|
|
12831
12830
|
if (node.typeParameters) {
|
|
@@ -13772,7 +13771,7 @@ var ts;
|
|
|
13772
13771
|
ts.isJSDocNode = isJSDocNode;
|
|
13773
13772
|
/** True if node is of a kind that may contain comment text. */
|
|
13774
13773
|
function isJSDocCommentContainingNode(node) {
|
|
13775
|
-
return node.kind === 319 /*
|
|
13774
|
+
return node.kind === 319 /* JSDoc */
|
|
13776
13775
|
|| node.kind === 318 /* JSDocNamepathType */
|
|
13777
13776
|
|| node.kind === 320 /* JSDocText */
|
|
13778
13777
|
|| isJSDocLinkLike(node)
|
|
@@ -14822,7 +14821,7 @@ var ts;
|
|
|
14822
14821
|
return name.kind === 161 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
|
|
14823
14822
|
}
|
|
14824
14823
|
ts.isComputedNonLiteralName = isComputedNonLiteralName;
|
|
14825
|
-
function
|
|
14824
|
+
function tryGetTextOfPropertyName(name) {
|
|
14826
14825
|
switch (name.kind) {
|
|
14827
14826
|
case 79 /* Identifier */:
|
|
14828
14827
|
case 80 /* PrivateIdentifier */:
|
|
@@ -14834,11 +14833,15 @@ var ts;
|
|
|
14834
14833
|
case 161 /* ComputedPropertyName */:
|
|
14835
14834
|
if (isStringOrNumericLiteralLike(name.expression))
|
|
14836
14835
|
return ts.escapeLeadingUnderscores(name.expression.text);
|
|
14837
|
-
return
|
|
14836
|
+
return undefined;
|
|
14838
14837
|
default:
|
|
14839
14838
|
return ts.Debug.assertNever(name);
|
|
14840
14839
|
}
|
|
14841
14840
|
}
|
|
14841
|
+
ts.tryGetTextOfPropertyName = tryGetTextOfPropertyName;
|
|
14842
|
+
function getTextOfPropertyName(name) {
|
|
14843
|
+
return ts.Debug.checkDefined(tryGetTextOfPropertyName(name));
|
|
14844
|
+
}
|
|
14842
14845
|
ts.getTextOfPropertyName = getTextOfPropertyName;
|
|
14843
14846
|
function entityNameToString(name) {
|
|
14844
14847
|
switch (name.kind) {
|
|
@@ -15333,10 +15336,23 @@ var ts;
|
|
|
15333
15336
|
&& node.parent.parent.kind === 236 /* VariableStatement */;
|
|
15334
15337
|
}
|
|
15335
15338
|
ts.isVariableDeclarationInVariableStatement = isVariableDeclarationInVariableStatement;
|
|
15339
|
+
function isCommonJsExportedExpression(node) {
|
|
15340
|
+
if (!isInJSFile(node))
|
|
15341
|
+
return false;
|
|
15342
|
+
return (ts.isObjectLiteralExpression(node.parent) && ts.isBinaryExpression(node.parent.parent) && getAssignmentDeclarationKind(node.parent.parent) === 2 /* ModuleExports */) ||
|
|
15343
|
+
isCommonJsExportPropertyAssignment(node.parent);
|
|
15344
|
+
}
|
|
15345
|
+
ts.isCommonJsExportedExpression = isCommonJsExportedExpression;
|
|
15346
|
+
function isCommonJsExportPropertyAssignment(node) {
|
|
15347
|
+
if (!isInJSFile(node))
|
|
15348
|
+
return false;
|
|
15349
|
+
return (ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 1 /* ExportsProperty */);
|
|
15350
|
+
}
|
|
15351
|
+
ts.isCommonJsExportPropertyAssignment = isCommonJsExportPropertyAssignment;
|
|
15336
15352
|
function isValidESSymbolDeclaration(node) {
|
|
15337
|
-
return ts.isVariableDeclaration(node) ? isVarConst(node) && ts.isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) :
|
|
15353
|
+
return (ts.isVariableDeclaration(node) ? isVarConst(node) && ts.isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) :
|
|
15338
15354
|
ts.isPropertyDeclaration(node) ? hasEffectiveReadonlyModifier(node) && hasStaticModifier(node) :
|
|
15339
|
-
ts.isPropertySignature(node) && hasEffectiveReadonlyModifier(node);
|
|
15355
|
+
ts.isPropertySignature(node) && hasEffectiveReadonlyModifier(node)) || isCommonJsExportPropertyAssignment(node);
|
|
15340
15356
|
}
|
|
15341
15357
|
ts.isValidESSymbolDeclaration = isValidESSymbolDeclaration;
|
|
15342
15358
|
function introducesArgumentsExoticObject(node) {
|
|
@@ -15390,7 +15406,7 @@ var ts;
|
|
|
15390
15406
|
function getPropertyAssignment(objectLiteral, key, key2) {
|
|
15391
15407
|
return objectLiteral.properties.filter(function (property) {
|
|
15392
15408
|
if (property.kind === 295 /* PropertyAssignment */) {
|
|
15393
|
-
var propName =
|
|
15409
|
+
var propName = tryGetTextOfPropertyName(property.name);
|
|
15394
15410
|
return key === propName || (!!key2 && key2 === propName);
|
|
15395
15411
|
}
|
|
15396
15412
|
return false;
|
|
@@ -18230,7 +18246,7 @@ var ts;
|
|
|
18230
18246
|
ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
|
|
18231
18247
|
/** template tags are only available when a typedef isn't already using them */
|
|
18232
18248
|
function isNonTypeAliasTemplate(tag) {
|
|
18233
|
-
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /*
|
|
18249
|
+
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias));
|
|
18234
18250
|
}
|
|
18235
18251
|
/**
|
|
18236
18252
|
* Gets the effective type annotation of the value parameter of a set accessor. If the node
|
|
@@ -25207,7 +25223,7 @@ var ts;
|
|
|
25207
25223
|
}
|
|
25208
25224
|
// @api
|
|
25209
25225
|
function createJSDocComment(comment, tags) {
|
|
25210
|
-
var node = createBaseNode(319 /*
|
|
25226
|
+
var node = createBaseNode(319 /* JSDoc */);
|
|
25211
25227
|
node.comment = comment;
|
|
25212
25228
|
node.tags = asNodeArray(tags);
|
|
25213
25229
|
return node;
|
|
@@ -28716,7 +28732,7 @@ var ts;
|
|
|
28716
28732
|
}
|
|
28717
28733
|
ts.isJSDocNamepathType = isJSDocNamepathType;
|
|
28718
28734
|
function isJSDoc(node) {
|
|
28719
|
-
return node.kind === 319 /*
|
|
28735
|
+
return node.kind === 319 /* JSDoc */;
|
|
28720
28736
|
}
|
|
28721
28737
|
ts.isJSDoc = isJSDoc;
|
|
28722
28738
|
function isJSDocTypeLiteral(node) {
|
|
@@ -30341,7 +30357,7 @@ var ts;
|
|
|
30341
30357
|
case 316 /* JSDocFunctionType */:
|
|
30342
30358
|
return visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
30343
30359
|
visitNode(cbNode, node.type);
|
|
30344
|
-
case 319 /*
|
|
30360
|
+
case 319 /* JSDoc */:
|
|
30345
30361
|
return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
30346
30362
|
|| visitNodes(cbNode, cbNodes, node.tags);
|
|
30347
30363
|
case 345 /* JSDocSeeTag */:
|
|
@@ -38575,7 +38591,7 @@ var ts;
|
|
|
38575
38591
|
shortName: "i",
|
|
38576
38592
|
type: "boolean",
|
|
38577
38593
|
category: ts.Diagnostics.Projects,
|
|
38578
|
-
description: ts.Diagnostics.
|
|
38594
|
+
description: ts.Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,
|
|
38579
38595
|
transpileOptionValue: undefined,
|
|
38580
38596
|
defaultValueDescription: ts.Diagnostics.false_unless_composite_is_set
|
|
38581
38597
|
},
|
|
@@ -38975,7 +38991,7 @@ var ts;
|
|
|
38975
38991
|
affectsSemanticDiagnostics: true,
|
|
38976
38992
|
strictFlag: true,
|
|
38977
38993
|
category: ts.Diagnostics.Type_Checking,
|
|
38978
|
-
description: ts.Diagnostics.
|
|
38994
|
+
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
38979
38995
|
defaultValueDescription: false,
|
|
38980
38996
|
},
|
|
38981
38997
|
{
|
|
@@ -38993,7 +39009,7 @@ var ts;
|
|
|
38993
39009
|
type: "boolean",
|
|
38994
39010
|
affectsSemanticDiagnostics: true,
|
|
38995
39011
|
category: ts.Diagnostics.Type_Checking,
|
|
38996
|
-
description: ts.Diagnostics.
|
|
39012
|
+
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
38997
39013
|
defaultValueDescription: false,
|
|
38998
39014
|
},
|
|
38999
39015
|
{
|
|
@@ -39034,7 +39050,7 @@ var ts;
|
|
|
39034
39050
|
type: "boolean",
|
|
39035
39051
|
affectsSemanticDiagnostics: true,
|
|
39036
39052
|
category: ts.Diagnostics.Type_Checking,
|
|
39037
|
-
description: ts.Diagnostics.
|
|
39053
|
+
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
39038
39054
|
defaultValueDescription: false,
|
|
39039
39055
|
},
|
|
39040
39056
|
{
|
|
@@ -39510,7 +39526,7 @@ var ts;
|
|
|
39510
39526
|
name: "plugin",
|
|
39511
39527
|
type: "object"
|
|
39512
39528
|
},
|
|
39513
|
-
description: ts.Diagnostics.
|
|
39529
|
+
description: ts.Diagnostics.Specify_a_list_of_language_service_plugins_to_include,
|
|
39514
39530
|
category: ts.Diagnostics.Editor_Support,
|
|
39515
39531
|
},
|
|
39516
39532
|
];
|
|
@@ -47655,6 +47671,8 @@ var ts;
|
|
|
47655
47671
|
var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]);
|
|
47656
47672
|
var restrictiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t; });
|
|
47657
47673
|
var permissiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? wildcardType : t; });
|
|
47674
|
+
var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); // `uniqueLiteralType` is a special `never` flagged by union reduction to behave as a literal
|
|
47675
|
+
var uniqueLiteralMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t; }); // replace all type parameters with the unique literal type (disregarding constraints)
|
|
47658
47676
|
var emptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47659
47677
|
var emptyJsxObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47660
47678
|
emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
|
|
@@ -48593,7 +48611,7 @@ var ts;
|
|
|
48593
48611
|
// - parameters are only in the scope of function body
|
|
48594
48612
|
// This restriction does not apply to JSDoc comment types because they are parented
|
|
48595
48613
|
// at a higher level than type parameters would normally be
|
|
48596
|
-
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /*
|
|
48614
|
+
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /* JSDoc */) {
|
|
48597
48615
|
useResult = result.flags & 262144 /* TypeParameter */
|
|
48598
48616
|
// type parameters are visible in parameter list, return type and type parameter list
|
|
48599
48617
|
? lastLocation === location.type ||
|
|
@@ -51559,10 +51577,16 @@ var ts;
|
|
|
51559
51577
|
var readonlyToken = type.declaration.readonlyToken ? ts.factory.createToken(type.declaration.readonlyToken.kind) : undefined;
|
|
51560
51578
|
var questionToken = type.declaration.questionToken ? ts.factory.createToken(type.declaration.questionToken.kind) : undefined;
|
|
51561
51579
|
var appropriateConstraintTypeNode;
|
|
51580
|
+
var newTypeVariable;
|
|
51562
51581
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
51563
51582
|
// We have a { [P in keyof T]: X }
|
|
51564
51583
|
// We do this to ensure we retain the toplevel keyof-ness of the type which may be lost due to keyof distribution during `getConstraintTypeFromMappedType`
|
|
51565
|
-
|
|
51584
|
+
if (!(getModifiersTypeFromMappedType(type).flags & 262144 /* TypeParameter */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51585
|
+
var newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T"));
|
|
51586
|
+
var name = typeParameterToName(newParam, context);
|
|
51587
|
+
newTypeVariable = ts.factory.createTypeReferenceNode(name);
|
|
51588
|
+
}
|
|
51589
|
+
appropriateConstraintTypeNode = ts.factory.createTypeOperatorNode(140 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context));
|
|
51566
51590
|
}
|
|
51567
51591
|
else {
|
|
51568
51592
|
appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context);
|
|
@@ -51572,7 +51596,14 @@ var ts;
|
|
|
51572
51596
|
var templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & 4 /* IncludeOptional */)), context);
|
|
51573
51597
|
var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, /*members*/ undefined);
|
|
51574
51598
|
context.approximateLength += 10;
|
|
51575
|
-
|
|
51599
|
+
var result = ts.setEmitFlags(mappedTypeNode, 1 /* SingleLine */);
|
|
51600
|
+
if (isMappedTypeWithKeyofConstraintDeclaration(type) && !(getModifiersTypeFromMappedType(type).flags & 262144 /* TypeParameter */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51601
|
+
// homomorphic mapped type with a non-homomorphic naive inlining
|
|
51602
|
+
// wrap it with a conditional like `SomeModifiersType extends infer U ? {..the mapped type...} : never` to ensure the resulting
|
|
51603
|
+
// type stays homomorphic
|
|
51604
|
+
return ts.factory.createConditionalTypeNode(typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context), ts.factory.createInferTypeNode(ts.factory.createTypeParameterDeclaration(ts.factory.cloneNode(newTypeVariable.typeName))), result, ts.factory.createKeywordTypeNode(143 /* NeverKeyword */));
|
|
51605
|
+
}
|
|
51606
|
+
return result;
|
|
51576
51607
|
}
|
|
51577
51608
|
function createAnonymousTypeNode(type) {
|
|
51578
51609
|
var _a;
|
|
@@ -53193,7 +53224,7 @@ var ts;
|
|
|
53193
53224
|
// If it's a class/interface/function: emit a class/interface/function with a `default` modifier
|
|
53194
53225
|
// These forms can merge, eg (`export default 12; export default interface A {}`)
|
|
53195
53226
|
function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) {
|
|
53196
|
-
var _a, _b;
|
|
53227
|
+
var _a, _b, _c, _d;
|
|
53197
53228
|
var symbolName = ts.unescapeLeadingUnderscores(symbol.escapedName);
|
|
53198
53229
|
var isDefault = symbol.escapedName === "default" /* Default */;
|
|
53199
53230
|
if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && ts.isStringANonContextualKeyword(symbolName) && !isDefault) {
|
|
@@ -53244,17 +53275,21 @@ var ts;
|
|
|
53244
53275
|
else {
|
|
53245
53276
|
// A Class + Property merge is made for a `module.exports.Member = class {}`, and it doesn't serialize well as either a class _or_ a property symbol - in fact, _it behaves like an alias!_
|
|
53246
53277
|
// `var` is `FunctionScopedVariable`, `const` and `let` are `BlockScopedVariable`, and `module.exports.thing =` is `Property`
|
|
53247
|
-
var flags = !(symbol.flags & 2 /* BlockScopedVariable */)
|
|
53248
|
-
:
|
|
53278
|
+
var flags = !(symbol.flags & 2 /* BlockScopedVariable */)
|
|
53279
|
+
? ((_a = symbol.parent) === null || _a === void 0 ? void 0 : _a.valueDeclaration) && ts.isSourceFile((_b = symbol.parent) === null || _b === void 0 ? void 0 : _b.valueDeclaration)
|
|
53280
|
+
? 2 /* Const */
|
|
53281
|
+
: undefined
|
|
53282
|
+
: isConstVariable(symbol)
|
|
53283
|
+
? 2 /* Const */
|
|
53249
53284
|
: 1 /* Let */;
|
|
53250
53285
|
var name = (needsPostExportDefault || !(symbol.flags & 4 /* Property */)) ? localName : getUnusedName(localName, symbol);
|
|
53251
53286
|
var textRange = symbol.declarations && ts.find(symbol.declarations, function (d) { return ts.isVariableDeclaration(d); });
|
|
53252
53287
|
if (textRange && ts.isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {
|
|
53253
53288
|
textRange = textRange.parent.parent;
|
|
53254
53289
|
}
|
|
53255
|
-
var propertyAccessRequire = (
|
|
53290
|
+
var propertyAccessRequire = (_c = symbol.declarations) === null || _c === void 0 ? void 0 : _c.find(ts.isPropertyAccessExpression);
|
|
53256
53291
|
if (propertyAccessRequire && ts.isBinaryExpression(propertyAccessRequire.parent) && ts.isIdentifier(propertyAccessRequire.parent.right)
|
|
53257
|
-
&& ((
|
|
53292
|
+
&& ((_d = type.symbol) === null || _d === void 0 ? void 0 : _d.valueDeclaration) && ts.isSourceFile(type.symbol.valueDeclaration)) {
|
|
53258
53293
|
var alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right;
|
|
53259
53294
|
addResult(ts.factory.createExportDeclaration(
|
|
53260
53295
|
/*decorators*/ undefined,
|
|
@@ -53334,8 +53369,8 @@ var ts;
|
|
|
53334
53369
|
// synthesize export * from "moduleReference"
|
|
53335
53370
|
// Straightforward - only one thing to do - make an export declaration
|
|
53336
53371
|
if (symbol.declarations) {
|
|
53337
|
-
for (var _i = 0,
|
|
53338
|
-
var node =
|
|
53372
|
+
for (var _i = 0, _e = symbol.declarations; _i < _e.length; _i++) {
|
|
53373
|
+
var node = _e[_i];
|
|
53339
53374
|
var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
|
|
53340
53375
|
if (!resolvedModule)
|
|
53341
53376
|
continue;
|
|
@@ -55141,7 +55176,10 @@ var ts;
|
|
|
55141
55176
|
if (containsSameNamedThisProperty(expression.left, expression.right)) {
|
|
55142
55177
|
return anyType;
|
|
55143
55178
|
}
|
|
55144
|
-
var
|
|
55179
|
+
var isDirectExport = kind === 1 /* ExportsProperty */ && (ts.isPropertyAccessExpression(expression.left) || ts.isElementAccessExpression(expression.left)) && (ts.isModuleExportsAccessExpression(expression.left.expression) || (ts.isIdentifier(expression.left.expression) && ts.isExportsIdentifier(expression.left.expression)));
|
|
55180
|
+
var type = resolvedSymbol ? getTypeOfSymbol(resolvedSymbol)
|
|
55181
|
+
: isDirectExport ? getRegularTypeOfLiteralType(checkExpressionCached(expression.right))
|
|
55182
|
+
: getWidenedLiteralType(checkExpressionCached(expression.right));
|
|
55145
55183
|
if (type.flags & 524288 /* Object */ &&
|
|
55146
55184
|
kind === 2 /* ModuleExports */ &&
|
|
55147
55185
|
symbol.escapedName === "export=" /* ExportEquals */) {
|
|
@@ -55885,7 +55923,7 @@ var ts;
|
|
|
55885
55923
|
node = paramSymbol.valueDeclaration;
|
|
55886
55924
|
}
|
|
55887
55925
|
break;
|
|
55888
|
-
case 319 /*
|
|
55926
|
+
case 319 /* JSDoc */: {
|
|
55889
55927
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
55890
55928
|
return node.tags
|
|
55891
55929
|
? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
|
|
@@ -58146,10 +58184,10 @@ var ts;
|
|
|
58146
58184
|
else if (type !== firstType) {
|
|
58147
58185
|
checkFlags |= 64 /* HasNonUniformType */;
|
|
58148
58186
|
}
|
|
58149
|
-
if (isLiteralType(type) || isPatternLiteralType(type)) {
|
|
58187
|
+
if (isLiteralType(type) || isPatternLiteralType(type) || type === uniqueLiteralType) {
|
|
58150
58188
|
checkFlags |= 128 /* HasLiteralType */;
|
|
58151
58189
|
}
|
|
58152
|
-
if (type.flags & 131072 /* Never */) {
|
|
58190
|
+
if (type.flags & 131072 /* Never */ && type !== uniqueLiteralType) {
|
|
58153
58191
|
checkFlags |= 131072 /* HasNeverType */;
|
|
58154
58192
|
}
|
|
58155
58193
|
propTypes.push(type);
|
|
@@ -59334,7 +59372,7 @@ var ts;
|
|
|
59334
59372
|
function getConditionalFlowTypeOfType(type, node) {
|
|
59335
59373
|
var constraints;
|
|
59336
59374
|
var covariant = true;
|
|
59337
|
-
while (node && !ts.isStatement(node) && node.kind !== 319 /*
|
|
59375
|
+
while (node && !ts.isStatement(node) && node.kind !== 319 /* JSDoc */) {
|
|
59338
59376
|
var parent = node.parent;
|
|
59339
59377
|
// only consider variance flipped by parameter locations - `keyof` types would usually be considered variance inverting, but
|
|
59340
59378
|
// often get used in indexed accesses where they behave sortof invariantly, but our checking is lax
|
|
@@ -60001,6 +60039,10 @@ var ts;
|
|
|
60001
60039
|
return includes;
|
|
60002
60040
|
}
|
|
60003
60041
|
function removeSubtypes(types, hasObjectTypes) {
|
|
60042
|
+
// [] and [T] immediately reduce to [] and [T] respectively
|
|
60043
|
+
if (types.length < 2) {
|
|
60044
|
+
return types;
|
|
60045
|
+
}
|
|
60004
60046
|
var id = getTypeListId(types);
|
|
60005
60047
|
var match = subtypeReductionCache.get(id);
|
|
60006
60048
|
if (match) {
|
|
@@ -60686,10 +60728,24 @@ var ts;
|
|
|
60686
60728
|
return getUnionType(ts.concatenate(propertyTypes, indexKeyTypes), 1 /* Literal */,
|
|
60687
60729
|
/*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, origin);
|
|
60688
60730
|
}
|
|
60731
|
+
/**
|
|
60732
|
+
* A union type which is reducible upon instantiation (meaning some members are removed under certain instantiations)
|
|
60733
|
+
* must be kept generic, as that instantiation information needs to flow through the type system. By replacing all
|
|
60734
|
+
* type parameters in the union with a special never type that is treated as a literal in `getReducedType`, we can cause the `getReducedType` logic
|
|
60735
|
+
* to reduce the resulting type if possible (since only intersections with conflicting literal-typed properties are reducible).
|
|
60736
|
+
*/
|
|
60737
|
+
function isPossiblyReducibleByInstantiation(type) {
|
|
60738
|
+
return ts.some(type.types, function (t) {
|
|
60739
|
+
var uniqueFilled = getUniqueLiteralFilledInstantiation(t);
|
|
60740
|
+
return getReducedType(uniqueFilled) !== uniqueFilled;
|
|
60741
|
+
});
|
|
60742
|
+
}
|
|
60689
60743
|
function getIndexType(type, stringsOnly, noIndexSignatures) {
|
|
60690
60744
|
if (stringsOnly === void 0) { stringsOnly = keyofStringsOnly; }
|
|
60691
60745
|
type = getReducedType(type);
|
|
60692
|
-
return type.flags & 1048576 /* Union */ ?
|
|
60746
|
+
return type.flags & 1048576 /* Union */ ? isPossiblyReducibleByInstantiation(type)
|
|
60747
|
+
? getIndexTypeForGenericType(type, stringsOnly)
|
|
60748
|
+
: getIntersectionType(ts.map(type.types, function (t) { return getIndexType(t, stringsOnly, noIndexSignatures); })) :
|
|
60693
60749
|
type.flags & 2097152 /* Intersection */ ? getUnionType(ts.map(type.types, function (t) { return getIndexType(t, stringsOnly, noIndexSignatures); })) :
|
|
60694
60750
|
type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) ? getIndexTypeForGenericType(type, stringsOnly) :
|
|
60695
60751
|
ts.getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, stringsOnly, noIndexSignatures) :
|
|
@@ -61317,6 +61373,10 @@ var ts;
|
|
|
61317
61373
|
}
|
|
61318
61374
|
return type;
|
|
61319
61375
|
}
|
|
61376
|
+
function maybeCloneTypeParameter(p) {
|
|
61377
|
+
var constraint = getConstraintOfTypeParameter(p);
|
|
61378
|
+
return constraint && (isGenericObjectType(constraint) || isGenericIndexType(constraint)) ? cloneTypeParameter(p) : p;
|
|
61379
|
+
}
|
|
61320
61380
|
function isTypicalNondistributiveConditional(root) {
|
|
61321
61381
|
return !root.isDistributive && isSingletonTupleType(root.node.checkType) && isSingletonTupleType(root.node.extendsType);
|
|
61322
61382
|
}
|
|
@@ -61335,37 +61395,65 @@ var ts;
|
|
|
61335
61395
|
var result;
|
|
61336
61396
|
var extraTypes;
|
|
61337
61397
|
var tailCount = 0;
|
|
61338
|
-
|
|
61339
|
-
// types of the form 'A extends B ? X : C extends D ? Y : E extends F ? Z : ...' as a single construct for
|
|
61340
|
-
// purposes of resolution. We also loop here when resolution of a conditional type ends in resolution of
|
|
61341
|
-
// another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
|
|
61342
|
-
// cases we increment the tail recursion counter and stop after 1000 iterations.
|
|
61343
|
-
while (true) {
|
|
61398
|
+
var _loop_18 = function () {
|
|
61344
61399
|
if (tailCount === 1000) {
|
|
61345
61400
|
error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
61346
61401
|
result = errorType;
|
|
61347
|
-
break;
|
|
61402
|
+
return "break";
|
|
61348
61403
|
}
|
|
61349
61404
|
var isUnwrapped = isTypicalNondistributiveConditional(root);
|
|
61350
61405
|
var checkType = instantiateType(unwrapNondistributiveConditionalTuple(root, getActualTypeVariable(root.checkType)), mapper);
|
|
61351
61406
|
var checkTypeInstantiable = isGenericType(checkType);
|
|
61352
61407
|
var extendsType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), mapper);
|
|
61353
61408
|
if (checkType === wildcardType || extendsType === wildcardType) {
|
|
61354
|
-
return wildcardType;
|
|
61409
|
+
return { value: wildcardType };
|
|
61355
61410
|
}
|
|
61356
61411
|
var combinedMapper = void 0;
|
|
61357
61412
|
if (root.inferTypeParameters) {
|
|
61358
|
-
|
|
61359
|
-
|
|
61413
|
+
// When we're looking at making an inference for an infer type, when we get its constraint, it'll automagically be
|
|
61414
|
+
// instantiated with the context, so it doesn't need the mapper for the inference contex - however the constraint
|
|
61415
|
+
// may refer to another _root_, _uncloned_ `infer` type parameter [1], or to something mapped by `mapper` [2].
|
|
61416
|
+
// [1] Eg, if we have `Foo<T, U extends T>` and `Foo<number, infer B>` - `B` is constrained to `T`, which, in turn, has been instantiated
|
|
61417
|
+
// as `number`
|
|
61418
|
+
// Conversely, if we have `Foo<infer A, infer B>`, `B` is still constrained to `T` and `T` is instantiated as `A`
|
|
61419
|
+
// [2] Eg, if we have `Foo<T, U extends T>` and `Foo<Q, infer B>` where `Q` is mapped by `mapper` into `number` - `B` is constrained to `T`
|
|
61420
|
+
// which is in turn instantiated as `Q`, which is in turn instantiated as `number`.
|
|
61421
|
+
// So we need to:
|
|
61422
|
+
// * Clone the type parameters so their constraints can be instantiated in the context of `mapper` (otherwise theyd only get inference context information)
|
|
61423
|
+
// * Set the clones to both map the conditional's enclosing `mapper` and the original params
|
|
61424
|
+
// * instantiate the extends type with the clones
|
|
61425
|
+
// * incorporate all of the component mappers into the combined mapper for the true and false members
|
|
61426
|
+
// This means we have three mappers that need applying:
|
|
61427
|
+
// * The original `mapper` used to create this conditional
|
|
61428
|
+
// * The mapper that maps the old root type parameter to the clone (`freshMapper`)
|
|
61429
|
+
// * The mapper that maps the clone to its inference result (`context.mapper`)
|
|
61430
|
+
var freshParams = ts.sameMap(root.inferTypeParameters, maybeCloneTypeParameter);
|
|
61431
|
+
var freshMapper = freshParams !== root.inferTypeParameters ? createTypeMapper(root.inferTypeParameters, freshParams) : undefined;
|
|
61432
|
+
var context = createInferenceContext(freshParams, /*signature*/ undefined, 0 /* None */);
|
|
61433
|
+
if (freshMapper) {
|
|
61434
|
+
var freshCombinedMapper = combineTypeMappers(mapper, freshMapper);
|
|
61435
|
+
for (var _i = 0, freshParams_1 = freshParams; _i < freshParams_1.length; _i++) {
|
|
61436
|
+
var p = freshParams_1[_i];
|
|
61437
|
+
if (root.inferTypeParameters.indexOf(p) === -1) {
|
|
61438
|
+
p.mapper = freshCombinedMapper;
|
|
61439
|
+
}
|
|
61440
|
+
}
|
|
61441
|
+
}
|
|
61442
|
+
// We skip inference of the possible `infer` types unles the `extendsType` _is_ an infer type
|
|
61443
|
+
// if it was, it's trivial to say that extendsType = checkType, however such a pattern is used to
|
|
61444
|
+
// "reset" the type being build up during constraint calculation and avoid making an apparently "infinite" constraint
|
|
61445
|
+
// so in those cases we refain from performing inference and retain the uninfered type parameter
|
|
61446
|
+
if (!checkTypeInstantiable || !ts.some(root.inferTypeParameters, function (t) { return t === extendsType; })) {
|
|
61360
61447
|
// We don't want inferences from constraints as they may cause us to eagerly resolve the
|
|
61361
61448
|
// conditional type instead of deferring resolution. Also, we always want strict function
|
|
61362
61449
|
// types rules (i.e. proper contravariance) for inferences.
|
|
61363
|
-
inferTypes(context.inferences, checkType, extendsType, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
|
|
61450
|
+
inferTypes(context.inferences, checkType, instantiateType(extendsType, freshMapper), 512 /* NoConstraints */ | 1024 /* AlwaysStrict */);
|
|
61364
61451
|
}
|
|
61452
|
+
var innerMapper = combineTypeMappers(freshMapper, context.mapper);
|
|
61365
61453
|
// It's possible for 'infer T' type paramteters to be given uninstantiated constraints when the
|
|
61366
61454
|
// those type parameters are used in type references (see getInferredTypeParameterConstraint). For
|
|
61367
61455
|
// that reason we need context.mapper to be first in the combined mapper. See #42636 for examples.
|
|
61368
|
-
combinedMapper = mapper ? combineTypeMappers(
|
|
61456
|
+
combinedMapper = mapper ? combineTypeMappers(innerMapper, mapper) : innerMapper;
|
|
61369
61457
|
}
|
|
61370
61458
|
// Instantiate the extends type including inferences for 'infer T' type parameters
|
|
61371
61459
|
var inferredExtendsType = combinedMapper ? instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), combinedMapper) : extendsType;
|
|
@@ -61387,14 +61475,14 @@ var ts;
|
|
|
61387
61475
|
var newRoot = falseType_1.root;
|
|
61388
61476
|
if (newRoot.node.parent === root.node && (!newRoot.isDistributive || newRoot.checkType === root.checkType)) {
|
|
61389
61477
|
root = newRoot;
|
|
61390
|
-
continue;
|
|
61478
|
+
return "continue";
|
|
61391
61479
|
}
|
|
61392
61480
|
if (canTailRecurse(falseType_1, mapper)) {
|
|
61393
|
-
continue;
|
|
61481
|
+
return "continue";
|
|
61394
61482
|
}
|
|
61395
61483
|
}
|
|
61396
61484
|
result = instantiateType(falseType_1, mapper);
|
|
61397
|
-
break;
|
|
61485
|
+
return "break";
|
|
61398
61486
|
}
|
|
61399
61487
|
// Return trueType for a definitely true extends check. We check instantiations of the two
|
|
61400
61488
|
// types with type parameters mapped to their restrictive form, i.e. a form of the type parameter
|
|
@@ -61405,10 +61493,10 @@ var ts;
|
|
|
61405
61493
|
var trueType_1 = getTypeFromTypeNode(root.node.trueType);
|
|
61406
61494
|
var trueMapper = combinedMapper || mapper;
|
|
61407
61495
|
if (canTailRecurse(trueType_1, trueMapper)) {
|
|
61408
|
-
continue;
|
|
61496
|
+
return "continue";
|
|
61409
61497
|
}
|
|
61410
61498
|
result = instantiateType(trueType_1, trueMapper);
|
|
61411
|
-
break;
|
|
61499
|
+
return "break";
|
|
61412
61500
|
}
|
|
61413
61501
|
}
|
|
61414
61502
|
// Return a deferred type for a check that is neither definitely true nor definitely false
|
|
@@ -61420,7 +61508,19 @@ var ts;
|
|
|
61420
61508
|
result.combinedMapper = combinedMapper;
|
|
61421
61509
|
result.aliasSymbol = aliasSymbol || root.aliasSymbol;
|
|
61422
61510
|
result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(root.aliasTypeArguments, mapper); // TODO: GH#18217
|
|
61423
|
-
break;
|
|
61511
|
+
return "break";
|
|
61512
|
+
};
|
|
61513
|
+
// We loop here for an immediately nested conditional type in the false position, effectively treating
|
|
61514
|
+
// types of the form 'A extends B ? X : C extends D ? Y : E extends F ? Z : ...' as a single construct for
|
|
61515
|
+
// purposes of resolution. We also loop here when resolution of a conditional type ends in resolution of
|
|
61516
|
+
// another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
|
|
61517
|
+
// cases we increment the tail recursion counter and stop after 1000 iterations.
|
|
61518
|
+
while (true) {
|
|
61519
|
+
var state_5 = _loop_18();
|
|
61520
|
+
if (typeof state_5 === "object")
|
|
61521
|
+
return state_5.value;
|
|
61522
|
+
if (state_5 === "break")
|
|
61523
|
+
break;
|
|
61424
61524
|
}
|
|
61425
61525
|
return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
|
|
61426
61526
|
// We tail-recurse for generic conditional types that (a) have not already been evaluated and cached, and
|
|
@@ -61842,9 +61942,11 @@ var ts;
|
|
|
61842
61942
|
}
|
|
61843
61943
|
function getESSymbolLikeTypeForNode(node) {
|
|
61844
61944
|
if (ts.isValidESSymbolDeclaration(node)) {
|
|
61845
|
-
var symbol = getSymbolOfNode(node);
|
|
61846
|
-
|
|
61847
|
-
|
|
61945
|
+
var symbol = ts.isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node);
|
|
61946
|
+
if (symbol) {
|
|
61947
|
+
var links = getSymbolLinks(symbol);
|
|
61948
|
+
return links.uniqueESSymbolType || (links.uniqueESSymbolType = createUniqueESSymbolType(symbol));
|
|
61949
|
+
}
|
|
61848
61950
|
}
|
|
61849
61951
|
return esSymbolType;
|
|
61850
61952
|
}
|
|
@@ -62488,6 +62590,10 @@ var ts;
|
|
|
62488
62590
|
}
|
|
62489
62591
|
return type; // Nested invocation of `inferTypeForHomomorphicMappedType` or the `source` instantiated into something unmappable
|
|
62490
62592
|
}
|
|
62593
|
+
function getUniqueLiteralFilledInstantiation(type) {
|
|
62594
|
+
return type.flags & (131068 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type :
|
|
62595
|
+
type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
|
|
62596
|
+
}
|
|
62491
62597
|
function getPermissiveInstantiation(type) {
|
|
62492
62598
|
return type.flags & (131068 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type :
|
|
62493
62599
|
type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper));
|
|
@@ -63947,7 +64053,7 @@ var ts;
|
|
|
63947
64053
|
reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
|
|
63948
64054
|
checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget];
|
|
63949
64055
|
}
|
|
63950
|
-
var
|
|
64056
|
+
var _loop_19 = function (prop) {
|
|
63951
64057
|
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
|
|
63952
64058
|
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
|
|
63953
64059
|
if (reportErrors) {
|
|
@@ -64010,9 +64116,9 @@ var ts;
|
|
|
64010
64116
|
};
|
|
64011
64117
|
for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
|
|
64012
64118
|
var prop = _b[_i];
|
|
64013
|
-
var
|
|
64014
|
-
if (typeof
|
|
64015
|
-
return
|
|
64119
|
+
var state_6 = _loop_19(prop);
|
|
64120
|
+
if (typeof state_6 === "object")
|
|
64121
|
+
return state_6.value;
|
|
64016
64122
|
}
|
|
64017
64123
|
return false;
|
|
64018
64124
|
}
|
|
@@ -65002,11 +65108,11 @@ var ts;
|
|
|
65002
65108
|
// constituents of 'target'. If any combination does not have a match then 'source' is not relatable.
|
|
65003
65109
|
var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
|
|
65004
65110
|
var matchingTypes = [];
|
|
65005
|
-
var
|
|
65111
|
+
var _loop_20 = function (combination) {
|
|
65006
65112
|
var hasMatch = false;
|
|
65007
65113
|
outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
|
|
65008
65114
|
var type = _d[_c];
|
|
65009
|
-
var
|
|
65115
|
+
var _loop_21 = function (i) {
|
|
65010
65116
|
var sourceProperty = sourcePropertiesFiltered[i];
|
|
65011
65117
|
var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
|
|
65012
65118
|
if (!targetProperty)
|
|
@@ -65022,8 +65128,8 @@ var ts;
|
|
|
65022
65128
|
}
|
|
65023
65129
|
};
|
|
65024
65130
|
for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
|
|
65025
|
-
var
|
|
65026
|
-
switch (
|
|
65131
|
+
var state_8 = _loop_21(i);
|
|
65132
|
+
switch (state_8) {
|
|
65027
65133
|
case "continue-outer": continue outer;
|
|
65028
65134
|
}
|
|
65029
65135
|
}
|
|
@@ -65036,9 +65142,9 @@ var ts;
|
|
|
65036
65142
|
};
|
|
65037
65143
|
for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
|
|
65038
65144
|
var combination = discriminantCombinations_1[_a];
|
|
65039
|
-
var
|
|
65040
|
-
if (typeof
|
|
65041
|
-
return
|
|
65145
|
+
var state_7 = _loop_20(combination);
|
|
65146
|
+
if (typeof state_7 === "object")
|
|
65147
|
+
return state_7.value;
|
|
65042
65148
|
}
|
|
65043
65149
|
// Compare the remaining non-discriminant properties of each match.
|
|
65044
65150
|
var result = -1 /* True */;
|
|
@@ -65751,7 +65857,7 @@ var ts;
|
|
|
65751
65857
|
// The emptyArray singleton is used to signal a recursive invocation.
|
|
65752
65858
|
cache.variances = ts.emptyArray;
|
|
65753
65859
|
variances = [];
|
|
65754
|
-
var
|
|
65860
|
+
var _loop_22 = function (tp) {
|
|
65755
65861
|
var unmeasurable = false;
|
|
65756
65862
|
var unreliable = false;
|
|
65757
65863
|
var oldHandler = outofbandVarianceMarkerHandler;
|
|
@@ -65783,7 +65889,7 @@ var ts;
|
|
|
65783
65889
|
};
|
|
65784
65890
|
for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
|
|
65785
65891
|
var tp = typeParameters_1[_i];
|
|
65786
|
-
|
|
65892
|
+
_loop_22(tp);
|
|
65787
65893
|
}
|
|
65788
65894
|
cache.variances = variances;
|
|
65789
65895
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
@@ -68154,7 +68260,7 @@ var ts;
|
|
|
68154
68260
|
function mapTypesByKeyProperty(types, name) {
|
|
68155
68261
|
var map = new ts.Map();
|
|
68156
68262
|
var count = 0;
|
|
68157
|
-
var
|
|
68263
|
+
var _loop_23 = function (type) {
|
|
68158
68264
|
if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {
|
|
68159
68265
|
var discriminant = getTypeOfPropertyOfType(type, name);
|
|
68160
68266
|
if (discriminant) {
|
|
@@ -68180,9 +68286,9 @@ var ts;
|
|
|
68180
68286
|
};
|
|
68181
68287
|
for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
|
|
68182
68288
|
var type = types_16[_i];
|
|
68183
|
-
var
|
|
68184
|
-
if (typeof
|
|
68185
|
-
return
|
|
68289
|
+
var state_9 = _loop_23(type);
|
|
68290
|
+
if (typeof state_9 === "object")
|
|
68291
|
+
return state_9.value;
|
|
68186
68292
|
}
|
|
68187
68293
|
return count >= 10 && count * 2 >= types.length ? map : undefined;
|
|
68188
68294
|
}
|
|
@@ -74513,7 +74619,7 @@ var ts;
|
|
|
74513
74619
|
if (spreadIndex >= 0) {
|
|
74514
74620
|
// Create synthetic arguments from spreads of tuple types.
|
|
74515
74621
|
var effectiveArgs_1 = args.slice(0, spreadIndex);
|
|
74516
|
-
var
|
|
74622
|
+
var _loop_24 = function (i) {
|
|
74517
74623
|
var arg = args[i];
|
|
74518
74624
|
// We can call checkExpressionCached because spread expressions never have a contextual type.
|
|
74519
74625
|
var spreadType = arg.kind === 224 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
|
|
@@ -74530,7 +74636,7 @@ var ts;
|
|
|
74530
74636
|
}
|
|
74531
74637
|
};
|
|
74532
74638
|
for (var i = spreadIndex; i < args.length; i++) {
|
|
74533
|
-
|
|
74639
|
+
_loop_24(i);
|
|
74534
74640
|
}
|
|
74535
74641
|
return effectiveArgs_1;
|
|
74536
74642
|
}
|
|
@@ -74843,7 +74949,7 @@ var ts;
|
|
|
74843
74949
|
var min_3 = Number.MAX_VALUE;
|
|
74844
74950
|
var minIndex = 0;
|
|
74845
74951
|
var i_1 = 0;
|
|
74846
|
-
var
|
|
74952
|
+
var _loop_25 = function (c) {
|
|
74847
74953
|
var chain_2 = function () { return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
|
|
74848
74954
|
var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0 /* Normal */, /*reportErrors*/ true, chain_2);
|
|
74849
74955
|
if (diags_2) {
|
|
@@ -74861,7 +74967,7 @@ var ts;
|
|
|
74861
74967
|
};
|
|
74862
74968
|
for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
|
|
74863
74969
|
var c = candidatesForArgumentError_1[_a];
|
|
74864
|
-
|
|
74970
|
+
_loop_25(c);
|
|
74865
74971
|
}
|
|
74866
74972
|
var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
|
|
74867
74973
|
ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
@@ -75019,7 +75125,7 @@ var ts;
|
|
|
75019
75125
|
}
|
|
75020
75126
|
var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
|
|
75021
75127
|
var parameters = [];
|
|
75022
|
-
var
|
|
75128
|
+
var _loop_26 = function (i) {
|
|
75023
75129
|
var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
|
|
75024
75130
|
i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
|
|
75025
75131
|
i < s.parameters.length ? s.parameters[i] : undefined; });
|
|
@@ -75027,7 +75133,7 @@ var ts;
|
|
|
75027
75133
|
parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
|
|
75028
75134
|
};
|
|
75029
75135
|
for (var i = 0; i < maxNonRestParam; i++) {
|
|
75030
|
-
|
|
75136
|
+
_loop_26(i);
|
|
75031
75137
|
}
|
|
75032
75138
|
var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
|
|
75033
75139
|
var flags = 0 /* None */;
|
|
@@ -78254,7 +78360,7 @@ var ts;
|
|
|
78254
78360
|
}
|
|
78255
78361
|
function checkExpressionForMutableLocation(node, checkMode, contextualType, forceTuple) {
|
|
78256
78362
|
var type = checkExpression(node, checkMode, forceTuple);
|
|
78257
|
-
return isConstContext(node) ? getRegularTypeOfLiteralType(type) :
|
|
78363
|
+
return isConstContext(node) || ts.isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) :
|
|
78258
78364
|
isTypeAssertion(node) ? type :
|
|
78259
78365
|
getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType(node) : contextualType, node));
|
|
78260
78366
|
}
|
|
@@ -79023,7 +79129,7 @@ var ts;
|
|
|
79023
79129
|
var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
|
|
79024
79130
|
if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
|
|
79025
79131
|
var indexSignatureMap_1 = new ts.Map();
|
|
79026
|
-
var
|
|
79132
|
+
var _loop_27 = function (declaration) {
|
|
79027
79133
|
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
|
|
79028
79134
|
forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
|
|
79029
79135
|
var entry = indexSignatureMap_1.get(getTypeId(type));
|
|
@@ -79038,7 +79144,7 @@ var ts;
|
|
|
79038
79144
|
};
|
|
79039
79145
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
79040
79146
|
var declaration = _a[_i];
|
|
79041
|
-
|
|
79147
|
+
_loop_27(declaration);
|
|
79042
79148
|
}
|
|
79043
79149
|
indexSignatureMap_1.forEach(function (entry) {
|
|
79044
79150
|
if (entry.declarations.length > 1) {
|
|
@@ -82417,7 +82523,7 @@ var ts;
|
|
|
82417
82523
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 257 /* InterfaceDeclaration */) : undefined;
|
|
82418
82524
|
var localPropDeclaration = declaration && declaration.kind === 220 /* BinaryExpression */ ||
|
|
82419
82525
|
name && name.kind === 161 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
|
|
82420
|
-
var
|
|
82526
|
+
var _loop_28 = function (info) {
|
|
82421
82527
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
82422
82528
|
// We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
|
|
82423
82529
|
// in the containing type, or (c) the containing type is an interface and no base interface contains both the property and
|
|
@@ -82430,7 +82536,7 @@ var ts;
|
|
|
82430
82536
|
};
|
|
82431
82537
|
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
82432
82538
|
var info = indexInfos_9[_i];
|
|
82433
|
-
|
|
82539
|
+
_loop_28(info);
|
|
82434
82540
|
}
|
|
82435
82541
|
}
|
|
82436
82542
|
function checkIndexConstraintForIndexSignature(type, checkInfo) {
|
|
@@ -82438,7 +82544,7 @@ var ts;
|
|
|
82438
82544
|
var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
|
|
82439
82545
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 257 /* InterfaceDeclaration */) : undefined;
|
|
82440
82546
|
var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
|
|
82441
|
-
var
|
|
82547
|
+
var _loop_29 = function (info) {
|
|
82442
82548
|
if (info === checkInfo)
|
|
82443
82549
|
return "continue";
|
|
82444
82550
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
@@ -82453,7 +82559,7 @@ var ts;
|
|
|
82453
82559
|
};
|
|
82454
82560
|
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
82455
82561
|
var info = indexInfos_10[_i];
|
|
82456
|
-
|
|
82562
|
+
_loop_29(info);
|
|
82457
82563
|
}
|
|
82458
82564
|
}
|
|
82459
82565
|
function checkTypeNameIsReserved(name, message) {
|
|
@@ -82764,7 +82870,7 @@ var ts;
|
|
|
82764
82870
|
var baseTypes = baseTypeNode && getBaseTypes(type);
|
|
82765
82871
|
var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
|
|
82766
82872
|
var baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
82767
|
-
var
|
|
82873
|
+
var _loop_30 = function (member) {
|
|
82768
82874
|
if (ts.hasAmbientModifier(member)) {
|
|
82769
82875
|
return "continue";
|
|
82770
82876
|
}
|
|
@@ -82781,7 +82887,7 @@ var ts;
|
|
|
82781
82887
|
};
|
|
82782
82888
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
82783
82889
|
var member = _a[_i];
|
|
82784
|
-
|
|
82890
|
+
_loop_30(member);
|
|
82785
82891
|
}
|
|
82786
82892
|
}
|
|
82787
82893
|
/**
|
|
@@ -82869,7 +82975,7 @@ var ts;
|
|
|
82869
82975
|
function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
|
|
82870
82976
|
// iterate over all implemented properties and issue errors on each one which isn't compatible, rather than the class as a whole, if possible
|
|
82871
82977
|
var issuedMemberError = false;
|
|
82872
|
-
var
|
|
82978
|
+
var _loop_31 = function (member) {
|
|
82873
82979
|
if (ts.isStatic(member)) {
|
|
82874
82980
|
return "continue";
|
|
82875
82981
|
}
|
|
@@ -82888,7 +82994,7 @@ var ts;
|
|
|
82888
82994
|
};
|
|
82889
82995
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
82890
82996
|
var member = _a[_i];
|
|
82891
|
-
|
|
82997
|
+
_loop_31(member);
|
|
82892
82998
|
}
|
|
82893
82999
|
if (!issuedMemberError) {
|
|
82894
83000
|
// check again with diagnostics to generate a less-specific error
|
|
@@ -109853,7 +109959,7 @@ var ts;
|
|
|
109853
109959
|
return emitRestOrJSDocVariadicType(node);
|
|
109854
109960
|
case 318 /* JSDocNamepathType */:
|
|
109855
109961
|
return;
|
|
109856
|
-
case 319 /*
|
|
109962
|
+
case 319 /* JSDoc */:
|
|
109857
109963
|
return emitJSDoc(node);
|
|
109858
109964
|
case 321 /* JSDocTypeLiteral */:
|
|
109859
109965
|
return emitJSDocTypeLiteral(node);
|
|
@@ -120675,7 +120781,7 @@ var ts;
|
|
|
120675
120781
|
});
|
|
120676
120782
|
// Sort by paths closest to importing file Name directory
|
|
120677
120783
|
var sortedPaths = [];
|
|
120678
|
-
var
|
|
120784
|
+
var _loop_32 = function (directory) {
|
|
120679
120785
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
120680
120786
|
var pathsInDirectory;
|
|
120681
120787
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -120699,9 +120805,9 @@ var ts;
|
|
|
120699
120805
|
};
|
|
120700
120806
|
var out_directory_1;
|
|
120701
120807
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
120702
|
-
var
|
|
120808
|
+
var state_10 = _loop_32(directory);
|
|
120703
120809
|
directory = out_directory_1;
|
|
120704
|
-
if (
|
|
120810
|
+
if (state_10 === "break")
|
|
120705
120811
|
break;
|
|
120706
120812
|
}
|
|
120707
120813
|
if (allFileNames.size) {
|