@typescript-deploys/pr-build 4.7.0-pr-48080-37 → 4.7.0-pr-48168-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +176 -204
- package/lib/tsserver.js +467 -294
- package/lib/tsserverlibrary.d.ts +11 -7
- package/lib/tsserverlibrary.js +467 -294
- package/lib/typescript.d.ts +11 -7
- package/lib/typescript.js +467 -294
- package/lib/typescriptServices.d.ts +11 -7
- package/lib/typescriptServices.js +467 -294
- package/lib/typingsInstaller.js +227 -251
- package/package.json +1 -1
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220309";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -4164,6 +4164,7 @@ var ts;
|
|
|
4164
4164
|
SyntaxKind[SyntaxKind["JSDocFunctionType"] = 316] = "JSDocFunctionType";
|
|
4165
4165
|
SyntaxKind[SyntaxKind["JSDocVariadicType"] = 317] = "JSDocVariadicType";
|
|
4166
4166
|
SyntaxKind[SyntaxKind["JSDocNamepathType"] = 318] = "JSDocNamepathType";
|
|
4167
|
+
/** @deprecated Use SyntaxKind.JSDoc */
|
|
4167
4168
|
SyntaxKind[SyntaxKind["JSDocComment"] = 319] = "JSDocComment";
|
|
4168
4169
|
SyntaxKind[SyntaxKind["JSDocText"] = 320] = "JSDocText";
|
|
4169
4170
|
SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 321] = "JSDocTypeLiteral";
|
|
@@ -4237,6 +4238,7 @@ var ts;
|
|
|
4237
4238
|
SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 346] = "LastJSDocTagNode";
|
|
4238
4239
|
/* @internal */ SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 126] = "FirstContextualKeyword";
|
|
4239
4240
|
/* @internal */ SyntaxKind[SyntaxKind["LastContextualKeyword"] = 159] = "LastContextualKeyword";
|
|
4241
|
+
SyntaxKind[SyntaxKind["JSDoc"] = 319] = "JSDoc";
|
|
4240
4242
|
})(SyntaxKind = ts.SyntaxKind || (ts.SyntaxKind = {}));
|
|
4241
4243
|
var NodeFlags;
|
|
4242
4244
|
(function (NodeFlags) {
|
|
@@ -4894,57 +4896,58 @@ var ts;
|
|
|
4894
4896
|
ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
|
|
4895
4897
|
ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped";
|
|
4896
4898
|
ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes";
|
|
4897
|
-
ObjectFlags[ObjectFlags["
|
|
4898
|
-
ObjectFlags[ObjectFlags["
|
|
4899
|
-
ObjectFlags[ObjectFlags["
|
|
4899
|
+
ObjectFlags[ObjectFlags["MarkerType"] = 4096] = "MarkerType";
|
|
4900
|
+
ObjectFlags[ObjectFlags["JSLiteral"] = 8192] = "JSLiteral";
|
|
4901
|
+
ObjectFlags[ObjectFlags["FreshLiteral"] = 16384] = "FreshLiteral";
|
|
4902
|
+
ObjectFlags[ObjectFlags["ArrayLiteral"] = 32768] = "ArrayLiteral";
|
|
4900
4903
|
/* @internal */
|
|
4901
|
-
ObjectFlags[ObjectFlags["PrimitiveUnion"] =
|
|
4904
|
+
ObjectFlags[ObjectFlags["PrimitiveUnion"] = 65536] = "PrimitiveUnion";
|
|
4902
4905
|
/* @internal */
|
|
4903
|
-
ObjectFlags[ObjectFlags["ContainsWideningType"] =
|
|
4906
|
+
ObjectFlags[ObjectFlags["ContainsWideningType"] = 131072] = "ContainsWideningType";
|
|
4904
4907
|
/* @internal */
|
|
4905
|
-
ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] =
|
|
4908
|
+
ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 262144] = "ContainsObjectOrArrayLiteral";
|
|
4906
4909
|
/* @internal */
|
|
4907
|
-
ObjectFlags[ObjectFlags["NonInferrableType"] =
|
|
4910
|
+
ObjectFlags[ObjectFlags["NonInferrableType"] = 524288] = "NonInferrableType";
|
|
4908
4911
|
/* @internal */
|
|
4909
|
-
ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] =
|
|
4912
|
+
ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 1048576] = "CouldContainTypeVariablesComputed";
|
|
4910
4913
|
/* @internal */
|
|
4911
|
-
ObjectFlags[ObjectFlags["CouldContainTypeVariables"] =
|
|
4914
|
+
ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 2097152] = "CouldContainTypeVariables";
|
|
4912
4915
|
ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface";
|
|
4913
4916
|
/* @internal */
|
|
4914
|
-
ObjectFlags[ObjectFlags["RequiresWidening"] =
|
|
4917
|
+
ObjectFlags[ObjectFlags["RequiresWidening"] = 393216] = "RequiresWidening";
|
|
4915
4918
|
/* @internal */
|
|
4916
|
-
ObjectFlags[ObjectFlags["PropagatingFlags"] =
|
|
4919
|
+
ObjectFlags[ObjectFlags["PropagatingFlags"] = 917504] = "PropagatingFlags";
|
|
4917
4920
|
// Object flags that uniquely identify the kind of ObjectType
|
|
4918
4921
|
/* @internal */
|
|
4919
4922
|
ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
|
|
4920
4923
|
// Flags that require TypeFlags.Object
|
|
4921
|
-
ObjectFlags[ObjectFlags["ContainsSpread"] =
|
|
4922
|
-
ObjectFlags[ObjectFlags["ObjectRestType"] =
|
|
4923
|
-
ObjectFlags[ObjectFlags["InstantiationExpressionType"] =
|
|
4924
|
+
ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread";
|
|
4925
|
+
ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType";
|
|
4926
|
+
ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType";
|
|
4924
4927
|
/* @internal */
|
|
4925
|
-
ObjectFlags[ObjectFlags["IsClassInstanceClone"] =
|
|
4928
|
+
ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 33554432] = "IsClassInstanceClone";
|
|
4926
4929
|
// Flags that require TypeFlags.Object and ObjectFlags.Reference
|
|
4927
4930
|
/* @internal */
|
|
4928
|
-
ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] =
|
|
4931
|
+
ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 67108864] = "IdenticalBaseTypeCalculated";
|
|
4929
4932
|
/* @internal */
|
|
4930
|
-
ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] =
|
|
4933
|
+
ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 134217728] = "IdenticalBaseTypeExists";
|
|
4931
4934
|
// Flags that require TypeFlags.UnionOrIntersection or TypeFlags.Substitution
|
|
4932
4935
|
/* @internal */
|
|
4933
|
-
ObjectFlags[ObjectFlags["IsGenericTypeComputed"] =
|
|
4936
|
+
ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed";
|
|
4934
4937
|
/* @internal */
|
|
4935
|
-
ObjectFlags[ObjectFlags["IsGenericObjectType"] =
|
|
4938
|
+
ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType";
|
|
4936
4939
|
/* @internal */
|
|
4937
|
-
ObjectFlags[ObjectFlags["IsGenericIndexType"] =
|
|
4940
|
+
ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType";
|
|
4938
4941
|
/* @internal */
|
|
4939
|
-
ObjectFlags[ObjectFlags["IsGenericType"] =
|
|
4942
|
+
ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType";
|
|
4940
4943
|
// Flags that require TypeFlags.Union
|
|
4941
4944
|
/* @internal */
|
|
4942
|
-
ObjectFlags[ObjectFlags["ContainsIntersections"] =
|
|
4945
|
+
ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections";
|
|
4943
4946
|
// Flags that require TypeFlags.Intersection
|
|
4944
4947
|
/* @internal */
|
|
4945
|
-
ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] =
|
|
4948
|
+
ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed";
|
|
4946
4949
|
/* @internal */
|
|
4947
|
-
ObjectFlags[ObjectFlags["IsNeverIntersection"] =
|
|
4950
|
+
ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection";
|
|
4948
4951
|
})(ObjectFlags = ts.ObjectFlags || (ts.ObjectFlags = {}));
|
|
4949
4952
|
/* @internal */
|
|
4950
4953
|
var VarianceFlags;
|
|
@@ -9023,7 +9026,6 @@ var ts;
|
|
|
9023
9026
|
Command_line_Options: diag(6171, ts.DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"),
|
|
9024
9027
|
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'."),
|
|
9025
9028
|
Enable_all_strict_type_checking_options: diag(6180, ts.DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."),
|
|
9026
|
-
List_of_language_service_plugins: diag(6181, ts.DiagnosticCategory.Message, "List_of_language_service_plugins_6181", "List of language service plugins."),
|
|
9027
9029
|
Scoped_package_detected_looking_in_0: diag(6182, ts.DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"),
|
|
9028
9030
|
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}'."),
|
|
9029
9031
|
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}'."),
|
|
@@ -9130,7 +9132,7 @@ var ts;
|
|
|
9130
9132
|
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"),
|
|
9131
9133
|
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"),
|
|
9132
9134
|
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"),
|
|
9133
|
-
Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"),
|
|
9135
|
+
Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."),
|
|
9134
9136
|
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')"),
|
|
9135
9137
|
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."),
|
|
9136
9138
|
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."),
|
|
@@ -9141,7 +9143,6 @@ var ts;
|
|
|
9141
9143
|
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}'"),
|
|
9142
9144
|
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}'"),
|
|
9143
9145
|
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}'"),
|
|
9144
|
-
Enable_incremental_compilation: diag(6378, ts.DiagnosticCategory.Message, "Enable_incremental_compilation_6378", "Enable incremental compilation"),
|
|
9145
9146
|
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."),
|
|
9146
9147
|
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"),
|
|
9147
9148
|
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}'"),
|
|
@@ -9169,13 +9170,13 @@ var ts;
|
|
|
9169
9170
|
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?"),
|
|
9170
9171
|
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."),
|
|
9171
9172
|
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."),
|
|
9172
|
-
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
|
|
9173
|
+
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."),
|
|
9173
9174
|
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."),
|
|
9174
9175
|
Allow_accessing_UMD_globals_from_modules: diag(6602, ts.DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."),
|
|
9175
9176
|
Disable_error_reporting_for_unreachable_code: diag(6603, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."),
|
|
9176
9177
|
Disable_error_reporting_for_unused_labels: diag(6604, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."),
|
|
9177
9178
|
Ensure_use_strict_is_always_emitted: diag(6605, ts.DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."),
|
|
9178
|
-
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
|
|
9179
|
+
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."),
|
|
9179
9180
|
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."),
|
|
9180
9181
|
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."),
|
|
9181
9182
|
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."),
|
|
@@ -9188,13 +9189,13 @@ var ts;
|
|
|
9188
9189
|
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."),
|
|
9189
9190
|
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."),
|
|
9190
9191
|
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."),
|
|
9191
|
-
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"),
|
|
9192
|
+
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."),
|
|
9192
9193
|
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."),
|
|
9193
9194
|
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."),
|
|
9194
9195
|
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."),
|
|
9195
9196
|
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."),
|
|
9196
9197
|
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"),
|
|
9197
|
-
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
|
|
9198
|
+
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."),
|
|
9198
9199
|
Filters_results_from_the_include_option: diag(6627, ts.DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."),
|
|
9199
9200
|
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."),
|
|
9200
9201
|
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."),
|
|
@@ -9204,7 +9205,7 @@ var ts;
|
|
|
9204
9205
|
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."),
|
|
9205
9206
|
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."),
|
|
9206
9207
|
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`."),
|
|
9207
|
-
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"),
|
|
9208
|
+
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."),
|
|
9208
9209
|
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."),
|
|
9209
9210
|
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."),
|
|
9210
9211
|
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."),
|
|
@@ -9214,77 +9215,76 @@ var ts;
|
|
|
9214
9215
|
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."),
|
|
9215
9216
|
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."),
|
|
9216
9217
|
Specify_what_JSX_code_is_generated: diag(6646, ts.DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."),
|
|
9217
|
-
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'"),
|
|
9218
|
+
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'."),
|
|
9218
9219
|
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'."),
|
|
9219
|
-
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
|
|
9220
|
+
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*'."),
|
|
9220
9221
|
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."),
|
|
9221
9222
|
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."),
|
|
9222
9223
|
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."),
|
|
9223
9224
|
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."),
|
|
9224
9225
|
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."),
|
|
9225
9226
|
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."),
|
|
9226
|
-
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
|
|
9227
|
+
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'."),
|
|
9227
9228
|
Specify_what_module_code_is_generated: diag(6657, ts.DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."),
|
|
9228
9229
|
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."),
|
|
9229
9230
|
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."),
|
|
9230
9231
|
Disable_emitting_files_from_a_compilation: diag(6660, ts.DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."),
|
|
9231
|
-
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
|
|
9232
|
+
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."),
|
|
9232
9233
|
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."),
|
|
9233
9234
|
Disable_truncating_types_in_error_messages: diag(6663, ts.DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."),
|
|
9234
9235
|
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."),
|
|
9235
|
-
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
|
|
9236
|
+
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."),
|
|
9236
9237
|
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."),
|
|
9237
9238
|
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."),
|
|
9238
|
-
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
|
|
9239
|
+
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'."),
|
|
9239
9240
|
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."),
|
|
9240
9241
|
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."),
|
|
9241
|
-
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"),
|
|
9242
|
-
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
|
|
9242
|
+
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."),
|
|
9243
|
+
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."),
|
|
9243
9244
|
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."),
|
|
9244
|
-
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
|
|
9245
|
-
|
|
9246
|
-
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"),
|
|
9247
|
-
Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use
|
|
9245
|
+
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."),
|
|
9246
|
+
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."),
|
|
9247
|
+
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."),
|
|
9248
|
+
Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."),
|
|
9248
9249
|
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."),
|
|
9249
|
-
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
|
|
9250
|
+
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."),
|
|
9250
9251
|
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."),
|
|
9251
9252
|
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."),
|
|
9252
|
-
Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, ts.DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing
|
|
9253
|
+
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."),
|
|
9253
9254
|
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."),
|
|
9254
|
-
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"),
|
|
9255
|
-
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"),
|
|
9256
|
-
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
|
|
9255
|
+
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."),
|
|
9256
|
+
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."),
|
|
9257
|
+
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."),
|
|
9257
9258
|
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."),
|
|
9258
9259
|
Disable_emitting_comments: diag(6688, ts.DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."),
|
|
9259
|
-
Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files"),
|
|
9260
|
+
Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."),
|
|
9260
9261
|
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."),
|
|
9261
9262
|
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."),
|
|
9262
9263
|
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."),
|
|
9263
9264
|
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."),
|
|
9264
9265
|
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."),
|
|
9265
9266
|
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."),
|
|
9266
|
-
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
|
|
9267
|
+
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."),
|
|
9267
9268
|
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."),
|
|
9268
|
-
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
|
|
9269
|
+
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'."),
|
|
9269
9270
|
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."),
|
|
9270
|
-
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
|
|
9271
|
+
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."),
|
|
9271
9272
|
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."),
|
|
9272
|
-
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
|
|
9273
|
+
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."),
|
|
9273
9274
|
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."),
|
|
9274
9275
|
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."),
|
|
9275
|
-
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
|
|
9276
|
+
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."),
|
|
9276
9277
|
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."),
|
|
9277
9278
|
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."),
|
|
9278
|
-
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
|
|
9279
|
+
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'."),
|
|
9279
9280
|
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."),
|
|
9280
9281
|
Emit_ECMAScript_standard_compliant_class_fields: diag(6712, ts.DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."),
|
|
9281
|
-
Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging"),
|
|
9282
|
+
Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."),
|
|
9282
9283
|
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."),
|
|
9283
9284
|
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."),
|
|
9284
|
-
Include_undefined_in_index_signature_results: diag(6716, ts.DiagnosticCategory.Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"),
|
|
9285
9285
|
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."),
|
|
9286
|
-
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"),
|
|
9287
|
-
|
|
9286
|
+
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."),
|
|
9287
|
+
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'."),
|
|
9288
9288
|
one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
|
|
9289
9289
|
one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
|
|
9290
9290
|
type_Colon: diag(6902, ts.DiagnosticCategory.Message, "type_Colon_6902", "type:"),
|
|
@@ -12835,7 +12835,7 @@ var ts;
|
|
|
12835
12835
|
return ts.emptyArray;
|
|
12836
12836
|
}
|
|
12837
12837
|
if (ts.isJSDocTypeAlias(node)) {
|
|
12838
|
-
ts.Debug.assert(node.parent.kind === 319 /*
|
|
12838
|
+
ts.Debug.assert(node.parent.kind === 319 /* JSDoc */);
|
|
12839
12839
|
return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
|
|
12840
12840
|
}
|
|
12841
12841
|
if (node.typeParameters) {
|
|
@@ -13782,7 +13782,7 @@ var ts;
|
|
|
13782
13782
|
ts.isJSDocNode = isJSDocNode;
|
|
13783
13783
|
/** True if node is of a kind that may contain comment text. */
|
|
13784
13784
|
function isJSDocCommentContainingNode(node) {
|
|
13785
|
-
return node.kind === 319 /*
|
|
13785
|
+
return node.kind === 319 /* JSDoc */
|
|
13786
13786
|
|| node.kind === 318 /* JSDocNamepathType */
|
|
13787
13787
|
|| node.kind === 320 /* JSDocText */
|
|
13788
13788
|
|| isJSDocLinkLike(node)
|
|
@@ -14832,7 +14832,7 @@ var ts;
|
|
|
14832
14832
|
return name.kind === 161 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
|
|
14833
14833
|
}
|
|
14834
14834
|
ts.isComputedNonLiteralName = isComputedNonLiteralName;
|
|
14835
|
-
function
|
|
14835
|
+
function tryGetTextOfPropertyName(name) {
|
|
14836
14836
|
switch (name.kind) {
|
|
14837
14837
|
case 79 /* Identifier */:
|
|
14838
14838
|
case 80 /* PrivateIdentifier */:
|
|
@@ -14844,11 +14844,15 @@ var ts;
|
|
|
14844
14844
|
case 161 /* ComputedPropertyName */:
|
|
14845
14845
|
if (isStringOrNumericLiteralLike(name.expression))
|
|
14846
14846
|
return ts.escapeLeadingUnderscores(name.expression.text);
|
|
14847
|
-
return
|
|
14847
|
+
return undefined;
|
|
14848
14848
|
default:
|
|
14849
14849
|
return ts.Debug.assertNever(name);
|
|
14850
14850
|
}
|
|
14851
14851
|
}
|
|
14852
|
+
ts.tryGetTextOfPropertyName = tryGetTextOfPropertyName;
|
|
14853
|
+
function getTextOfPropertyName(name) {
|
|
14854
|
+
return ts.Debug.checkDefined(tryGetTextOfPropertyName(name));
|
|
14855
|
+
}
|
|
14852
14856
|
ts.getTextOfPropertyName = getTextOfPropertyName;
|
|
14853
14857
|
function entityNameToString(name) {
|
|
14854
14858
|
switch (name.kind) {
|
|
@@ -15400,7 +15404,7 @@ var ts;
|
|
|
15400
15404
|
function getPropertyAssignment(objectLiteral, key, key2) {
|
|
15401
15405
|
return objectLiteral.properties.filter(function (property) {
|
|
15402
15406
|
if (property.kind === 295 /* PropertyAssignment */) {
|
|
15403
|
-
var propName =
|
|
15407
|
+
var propName = tryGetTextOfPropertyName(property.name);
|
|
15404
15408
|
return key === propName || (!!key2 && key2 === propName);
|
|
15405
15409
|
}
|
|
15406
15410
|
return false;
|
|
@@ -18240,7 +18244,7 @@ var ts;
|
|
|
18240
18244
|
ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
|
|
18241
18245
|
/** template tags are only available when a typedef isn't already using them */
|
|
18242
18246
|
function isNonTypeAliasTemplate(tag) {
|
|
18243
|
-
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /*
|
|
18247
|
+
return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 319 /* JSDoc */ && tag.parent.tags.some(isJSDocTypeAlias));
|
|
18244
18248
|
}
|
|
18245
18249
|
/**
|
|
18246
18250
|
* Gets the effective type annotation of the value parameter of a set accessor. If the node
|
|
@@ -25217,7 +25221,7 @@ var ts;
|
|
|
25217
25221
|
}
|
|
25218
25222
|
// @api
|
|
25219
25223
|
function createJSDocComment(comment, tags) {
|
|
25220
|
-
var node = createBaseNode(319 /*
|
|
25224
|
+
var node = createBaseNode(319 /* JSDoc */);
|
|
25221
25225
|
node.comment = comment;
|
|
25222
25226
|
node.tags = asNodeArray(tags);
|
|
25223
25227
|
return node;
|
|
@@ -28726,7 +28730,7 @@ var ts;
|
|
|
28726
28730
|
}
|
|
28727
28731
|
ts.isJSDocNamepathType = isJSDocNamepathType;
|
|
28728
28732
|
function isJSDoc(node) {
|
|
28729
|
-
return node.kind === 319 /*
|
|
28733
|
+
return node.kind === 319 /* JSDoc */;
|
|
28730
28734
|
}
|
|
28731
28735
|
ts.isJSDoc = isJSDoc;
|
|
28732
28736
|
function isJSDocTypeLiteral(node) {
|
|
@@ -30351,7 +30355,7 @@ var ts;
|
|
|
30351
30355
|
case 316 /* JSDocFunctionType */:
|
|
30352
30356
|
return visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
30353
30357
|
visitNode(cbNode, node.type);
|
|
30354
|
-
case 319 /*
|
|
30358
|
+
case 319 /* JSDoc */:
|
|
30355
30359
|
return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
|
|
30356
30360
|
|| visitNodes(cbNode, cbNodes, node.tags);
|
|
30357
30361
|
case 345 /* JSDocSeeTag */:
|
|
@@ -38585,7 +38589,7 @@ var ts;
|
|
|
38585
38589
|
shortName: "i",
|
|
38586
38590
|
type: "boolean",
|
|
38587
38591
|
category: ts.Diagnostics.Projects,
|
|
38588
|
-
description: ts.Diagnostics.
|
|
38592
|
+
description: ts.Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,
|
|
38589
38593
|
transpileOptionValue: undefined,
|
|
38590
38594
|
defaultValueDescription: ts.Diagnostics.false_unless_composite_is_set
|
|
38591
38595
|
},
|
|
@@ -38985,7 +38989,7 @@ var ts;
|
|
|
38985
38989
|
affectsSemanticDiagnostics: true,
|
|
38986
38990
|
strictFlag: true,
|
|
38987
38991
|
category: ts.Diagnostics.Type_Checking,
|
|
38988
|
-
description: ts.Diagnostics.
|
|
38992
|
+
description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
38989
38993
|
defaultValueDescription: false,
|
|
38990
38994
|
},
|
|
38991
38995
|
{
|
|
@@ -39003,7 +39007,7 @@ var ts;
|
|
|
39003
39007
|
type: "boolean",
|
|
39004
39008
|
affectsSemanticDiagnostics: true,
|
|
39005
39009
|
category: ts.Diagnostics.Type_Checking,
|
|
39006
|
-
description: ts.Diagnostics.
|
|
39010
|
+
description: ts.Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read,
|
|
39007
39011
|
defaultValueDescription: false,
|
|
39008
39012
|
},
|
|
39009
39013
|
{
|
|
@@ -39044,7 +39048,7 @@ var ts;
|
|
|
39044
39048
|
type: "boolean",
|
|
39045
39049
|
affectsSemanticDiagnostics: true,
|
|
39046
39050
|
category: ts.Diagnostics.Type_Checking,
|
|
39047
|
-
description: ts.Diagnostics.
|
|
39051
|
+
description: ts.Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index,
|
|
39048
39052
|
defaultValueDescription: false,
|
|
39049
39053
|
},
|
|
39050
39054
|
{
|
|
@@ -39520,7 +39524,7 @@ var ts;
|
|
|
39520
39524
|
name: "plugin",
|
|
39521
39525
|
type: "object"
|
|
39522
39526
|
},
|
|
39523
|
-
description: ts.Diagnostics.
|
|
39527
|
+
description: ts.Diagnostics.Specify_a_list_of_language_service_plugins_to_include,
|
|
39524
39528
|
category: ts.Diagnostics.Editor_Support,
|
|
39525
39529
|
},
|
|
39526
39530
|
];
|
|
@@ -47240,7 +47244,7 @@ var ts;
|
|
|
47240
47244
|
var noImplicitThis = ts.getStrictOptionValue(compilerOptions, "noImplicitThis");
|
|
47241
47245
|
var useUnknownInCatchVariables = ts.getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
|
|
47242
47246
|
var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
|
|
47243
|
-
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 :
|
|
47247
|
+
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 16384 /* FreshLiteral */;
|
|
47244
47248
|
var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
|
|
47245
47249
|
var checkBinaryExpression = createCheckBinaryExpression();
|
|
47246
47250
|
var emitResolver = createResolver();
|
|
@@ -47624,16 +47628,16 @@ var ts;
|
|
|
47624
47628
|
var wildcardType = createIntrinsicType(1 /* Any */, "any");
|
|
47625
47629
|
var errorType = createIntrinsicType(1 /* Any */, "error");
|
|
47626
47630
|
var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
|
|
47627
|
-
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any",
|
|
47631
|
+
var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 131072 /* ContainsWideningType */);
|
|
47628
47632
|
var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
|
|
47629
47633
|
var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
|
|
47630
47634
|
var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown");
|
|
47631
47635
|
var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
|
|
47632
|
-
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined",
|
|
47636
|
+
var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 131072 /* ContainsWideningType */);
|
|
47633
47637
|
var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined");
|
|
47634
47638
|
var missingType = exactOptionalPropertyTypes ? createIntrinsicType(32768 /* Undefined */, "undefined") : undefinedType;
|
|
47635
47639
|
var nullType = createIntrinsicType(65536 /* Null */, "null");
|
|
47636
|
-
var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null",
|
|
47640
|
+
var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 131072 /* ContainsWideningType */);
|
|
47637
47641
|
var stringType = createIntrinsicType(4 /* String */, "string");
|
|
47638
47642
|
var numberType = createIntrinsicType(8 /* Number */, "number");
|
|
47639
47643
|
var bigintType = createIntrinsicType(64 /* BigInt */, "bigint");
|
|
@@ -47654,7 +47658,7 @@ var ts;
|
|
|
47654
47658
|
var voidType = createIntrinsicType(16384 /* Void */, "void");
|
|
47655
47659
|
var neverType = createIntrinsicType(131072 /* Never */, "never");
|
|
47656
47660
|
var silentNeverType = createIntrinsicType(131072 /* Never */, "never");
|
|
47657
|
-
var nonInferrableType = createIntrinsicType(131072 /* Never */, "never",
|
|
47661
|
+
var nonInferrableType = createIntrinsicType(131072 /* Never */, "never", 524288 /* NonInferrableType */);
|
|
47658
47662
|
var implicitNeverType = createIntrinsicType(131072 /* Never */, "never");
|
|
47659
47663
|
var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never");
|
|
47660
47664
|
var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object");
|
|
@@ -47676,7 +47680,7 @@ var ts;
|
|
|
47676
47680
|
var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47677
47681
|
// The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated
|
|
47678
47682
|
// in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes.
|
|
47679
|
-
anyFunctionType.objectFlags |=
|
|
47683
|
+
anyFunctionType.objectFlags |= 524288 /* NonInferrableType */;
|
|
47680
47684
|
var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47681
47685
|
var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47682
47686
|
var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
@@ -48603,7 +48607,7 @@ var ts;
|
|
|
48603
48607
|
// - parameters are only in the scope of function body
|
|
48604
48608
|
// This restriction does not apply to JSDoc comment types because they are parented
|
|
48605
48609
|
// at a higher level than type parameters would normally be
|
|
48606
|
-
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /*
|
|
48610
|
+
if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 319 /* JSDoc */) {
|
|
48607
48611
|
useResult = result.flags & 262144 /* TypeParameter */
|
|
48608
48612
|
// type parameters are visible in parameter list, return type and type parameter list
|
|
48609
48613
|
? lastLocation === location.type ||
|
|
@@ -51222,7 +51226,7 @@ var ts;
|
|
|
51222
51226
|
return flags & 814775659 /* NodeBuilderFlagsMask */;
|
|
51223
51227
|
}
|
|
51224
51228
|
function isClassInstanceSide(type) {
|
|
51225
|
-
return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288 /* Object */) && !!(ts.getObjectFlags(type) &
|
|
51229
|
+
return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288 /* Object */) && !!(ts.getObjectFlags(type) & 33554432 /* IsClassInstanceClone */)));
|
|
51226
51230
|
}
|
|
51227
51231
|
function createNodeBuilder() {
|
|
51228
51232
|
return {
|
|
@@ -54623,7 +54627,7 @@ var ts;
|
|
|
54623
54627
|
members.set(prop.escapedName, getSpreadSymbol(prop, /*readonly*/ false));
|
|
54624
54628
|
}
|
|
54625
54629
|
var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfosOfType(source));
|
|
54626
|
-
result.objectFlags |=
|
|
54630
|
+
result.objectFlags |= 8388608 /* ObjectRestType */;
|
|
54627
54631
|
return result;
|
|
54628
54632
|
}
|
|
54629
54633
|
function isGenericTypeWithUndefinedConstraint(type) {
|
|
@@ -55095,7 +55099,7 @@ var ts;
|
|
|
55095
55099
|
mergeSymbolTable(exports, s.exports);
|
|
55096
55100
|
}
|
|
55097
55101
|
var type = createAnonymousType(symbol, exports, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
55098
|
-
type.objectFlags |=
|
|
55102
|
+
type.objectFlags |= 8192 /* JSLiteral */;
|
|
55099
55103
|
return type;
|
|
55100
55104
|
}
|
|
55101
55105
|
function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) {
|
|
@@ -55199,9 +55203,9 @@ var ts;
|
|
|
55199
55203
|
});
|
|
55200
55204
|
var result = createAnonymousType(initialSize !== members_4.size ? undefined : exportedType.symbol, // Only set the type's symbol if it looks to be the same as the original type
|
|
55201
55205
|
members_4, exportedType.callSignatures, exportedType.constructSignatures, exportedType.indexInfos);
|
|
55202
|
-
result.objectFlags |= (ts.getObjectFlags(type) &
|
|
55206
|
+
result.objectFlags |= (ts.getObjectFlags(type) & 8192 /* JSLiteral */); // Propagate JSLiteral flag
|
|
55203
55207
|
if (result.symbol && result.symbol.flags & 32 /* Class */ && type === getDeclaredTypeOfClassOrInterface(result.symbol)) {
|
|
55204
|
-
result.objectFlags |=
|
|
55208
|
+
result.objectFlags |= 33554432 /* IsClassInstanceClone */; // Propagate the knowledge that this type is equivalent to the symbol's class instance type
|
|
55205
55209
|
}
|
|
55206
55210
|
return result;
|
|
55207
55211
|
}
|
|
@@ -55260,7 +55264,7 @@ var ts;
|
|
|
55260
55264
|
function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
|
|
55261
55265
|
var members = ts.createSymbolTable();
|
|
55262
55266
|
var stringIndexInfo;
|
|
55263
|
-
var objectFlags = 128 /* ObjectLiteral */ |
|
|
55267
|
+
var objectFlags = 128 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
|
|
55264
55268
|
ts.forEach(pattern.elements, function (e) {
|
|
55265
55269
|
var name = e.propertyName || e.name;
|
|
55266
55270
|
if (e.dotDotDotToken) {
|
|
@@ -55284,7 +55288,7 @@ var ts;
|
|
|
55284
55288
|
result.objectFlags |= objectFlags;
|
|
55285
55289
|
if (includePatternInType) {
|
|
55286
55290
|
result.pattern = pattern;
|
|
55287
|
-
result.objectFlags |=
|
|
55291
|
+
result.objectFlags |= 262144 /* ContainsObjectOrArrayLiteral */;
|
|
55288
55292
|
}
|
|
55289
55293
|
return result;
|
|
55290
55294
|
}
|
|
@@ -55303,7 +55307,7 @@ var ts;
|
|
|
55303
55307
|
if (includePatternInType) {
|
|
55304
55308
|
result = cloneTypeReference(result);
|
|
55305
55309
|
result.pattern = pattern;
|
|
55306
|
-
result.objectFlags |=
|
|
55310
|
+
result.objectFlags |= 262144 /* ContainsObjectOrArrayLiteral */;
|
|
55307
55311
|
}
|
|
55308
55312
|
return result;
|
|
55309
55313
|
}
|
|
@@ -55895,7 +55899,7 @@ var ts;
|
|
|
55895
55899
|
node = paramSymbol.valueDeclaration;
|
|
55896
55900
|
}
|
|
55897
55901
|
break;
|
|
55898
|
-
case 319 /*
|
|
55902
|
+
case 319 /* JSDoc */: {
|
|
55899
55903
|
var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
|
|
55900
55904
|
return node.tags
|
|
55901
55905
|
? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
|
|
@@ -58097,7 +58101,7 @@ var ts;
|
|
|
58097
58101
|
checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0);
|
|
58098
58102
|
indexTypes = ts.append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type);
|
|
58099
58103
|
}
|
|
58100
|
-
else if (isObjectLiteralType(type) && !(ts.getObjectFlags(type) &
|
|
58104
|
+
else if (isObjectLiteralType(type) && !(ts.getObjectFlags(type) & 4194304 /* ContainsSpread */)) {
|
|
58101
58105
|
checkFlags |= 32 /* WritePartial */;
|
|
58102
58106
|
indexTypes = ts.append(indexTypes, undefinedType);
|
|
58103
58107
|
}
|
|
@@ -58221,15 +58225,15 @@ var ts;
|
|
|
58221
58225
|
* no constituent property has type 'never', but the intersection of the constituent property types is 'never'.
|
|
58222
58226
|
*/
|
|
58223
58227
|
function getReducedType(type) {
|
|
58224
|
-
if (type.flags & 1048576 /* Union */ && type.objectFlags &
|
|
58228
|
+
if (type.flags & 1048576 /* Union */ && type.objectFlags & 33554432 /* ContainsIntersections */) {
|
|
58225
58229
|
return type.resolvedReducedType || (type.resolvedReducedType = getReducedUnionType(type));
|
|
58226
58230
|
}
|
|
58227
58231
|
else if (type.flags & 2097152 /* Intersection */) {
|
|
58228
|
-
if (!(type.objectFlags &
|
|
58229
|
-
type.objectFlags |=
|
|
58230
|
-
(ts.some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ?
|
|
58232
|
+
if (!(type.objectFlags & 33554432 /* IsNeverIntersectionComputed */)) {
|
|
58233
|
+
type.objectFlags |= 33554432 /* IsNeverIntersectionComputed */ |
|
|
58234
|
+
(ts.some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 67108864 /* IsNeverIntersection */ : 0);
|
|
58231
58235
|
}
|
|
58232
|
-
return type.objectFlags &
|
|
58236
|
+
return type.objectFlags & 67108864 /* IsNeverIntersection */ ? neverType : type;
|
|
58233
58237
|
}
|
|
58234
58238
|
return type;
|
|
58235
58239
|
}
|
|
@@ -58259,7 +58263,7 @@ var ts;
|
|
|
58259
58263
|
return !prop.valueDeclaration && !!(ts.getCheckFlags(prop) & 1024 /* ContainsPrivate */);
|
|
58260
58264
|
}
|
|
58261
58265
|
function elaborateNeverIntersection(errorInfo, type) {
|
|
58262
|
-
if (type.flags & 2097152 /* Intersection */ && ts.getObjectFlags(type) &
|
|
58266
|
+
if (type.flags & 2097152 /* Intersection */ && ts.getObjectFlags(type) & 67108864 /* IsNeverIntersection */) {
|
|
58263
58267
|
var neverProp = ts.find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
|
|
58264
58268
|
if (neverProp) {
|
|
58265
58269
|
return ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString(type, /*enclosingDeclaration*/ undefined, 536870912 /* NoTypeReduction */), symbolToString(neverProp));
|
|
@@ -59066,7 +59070,7 @@ var ts;
|
|
|
59066
59070
|
result |= ts.getObjectFlags(type);
|
|
59067
59071
|
}
|
|
59068
59072
|
}
|
|
59069
|
-
return result &
|
|
59073
|
+
return result & 917504 /* PropagatingFlags */;
|
|
59070
59074
|
}
|
|
59071
59075
|
function createTypeReference(target, typeArguments) {
|
|
59072
59076
|
var id = getTypeListId(typeArguments);
|
|
@@ -59344,7 +59348,7 @@ var ts;
|
|
|
59344
59348
|
function getConditionalFlowTypeOfType(type, node) {
|
|
59345
59349
|
var constraints;
|
|
59346
59350
|
var covariant = true;
|
|
59347
|
-
while (node && !ts.isStatement(node) && node.kind !== 319 /*
|
|
59351
|
+
while (node && !ts.isStatement(node) && node.kind !== 319 /* JSDoc */) {
|
|
59348
59352
|
var parent = node.parent;
|
|
59349
59353
|
// only consider variance flipped by parameter locations - `keyof` types would usually be considered variance inverting, but
|
|
59350
59354
|
// often get used in indexed accesses where they behave sortof invariantly, but our checking is lax
|
|
@@ -59988,7 +59992,7 @@ var ts;
|
|
|
59988
59992
|
if (type === wildcardType)
|
|
59989
59993
|
includes |= 8388608 /* IncludesWildcard */;
|
|
59990
59994
|
if (!strictNullChecks && flags & 98304 /* Nullable */) {
|
|
59991
|
-
if (!(ts.getObjectFlags(type) &
|
|
59995
|
+
if (!(ts.getObjectFlags(type) & 131072 /* ContainsWideningType */))
|
|
59992
59996
|
includes |= 4194304 /* IncludesNonWideningType */;
|
|
59993
59997
|
}
|
|
59994
59998
|
else {
|
|
@@ -60011,6 +60015,10 @@ var ts;
|
|
|
60011
60015
|
return includes;
|
|
60012
60016
|
}
|
|
60013
60017
|
function removeSubtypes(types, hasObjectTypes) {
|
|
60018
|
+
// [] and [T] immediately reduce to [] and [T] respectively
|
|
60019
|
+
if (types.length < 2) {
|
|
60020
|
+
return types;
|
|
60021
|
+
}
|
|
60014
60022
|
var id = getTypeListId(types);
|
|
60015
60023
|
var match = subtypeReductionCache.get(id);
|
|
60016
60024
|
if (match) {
|
|
@@ -60198,8 +60206,8 @@ var ts;
|
|
|
60198
60206
|
origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
|
|
60199
60207
|
}
|
|
60200
60208
|
}
|
|
60201
|
-
var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 :
|
|
60202
|
-
(includes & 2097152 /* Intersection */ ?
|
|
60209
|
+
var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
|
|
60210
|
+
(includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
|
|
60203
60211
|
return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
|
|
60204
60212
|
}
|
|
60205
60213
|
function getUnionOrIntersectionTypePredicate(signatures, kind) {
|
|
@@ -60388,7 +60396,7 @@ var ts;
|
|
|
60388
60396
|
// other unions and return true. Otherwise, do nothing and return false.
|
|
60389
60397
|
function intersectUnionsOfPrimitiveTypes(types) {
|
|
60390
60398
|
var unionTypes;
|
|
60391
|
-
var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) &
|
|
60399
|
+
var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 65536 /* PrimitiveUnion */); });
|
|
60392
60400
|
if (index < 0) {
|
|
60393
60401
|
return false;
|
|
60394
60402
|
}
|
|
@@ -60397,7 +60405,7 @@ var ts;
|
|
|
60397
60405
|
// the unionTypes array.
|
|
60398
60406
|
while (i < types.length) {
|
|
60399
60407
|
var t = types[i];
|
|
60400
|
-
if (ts.getObjectFlags(t) &
|
|
60408
|
+
if (ts.getObjectFlags(t) & 65536 /* PrimitiveUnion */) {
|
|
60401
60409
|
(unionTypes || (unionTypes = [types[index]])).push(t);
|
|
60402
60410
|
ts.orderedRemoveItemAt(types, i);
|
|
60403
60411
|
}
|
|
@@ -60426,7 +60434,7 @@ var ts;
|
|
|
60426
60434
|
}
|
|
60427
60435
|
}
|
|
60428
60436
|
// Finally replace the first union with the result
|
|
60429
|
-
types[index] = getUnionTypeFromSortedList(result,
|
|
60437
|
+
types[index] = getUnionTypeFromSortedList(result, 65536 /* PrimitiveUnion */);
|
|
60430
60438
|
return true;
|
|
60431
60439
|
}
|
|
60432
60440
|
function createIntersectionType(types, aliasSymbol, aliasTypeArguments) {
|
|
@@ -60865,7 +60873,7 @@ var ts;
|
|
|
60865
60873
|
if (noImplicitAny) {
|
|
60866
60874
|
return false; // Flag is meaningless under `noImplicitAny` mode
|
|
60867
60875
|
}
|
|
60868
|
-
if (ts.getObjectFlags(type) &
|
|
60876
|
+
if (ts.getObjectFlags(type) & 8192 /* JSLiteral */) {
|
|
60869
60877
|
return true;
|
|
60870
60878
|
}
|
|
60871
60879
|
if (type.flags & 1048576 /* Union */) {
|
|
@@ -61079,28 +61087,28 @@ var ts;
|
|
|
61079
61087
|
return !!getGenericObjectFlags(type);
|
|
61080
61088
|
}
|
|
61081
61089
|
function isGenericObjectType(type) {
|
|
61082
|
-
return !!(getGenericObjectFlags(type) &
|
|
61090
|
+
return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericObjectType */);
|
|
61083
61091
|
}
|
|
61084
61092
|
function isGenericIndexType(type) {
|
|
61085
|
-
return !!(getGenericObjectFlags(type) &
|
|
61093
|
+
return !!(getGenericObjectFlags(type) & 16777216 /* IsGenericIndexType */);
|
|
61086
61094
|
}
|
|
61087
61095
|
function getGenericObjectFlags(type) {
|
|
61088
61096
|
if (type.flags & 3145728 /* UnionOrIntersection */) {
|
|
61089
|
-
if (!(type.objectFlags &
|
|
61090
|
-
type.objectFlags |=
|
|
61097
|
+
if (!(type.objectFlags & 4194304 /* IsGenericTypeComputed */)) {
|
|
61098
|
+
type.objectFlags |= 4194304 /* IsGenericTypeComputed */ |
|
|
61091
61099
|
ts.reduceLeft(type.types, function (flags, t) { return flags | getGenericObjectFlags(t); }, 0);
|
|
61092
61100
|
}
|
|
61093
|
-
return type.objectFlags &
|
|
61101
|
+
return type.objectFlags & 25165824 /* IsGenericType */;
|
|
61094
61102
|
}
|
|
61095
61103
|
if (type.flags & 33554432 /* Substitution */) {
|
|
61096
|
-
if (!(type.objectFlags &
|
|
61097
|
-
type.objectFlags |=
|
|
61104
|
+
if (!(type.objectFlags & 4194304 /* IsGenericTypeComputed */)) {
|
|
61105
|
+
type.objectFlags |= 4194304 /* IsGenericTypeComputed */ |
|
|
61098
61106
|
getGenericObjectFlags(type.substitute) | getGenericObjectFlags(type.baseType);
|
|
61099
61107
|
}
|
|
61100
|
-
return type.objectFlags &
|
|
61108
|
+
return type.objectFlags & 25165824 /* IsGenericType */;
|
|
61101
61109
|
}
|
|
61102
|
-
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ?
|
|
61103
|
-
(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ?
|
|
61110
|
+
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) |
|
|
61111
|
+
(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
|
|
61104
61112
|
}
|
|
61105
61113
|
function getSimplifiedType(type, writing) {
|
|
61106
61114
|
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
|
|
@@ -61668,7 +61676,7 @@ var ts;
|
|
|
61668
61676
|
}
|
|
61669
61677
|
}
|
|
61670
61678
|
var spread = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfosOfType(type));
|
|
61671
|
-
spread.objectFlags |= 128 /* ObjectLiteral */ |
|
|
61679
|
+
spread.objectFlags |= 128 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
|
|
61672
61680
|
return spread;
|
|
61673
61681
|
}
|
|
61674
61682
|
}
|
|
@@ -61758,7 +61766,7 @@ var ts;
|
|
|
61758
61766
|
}
|
|
61759
61767
|
}
|
|
61760
61768
|
var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, ts.sameMap(indexInfos, function (info) { return getIndexInfoWithReadonly(info, readonly); }));
|
|
61761
|
-
spread.objectFlags |= 128 /* ObjectLiteral */ |
|
|
61769
|
+
spread.objectFlags |= 128 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */ | 4194304 /* ContainsSpread */ | objectFlags;
|
|
61762
61770
|
return spread;
|
|
61763
61771
|
}
|
|
61764
61772
|
/** We approximate own properties as non-methods plus methods that are inside the object literal */
|
|
@@ -62172,7 +62180,7 @@ var ts;
|
|
|
62172
62180
|
}
|
|
62173
62181
|
function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
62174
62182
|
var declaration = type.objectFlags & 4 /* Reference */ ? type.node :
|
|
62175
|
-
type.objectFlags &
|
|
62183
|
+
type.objectFlags & 16777216 /* InstantiationExpressionType */ ? type.node :
|
|
62176
62184
|
type.symbol.declarations[0];
|
|
62177
62185
|
var links = getNodeLinks(declaration);
|
|
62178
62186
|
var target = type.objectFlags & 4 /* Reference */ ? links.resolvedType :
|
|
@@ -62189,8 +62197,8 @@ var ts;
|
|
|
62189
62197
|
outerTypeParameters = ts.addRange(outerTypeParameters, templateTagParameters);
|
|
62190
62198
|
}
|
|
62191
62199
|
typeParameters = outerTypeParameters || ts.emptyArray;
|
|
62192
|
-
var allDeclarations_1 = type.objectFlags & (4 /* Reference */ |
|
|
62193
|
-
typeParameters = (target.objectFlags & (4 /* Reference */ |
|
|
62200
|
+
var allDeclarations_1 = type.objectFlags & (4 /* Reference */ | 16777216 /* InstantiationExpressionType */) ? [declaration] : type.symbol.declarations;
|
|
62201
|
+
typeParameters = (target.objectFlags & (4 /* Reference */ | 16777216 /* InstantiationExpressionType */) || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ?
|
|
62194
62202
|
ts.filter(typeParameters, function (tp) { return ts.some(allDeclarations_1, function (d) { return isTypeParameterPossiblyReferenced(tp, d); }); }) :
|
|
62195
62203
|
typeParameters;
|
|
62196
62204
|
links.outerTypeParameters = typeParameters;
|
|
@@ -62225,16 +62233,15 @@ var ts;
|
|
|
62225
62233
|
node.parent.kind === 199 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier);
|
|
62226
62234
|
}
|
|
62227
62235
|
function isTypeParameterPossiblyReferenced(tp, node) {
|
|
62228
|
-
// If
|
|
62229
|
-
//
|
|
62230
|
-
// type parameter possibly referenced.
|
|
62231
|
-
if (tp.symbol && tp.symbol.declarations) {
|
|
62232
|
-
var
|
|
62233
|
-
|
|
62234
|
-
if (!
|
|
62236
|
+
// If the type parameter doesn't have exactly one declaration, if there are invening statement blocks
|
|
62237
|
+
// between the node and the type parameter declaration, if the node contains actual references to the
|
|
62238
|
+
// type parameter, or if the node contains type queries, we consider the type parameter possibly referenced.
|
|
62239
|
+
if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
|
|
62240
|
+
var container = tp.symbol.declarations[0].parent;
|
|
62241
|
+
for (var n = node; n !== container; n = n.parent) {
|
|
62242
|
+
if (!n || n.kind === 234 /* Block */ || n.kind === 188 /* ConditionalType */ && ts.forEachChild(n.extendsType, containsReference)) {
|
|
62235
62243
|
return true;
|
|
62236
62244
|
}
|
|
62237
|
-
n_1 = n_1.parent;
|
|
62238
62245
|
}
|
|
62239
62246
|
return containsReference(node);
|
|
62240
62247
|
}
|
|
@@ -62363,7 +62370,7 @@ var ts;
|
|
|
62363
62370
|
mapper = combineTypeMappers(makeUnaryTypeMapper(origTypeParameter, freshTypeParameter), mapper);
|
|
62364
62371
|
freshTypeParameter.mapper = mapper;
|
|
62365
62372
|
}
|
|
62366
|
-
if (type.objectFlags &
|
|
62373
|
+
if (type.objectFlags & 16777216 /* InstantiationExpressionType */) {
|
|
62367
62374
|
result.node = type.node;
|
|
62368
62375
|
}
|
|
62369
62376
|
result.target = type;
|
|
@@ -63395,7 +63402,7 @@ var ts;
|
|
|
63395
63402
|
}
|
|
63396
63403
|
if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) {
|
|
63397
63404
|
var related = relation.get(getRelationKey(source, target, 0 /* None */, relation, /*ignoreConstraints*/ false));
|
|
63398
|
-
if (related !== undefined
|
|
63405
|
+
if (related !== undefined) {
|
|
63399
63406
|
return !!(related & 1 /* Succeeded */);
|
|
63400
63407
|
}
|
|
63401
63408
|
}
|
|
@@ -63799,7 +63806,7 @@ var ts;
|
|
|
63799
63806
|
isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined))
|
|
63800
63807
|
return -1 /* True */;
|
|
63801
63808
|
if (source.flags & 469499904 /* StructuredOrInstantiable */ || target.flags & 469499904 /* StructuredOrInstantiable */) {
|
|
63802
|
-
var isPerformingExcessPropertyChecks = !(intersectionState & 2 /* Target */) && (isObjectLiteralType(source) && ts.getObjectFlags(source) &
|
|
63809
|
+
var isPerformingExcessPropertyChecks = !(intersectionState & 2 /* Target */) && (isObjectLiteralType(source) && ts.getObjectFlags(source) & 16384 /* FreshLiteral */);
|
|
63803
63810
|
if (isPerformingExcessPropertyChecks) {
|
|
63804
63811
|
if (hasExcessProperties(source, target, reportErrors)) {
|
|
63805
63812
|
if (reportErrors) {
|
|
@@ -63851,7 +63858,7 @@ var ts;
|
|
|
63851
63858
|
// We suppress recursive intersection property checks because they can generate lots of work when relating
|
|
63852
63859
|
// recursive intersections that are structurally similar but not exactly identical. See #37854.
|
|
63853
63860
|
if (result_7 && !inPropertyCheck && (target.flags & 2097152 /* Intersection */ && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) ||
|
|
63854
|
-
isNonGenericObjectType(target) && !isArrayType(target) && !isTupleType(target) && source.flags & 2097152 /* Intersection */ && getApparentType(source).flags & 3670016 /* StructuredType */ && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) &
|
|
63861
|
+
isNonGenericObjectType(target) && !isArrayType(target) && !isTupleType(target) && source.flags & 2097152 /* Intersection */ && getApparentType(source).flags & 3670016 /* StructuredType */ && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 524288 /* NonInferrableType */); }))) {
|
|
63855
63862
|
inPropertyCheck = true;
|
|
63856
63863
|
result_7 &= recursiveTypeRelatedTo(source, target, reportErrors, 4 /* PropertyCheck */, recursionFlags);
|
|
63857
63864
|
inPropertyCheck = false;
|
|
@@ -63914,7 +63921,7 @@ var ts;
|
|
|
63914
63921
|
if ((source.flags & 3145728 /* UnionOrIntersection */) && (target.flags & 3145728 /* UnionOrIntersection */)) {
|
|
63915
63922
|
var sourceUnionOrIntersection = source;
|
|
63916
63923
|
var targetUnionOrIntersection = target;
|
|
63917
|
-
if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags &
|
|
63924
|
+
if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 65536 /* PrimitiveUnion */) {
|
|
63918
63925
|
// There's a fast path for comparing primitive unions
|
|
63919
63926
|
return;
|
|
63920
63927
|
}
|
|
@@ -63944,7 +63951,7 @@ var ts;
|
|
|
63944
63951
|
}
|
|
63945
63952
|
function hasExcessProperties(source, target, reportErrors) {
|
|
63946
63953
|
var _a;
|
|
63947
|
-
if (!isExcessPropertyCheckTarget(target) || !noImplicitAny && ts.getObjectFlags(target) &
|
|
63954
|
+
if (!isExcessPropertyCheckTarget(target) || !noImplicitAny && ts.getObjectFlags(target) & 8192 /* JSLiteral */) {
|
|
63948
63955
|
return false; // Disable excess property checks on JS literals to simulate having an implicit "index signature" - but only outside of noImplicitAny
|
|
63949
63956
|
}
|
|
63950
63957
|
var isComparingJsxAttributes = !!(ts.getObjectFlags(source) & 2048 /* JsxAttributes */);
|
|
@@ -64446,17 +64453,17 @@ var ts;
|
|
|
64446
64453
|
// We limit alias variance probing to only object and conditional types since their alias behavior
|
|
64447
64454
|
// is more predictable than other, interned types, which may or may not have an alias depending on
|
|
64448
64455
|
// the order in which things were checked.
|
|
64449
|
-
if (sourceFlags & (524288 /* Object */ | 16777216 /* Conditional */) && source.aliasSymbol &&
|
|
64456
|
+
if (sourceFlags & (524288 /* Object */ | 16777216 /* Conditional */) && source.aliasSymbol &&
|
|
64457
|
+
source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol &&
|
|
64458
|
+
!(source.aliasTypeArgumentsContainsMarker || target.aliasTypeArgumentsContainsMarker)) {
|
|
64450
64459
|
var variances = getAliasVariances(source.aliasSymbol);
|
|
64451
|
-
if (variances
|
|
64452
|
-
var varianceResult = relateVariances(source.aliasTypeArguments, target.aliasTypeArguments, variances, intersectionState);
|
|
64453
|
-
if (varianceResult !== undefined) {
|
|
64454
|
-
return varianceResult;
|
|
64455
|
-
}
|
|
64456
|
-
}
|
|
64457
|
-
else if (!someContainsMarkerType(source.aliasTypeArguments) && !someContainsMarkerType(target.aliasTypeArguments)) {
|
|
64460
|
+
if (variances === ts.emptyArray) {
|
|
64458
64461
|
return 1 /* Unknown */;
|
|
64459
64462
|
}
|
|
64463
|
+
var varianceResult = relateVariances(source.aliasTypeArguments, target.aliasTypeArguments, variances, intersectionState);
|
|
64464
|
+
if (varianceResult !== undefined) {
|
|
64465
|
+
return varianceResult;
|
|
64466
|
+
}
|
|
64460
64467
|
}
|
|
64461
64468
|
// For a generic type T and a type U that is assignable to T, [...U] is assignable to T, U is assignable to readonly [...T],
|
|
64462
64469
|
// and U is assignable to [...T] when U is constrained to a mutable array or tuple type.
|
|
@@ -64814,26 +64821,27 @@ var ts;
|
|
|
64814
64821
|
else if (isGenericMappedType(source)) {
|
|
64815
64822
|
return 0 /* False */;
|
|
64816
64823
|
}
|
|
64817
|
-
if (ts.getObjectFlags(source) & 4 /* Reference */ && ts.getObjectFlags(target) & 4 /* Reference */ && source.target === target.target &&
|
|
64824
|
+
if (ts.getObjectFlags(source) & 4 /* Reference */ && ts.getObjectFlags(target) & 4 /* Reference */ && source.target === target.target &&
|
|
64825
|
+
!isTupleType(source) && !(ts.getObjectFlags(source) & 4096 /* MarkerType */ || ts.getObjectFlags(target) & 4096 /* MarkerType */)) {
|
|
64818
64826
|
// When strictNullChecks is disabled, the element type of the empty array literal is undefinedWideningType,
|
|
64819
64827
|
// and an empty array literal wouldn't be assignable to a `never[]` without this check.
|
|
64820
64828
|
if (isEmptyArrayLiteralType(source)) {
|
|
64821
64829
|
return -1 /* True */;
|
|
64822
64830
|
}
|
|
64823
|
-
// We have type references to the same generic type
|
|
64824
|
-
//
|
|
64825
|
-
//
|
|
64826
|
-
// type arguments, but otherwise return Ternary.Unknown (the non-cached version of Ternary.Maybe).
|
|
64831
|
+
// We have type references to the same generic type, and the type references are not marker
|
|
64832
|
+
// type references (which are intended by be compared structurally). Obtain the variance
|
|
64833
|
+
// information for the type parameters and relate the type arguments accordingly.
|
|
64827
64834
|
var variances = getVariances(source.target);
|
|
64828
|
-
|
|
64829
|
-
|
|
64830
|
-
|
|
64831
|
-
|
|
64832
|
-
}
|
|
64833
|
-
}
|
|
64834
|
-
else if (!someContainsMarkerType(getTypeArguments(source)) && !someContainsMarkerType(getTypeArguments(target))) {
|
|
64835
|
+
// We return Ternary.Maybe for a recursive invocation of getVariances (signalled by emptyArray). This
|
|
64836
|
+
// effectively means we measure variance only from type parameter occurrences that aren't nested in
|
|
64837
|
+
// recursive instantiations of the generic type.
|
|
64838
|
+
if (variances === ts.emptyArray) {
|
|
64835
64839
|
return 1 /* Unknown */;
|
|
64836
64840
|
}
|
|
64841
|
+
var varianceResult = relateVariances(getTypeArguments(source), getTypeArguments(target), variances, intersectionState);
|
|
64842
|
+
if (varianceResult !== undefined) {
|
|
64843
|
+
return varianceResult;
|
|
64844
|
+
}
|
|
64837
64845
|
}
|
|
64838
64846
|
else if (isReadonlyArrayType(target) ? isArrayType(source) || isTupleType(source) : isArrayType(target) && isTupleType(source) && !source.target.readonly) {
|
|
64839
64847
|
if (relation !== identityRelation) {
|
|
@@ -64847,7 +64855,7 @@ var ts;
|
|
|
64847
64855
|
}
|
|
64848
64856
|
// Consider a fresh empty object literal type "closed" under the subtype relationship - this way `{} <- {[idx: string]: any} <- fresh({})`
|
|
64849
64857
|
// and not `{} <- fresh({}) <- {[idx: string]: any}`
|
|
64850
|
-
else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target) && ts.getObjectFlags(target) &
|
|
64858
|
+
else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target) && ts.getObjectFlags(target) & 16384 /* FreshLiteral */ && !isEmptyObjectType(source)) {
|
|
64851
64859
|
return 0 /* False */;
|
|
64852
64860
|
}
|
|
64853
64861
|
// Even if relationship doesn't hold for unions, intersections, or generic type references,
|
|
@@ -65732,27 +65740,35 @@ var ts;
|
|
|
65732
65740
|
}
|
|
65733
65741
|
return false;
|
|
65734
65742
|
}
|
|
65735
|
-
|
|
65736
|
-
|
|
65737
|
-
|
|
65738
|
-
|
|
65739
|
-
|
|
65743
|
+
// Return a type reference where the source type parameter is replaced with the target marker
|
|
65744
|
+
// type, and flag the result as a marker type reference.
|
|
65745
|
+
function getMarkerTypeReference(type, source, target) {
|
|
65746
|
+
var result = createTypeReference(type, ts.map(type.typeParameters, function (t) { return t === source ? target : t; }));
|
|
65747
|
+
result.objectFlags |= 4096 /* MarkerType */;
|
|
65748
|
+
return result;
|
|
65740
65749
|
}
|
|
65741
65750
|
function getAliasVariances(symbol) {
|
|
65742
|
-
|
|
65751
|
+
var links = getSymbolLinks(symbol);
|
|
65752
|
+
return getVariancesWorker(links.typeParameters, links, function (_links, param, marker) {
|
|
65753
|
+
var type = getTypeAliasInstantiation(symbol, instantiateTypes(links.typeParameters, makeUnaryTypeMapper(param, marker)));
|
|
65754
|
+
type.aliasTypeArgumentsContainsMarker = true;
|
|
65755
|
+
return type;
|
|
65756
|
+
});
|
|
65743
65757
|
}
|
|
65744
65758
|
// Return an array containing the variance of each type parameter. The variance is effectively
|
|
65745
65759
|
// a digest of the type comparisons that occur for each type argument when instantiations of the
|
|
65746
65760
|
// generic type are structurally compared. We infer the variance information by comparing
|
|
65747
65761
|
// instantiations of the generic type for type arguments with known relations. The function
|
|
65748
65762
|
// returns the emptyArray singleton when invoked recursively for the given generic type.
|
|
65749
|
-
function getVariancesWorker(
|
|
65763
|
+
function getVariancesWorker(typeParameters, cache, createMarkerType) {
|
|
65764
|
+
var _a, _b, _c;
|
|
65750
65765
|
if (typeParameters === void 0) { typeParameters = ts.emptyArray; }
|
|
65751
|
-
var
|
|
65752
|
-
if (!
|
|
65753
|
-
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes" /* CheckTypes */, "getVariancesWorker", { arity: typeParameters.length, id:
|
|
65754
|
-
|
|
65755
|
-
|
|
65766
|
+
var variances = cache.variances;
|
|
65767
|
+
if (!variances) {
|
|
65768
|
+
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes" /* CheckTypes */, "getVariancesWorker", { arity: typeParameters.length, id: (_c = (_a = cache.id) !== null && _a !== void 0 ? _a : (_b = cache.declaredType) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : -1 });
|
|
65769
|
+
// The emptyArray singleton is used to signal a recursive invocation.
|
|
65770
|
+
cache.variances = ts.emptyArray;
|
|
65771
|
+
variances = [];
|
|
65756
65772
|
var _loop_21 = function (tp) {
|
|
65757
65773
|
var unmeasurable = false;
|
|
65758
65774
|
var unreliable = false;
|
|
@@ -65761,15 +65777,15 @@ var ts;
|
|
|
65761
65777
|
// We first compare instantiations where the type parameter is replaced with
|
|
65762
65778
|
// marker types that have a known subtype relationship. From this we can infer
|
|
65763
65779
|
// invariance, covariance, contravariance or bivariance.
|
|
65764
|
-
var typeWithSuper = createMarkerType(
|
|
65765
|
-
var typeWithSub = createMarkerType(
|
|
65780
|
+
var typeWithSuper = createMarkerType(cache, tp, markerSuperType);
|
|
65781
|
+
var typeWithSub = createMarkerType(cache, tp, markerSubType);
|
|
65766
65782
|
var variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? 1 /* Covariant */ : 0) |
|
|
65767
65783
|
(isTypeAssignableTo(typeWithSuper, typeWithSub) ? 2 /* Contravariant */ : 0);
|
|
65768
65784
|
// If the instantiations appear to be related bivariantly it may be because the
|
|
65769
65785
|
// type parameter is independent (i.e. it isn't witnessed anywhere in the generic
|
|
65770
65786
|
// type). To determine this we compare instantiations where the type parameter is
|
|
65771
65787
|
// replaced with marker types that are known to be unrelated.
|
|
65772
|
-
if (variance === 3 /* Bivariant */ && isTypeAssignableTo(createMarkerType(
|
|
65788
|
+
if (variance === 3 /* Bivariant */ && isTypeAssignableTo(createMarkerType(cache, tp, markerOtherType), typeWithSuper)) {
|
|
65773
65789
|
variance = 4 /* Independent */;
|
|
65774
65790
|
}
|
|
65775
65791
|
outofbandVarianceMarkerHandler = oldHandler;
|
|
@@ -65787,57 +65803,17 @@ var ts;
|
|
|
65787
65803
|
var tp = typeParameters_1[_i];
|
|
65788
65804
|
_loop_21(tp);
|
|
65789
65805
|
}
|
|
65790
|
-
|
|
65806
|
+
cache.variances = variances;
|
|
65791
65807
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
65792
65808
|
}
|
|
65793
|
-
return
|
|
65809
|
+
return variances;
|
|
65794
65810
|
}
|
|
65795
|
-
function
|
|
65796
|
-
|
|
65797
|
-
if (
|
|
65798
|
-
return
|
|
65799
|
-
}
|
|
65800
|
-
var type = getDeclaredTypeOfSymbol(symbol);
|
|
65801
|
-
return createTypeReference(type, instantiateTypes(type.typeParameters, mapper));
|
|
65802
|
-
}
|
|
65803
|
-
// Check if any of the given types contain marker types. We visit type arguments of generic classes, interfaces, and
|
|
65804
|
-
// type aliases, members of anonymous type literals and mapped types, constituents of union, intersection, and
|
|
65805
|
-
// template literal types, and targets of index types and string mapping types. This is by design a limited set of
|
|
65806
|
-
// types to avoid excessive fan out. In deferred (and thus possibly circular) locations we limit the traversal to
|
|
65807
|
-
// four levels of depth.
|
|
65808
|
-
function someContainsMarkerType(types, maxDepth) {
|
|
65809
|
-
if (maxDepth === void 0) { maxDepth = 4; }
|
|
65810
|
-
return ts.some(types, function (t) { return containsMarkerType(t, maxDepth); });
|
|
65811
|
-
}
|
|
65812
|
-
function containsMarkerType(type, maxDepth) {
|
|
65813
|
-
return maxDepth > 0 && (type.flags & 262144 /* TypeParameter */ ? type === markerSubType || type === markerSubType || type === markerOtherType :
|
|
65814
|
-
type.aliasSymbol ? someContainsMarkerType(type.aliasTypeArguments, maxDepth) :
|
|
65815
|
-
type.flags & 524288 /* Object */ ? objectTypeContainsMarkerType(type, maxDepth) :
|
|
65816
|
-
type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) ? someContainsMarkerType(type.types, maxDepth) :
|
|
65817
|
-
type.flags & (4194304 /* Index */ | 268435456 /* StringMapping */) ? containsMarkerType(type.type, maxDepth) :
|
|
65818
|
-
false);
|
|
65819
|
-
}
|
|
65820
|
-
function objectTypeContainsMarkerType(type, maxDepth) {
|
|
65821
|
-
var objectFlags = ts.getObjectFlags(type);
|
|
65822
|
-
if (objectFlags & 4 /* Reference */) {
|
|
65823
|
-
return someContainsMarkerType(getTypeArguments(type), maxDepth - (type.node ? 1 : 0));
|
|
65824
|
-
}
|
|
65825
|
-
if (objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) {
|
|
65826
|
-
var resolved = resolveStructuredTypeMembers(type);
|
|
65827
|
-
return ts.some(resolved.properties, function (prop) { return containsMarkerType(getTypeOfSymbol(prop), maxDepth - 1); }) ||
|
|
65828
|
-
ts.some(resolved.callSignatures, function (sig) { return signatureContainsMarkerType(sig, maxDepth); }) ||
|
|
65829
|
-
ts.some(resolved.constructSignatures, function (sig) { return signatureContainsMarkerType(sig, maxDepth); }) ||
|
|
65830
|
-
ts.some(resolved.indexInfos, function (info) { return containsMarkerType(info.type, maxDepth - 1); });
|
|
65831
|
-
}
|
|
65832
|
-
if (objectFlags & 32 /* Mapped */) {
|
|
65833
|
-
return containsMarkerType(getConstraintTypeFromMappedType(type), maxDepth - 1) ||
|
|
65834
|
-
containsMarkerType(getTemplateTypeFromMappedType(type), maxDepth - 1);
|
|
65811
|
+
function getVariances(type) {
|
|
65812
|
+
// Arrays and tuples are known to be covariant, no need to spend time computing this.
|
|
65813
|
+
if (type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */) {
|
|
65814
|
+
return arrayVariances;
|
|
65835
65815
|
}
|
|
65836
|
-
return
|
|
65837
|
-
}
|
|
65838
|
-
function signatureContainsMarkerType(sig, maxDepth) {
|
|
65839
|
-
return ts.some(sig.parameters, function (param) { return containsMarkerType(getTypeOfSymbol(param), maxDepth - 1); }) ||
|
|
65840
|
-
containsMarkerType(getReturnTypeOfSignature(sig), maxDepth - 1);
|
|
65816
|
+
return getVariancesWorker(type.typeParameters, type, getMarkerTypeReference);
|
|
65841
65817
|
}
|
|
65842
65818
|
// Return true if the given type reference has a 'void' type argument for a covariant type parameter.
|
|
65843
65819
|
// See comment at call in recursiveTypeRelatedTo for when this case matters.
|
|
@@ -66208,10 +66184,10 @@ var ts;
|
|
|
66208
66184
|
if (!(ts.getObjectFlags(type) & 4 /* Reference */) || !(ts.getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {
|
|
66209
66185
|
return undefined;
|
|
66210
66186
|
}
|
|
66211
|
-
if (ts.getObjectFlags(type) &
|
|
66212
|
-
return ts.getObjectFlags(type) &
|
|
66187
|
+
if (ts.getObjectFlags(type) & 67108864 /* IdenticalBaseTypeCalculated */) {
|
|
66188
|
+
return ts.getObjectFlags(type) & 134217728 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : undefined;
|
|
66213
66189
|
}
|
|
66214
|
-
type.objectFlags |=
|
|
66190
|
+
type.objectFlags |= 67108864 /* IdenticalBaseTypeCalculated */;
|
|
66215
66191
|
var target = type.target;
|
|
66216
66192
|
if (ts.getObjectFlags(target) & 1 /* Class */) {
|
|
66217
66193
|
var baseTypeNode = getBaseTypeNodeOfClass(target);
|
|
@@ -66232,7 +66208,7 @@ var ts;
|
|
|
66232
66208
|
if (ts.length(getTypeArguments(type)) > ts.length(target.typeParameters)) {
|
|
66233
66209
|
instantiatedBase = getTypeWithThisArgument(instantiatedBase, ts.last(getTypeArguments(type)));
|
|
66234
66210
|
}
|
|
66235
|
-
type.objectFlags |=
|
|
66211
|
+
type.objectFlags |= 134217728 /* IdenticalBaseTypeExists */;
|
|
66236
66212
|
return type.cachedEquivalentBaseType = instantiatedBase;
|
|
66237
66213
|
}
|
|
66238
66214
|
function isEmptyLiteralType(type) {
|
|
@@ -66527,7 +66503,7 @@ var ts;
|
|
|
66527
66503
|
* Leave signatures alone since they are not subject to the check.
|
|
66528
66504
|
*/
|
|
66529
66505
|
function getRegularTypeOfObjectLiteral(type) {
|
|
66530
|
-
if (!(isObjectLiteralType(type) && ts.getObjectFlags(type) &
|
|
66506
|
+
if (!(isObjectLiteralType(type) && ts.getObjectFlags(type) & 16384 /* FreshLiteral */)) {
|
|
66531
66507
|
return type;
|
|
66532
66508
|
}
|
|
66533
66509
|
var regularType = type.regularType;
|
|
@@ -66538,7 +66514,7 @@ var ts;
|
|
|
66538
66514
|
var members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral);
|
|
66539
66515
|
var regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.indexInfos);
|
|
66540
66516
|
regularNew.flags = resolved.flags;
|
|
66541
|
-
regularNew.objectFlags |= resolved.objectFlags & ~
|
|
66517
|
+
regularNew.objectFlags |= resolved.objectFlags & ~16384 /* FreshLiteral */;
|
|
66542
66518
|
type.regularType = regularNew;
|
|
66543
66519
|
return regularNew;
|
|
66544
66520
|
}
|
|
@@ -66568,7 +66544,7 @@ var ts;
|
|
|
66568
66544
|
var names = new ts.Map();
|
|
66569
66545
|
for (var _i = 0, _a = getSiblingsOfContext(context); _i < _a.length; _i++) {
|
|
66570
66546
|
var t = _a[_i];
|
|
66571
|
-
if (isObjectLiteralType(t) && !(ts.getObjectFlags(t) &
|
|
66547
|
+
if (isObjectLiteralType(t) && !(ts.getObjectFlags(t) & 4194304 /* ContainsSpread */)) {
|
|
66572
66548
|
for (var _b = 0, _c = getPropertiesOfType(t); _b < _c.length; _b++) {
|
|
66573
66549
|
var prop = _c[_b];
|
|
66574
66550
|
names.set(prop.escapedName, prop);
|
|
@@ -66615,14 +66591,14 @@ var ts;
|
|
|
66615
66591
|
}
|
|
66616
66592
|
}
|
|
66617
66593
|
var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, ts.sameMap(getIndexInfosOfType(type), function (info) { return createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly); }));
|
|
66618
|
-
result.objectFlags |= (ts.getObjectFlags(type) & (
|
|
66594
|
+
result.objectFlags |= (ts.getObjectFlags(type) & (8192 /* JSLiteral */ | 524288 /* NonInferrableType */)); // Retain js literal flag through widening
|
|
66619
66595
|
return result;
|
|
66620
66596
|
}
|
|
66621
66597
|
function getWidenedType(type) {
|
|
66622
66598
|
return getWidenedTypeWithContext(type, /*context*/ undefined);
|
|
66623
66599
|
}
|
|
66624
66600
|
function getWidenedTypeWithContext(type, context) {
|
|
66625
|
-
if (ts.getObjectFlags(type) &
|
|
66601
|
+
if (ts.getObjectFlags(type) & 393216 /* RequiresWidening */) {
|
|
66626
66602
|
if (context === undefined && type.widened) {
|
|
66627
66603
|
return type.widened;
|
|
66628
66604
|
}
|
|
@@ -66667,7 +66643,7 @@ var ts;
|
|
|
66667
66643
|
*/
|
|
66668
66644
|
function reportWideningErrorsInType(type) {
|
|
66669
66645
|
var errorReported = false;
|
|
66670
|
-
if (ts.getObjectFlags(type) &
|
|
66646
|
+
if (ts.getObjectFlags(type) & 131072 /* ContainsWideningType */) {
|
|
66671
66647
|
if (type.flags & 1048576 /* Union */) {
|
|
66672
66648
|
if (ts.some(type.types, isEmptyObjectType)) {
|
|
66673
66649
|
errorReported = true;
|
|
@@ -66693,7 +66669,7 @@ var ts;
|
|
|
66693
66669
|
for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) {
|
|
66694
66670
|
var p = _e[_d];
|
|
66695
66671
|
var t = getTypeOfSymbol(p);
|
|
66696
|
-
if (ts.getObjectFlags(t) &
|
|
66672
|
+
if (ts.getObjectFlags(t) & 131072 /* ContainsWideningType */) {
|
|
66697
66673
|
if (!reportWideningErrorsInType(t)) {
|
|
66698
66674
|
error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t)));
|
|
66699
66675
|
}
|
|
@@ -66774,7 +66750,7 @@ var ts;
|
|
|
66774
66750
|
errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
|
|
66775
66751
|
}
|
|
66776
66752
|
function reportErrorsFromWidening(declaration, type, wideningKind) {
|
|
66777
|
-
if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) &
|
|
66753
|
+
if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 131072 /* ContainsWideningType */ && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) {
|
|
66778
66754
|
// Report implicit any error within type if possible, otherwise report error on declaration
|
|
66779
66755
|
if (!reportWideningErrorsInType(type)) {
|
|
66780
66756
|
reportImplicitAny(declaration, type, wideningKind);
|
|
@@ -66890,16 +66866,16 @@ var ts;
|
|
|
66890
66866
|
// results for union and intersection types for performance reasons.
|
|
66891
66867
|
function couldContainTypeVariables(type) {
|
|
66892
66868
|
var objectFlags = ts.getObjectFlags(type);
|
|
66893
|
-
if (objectFlags &
|
|
66894
|
-
return !!(objectFlags &
|
|
66869
|
+
if (objectFlags & 1048576 /* CouldContainTypeVariablesComputed */) {
|
|
66870
|
+
return !!(objectFlags & 2097152 /* CouldContainTypeVariables */);
|
|
66895
66871
|
}
|
|
66896
66872
|
var result = !!(type.flags & 465829888 /* Instantiable */ ||
|
|
66897
66873
|
type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) ||
|
|
66898
66874
|
objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations ||
|
|
66899
|
-
objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ |
|
|
66875
|
+
objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 8388608 /* ObjectRestType */ | 16777216 /* InstantiationExpressionType */)) ||
|
|
66900
66876
|
type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && ts.some(type.types, couldContainTypeVariables));
|
|
66901
66877
|
if (type.flags & 3899393 /* ObjectFlagsType */) {
|
|
66902
|
-
type.objectFlags |=
|
|
66878
|
+
type.objectFlags |= 1048576 /* CouldContainTypeVariablesComputed */ | (result ? 2097152 /* CouldContainTypeVariables */ : 0);
|
|
66903
66879
|
}
|
|
66904
66880
|
return result;
|
|
66905
66881
|
}
|
|
@@ -66959,7 +66935,7 @@ var ts;
|
|
|
66959
66935
|
// literal { a: 123, b: x => true } is marked non-inferable because it contains a context sensitive
|
|
66960
66936
|
// arrow function, but is considered partially inferable because property 'a' has an inferable type.
|
|
66961
66937
|
function isPartiallyInferableType(type) {
|
|
66962
|
-
return !(ts.getObjectFlags(type) &
|
|
66938
|
+
return !(ts.getObjectFlags(type) & 524288 /* NonInferrableType */) ||
|
|
66963
66939
|
isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }) ||
|
|
66964
66940
|
isTupleType(type) && ts.some(getTypeArguments(type), isPartiallyInferableType);
|
|
66965
66941
|
}
|
|
@@ -67299,7 +67275,7 @@ var ts;
|
|
|
67299
67275
|
}
|
|
67300
67276
|
var inference = getInferenceInfoForType(target);
|
|
67301
67277
|
if (inference) {
|
|
67302
|
-
if (ts.getObjectFlags(source) &
|
|
67278
|
+
if (ts.getObjectFlags(source) & 524288 /* NonInferrableType */) {
|
|
67303
67279
|
return;
|
|
67304
67280
|
}
|
|
67305
67281
|
if (!inference.isFixed) {
|
|
@@ -67624,7 +67600,7 @@ var ts;
|
|
|
67624
67600
|
// We assign a lower priority to inferences made from types containing non-inferrable
|
|
67625
67601
|
// types because we may only have a partial result (i.e. we may have failed to make
|
|
67626
67602
|
// reverse inferences for some properties).
|
|
67627
|
-
inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) &
|
|
67603
|
+
inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 524288 /* NonInferrableType */ ?
|
|
67628
67604
|
16 /* PartialHomomorphicMappedType */ :
|
|
67629
67605
|
8 /* HomomorphicMappedType */);
|
|
67630
67606
|
}
|
|
@@ -67792,7 +67768,7 @@ var ts;
|
|
|
67792
67768
|
var sourceLen = sourceSignatures.length;
|
|
67793
67769
|
var targetLen = targetSignatures.length;
|
|
67794
67770
|
var len = sourceLen < targetLen ? sourceLen : targetLen;
|
|
67795
|
-
var skipParameters = !!(ts.getObjectFlags(source) &
|
|
67771
|
+
var skipParameters = !!(ts.getObjectFlags(source) & 524288 /* NonInferrableType */);
|
|
67796
67772
|
for (var i = 0; i < len; i++) {
|
|
67797
67773
|
inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]), skipParameters);
|
|
67798
67774
|
}
|
|
@@ -67859,7 +67835,7 @@ var ts;
|
|
|
67859
67835
|
return !!(ts.getObjectFlags(type) & 128 /* ObjectLiteral */);
|
|
67860
67836
|
}
|
|
67861
67837
|
function isObjectOrArrayLiteralType(type) {
|
|
67862
|
-
return !!(ts.getObjectFlags(type) & (128 /* ObjectLiteral */ |
|
|
67838
|
+
return !!(ts.getObjectFlags(type) & (128 /* ObjectLiteral */ | 32768 /* ArrayLiteral */));
|
|
67863
67839
|
}
|
|
67864
67840
|
function unionObjectAndArrayLiteralCandidates(candidates) {
|
|
67865
67841
|
if (candidates.length > 1) {
|
|
@@ -68233,7 +68209,7 @@ var ts;
|
|
|
68233
68209
|
function getKeyPropertyName(unionType) {
|
|
68234
68210
|
var types = unionType.types;
|
|
68235
68211
|
// We only construct maps for unions with many non-primitive constituents.
|
|
68236
|
-
if (types.length < 10 || ts.getObjectFlags(unionType) &
|
|
68212
|
+
if (types.length < 10 || ts.getObjectFlags(unionType) & 65536 /* PrimitiveUnion */ ||
|
|
68237
68213
|
ts.countWhere(types, function (t) { return !!(t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */)); }) < 10) {
|
|
68238
68214
|
return undefined;
|
|
68239
68215
|
}
|
|
@@ -72169,7 +72145,7 @@ var ts;
|
|
|
72169
72145
|
var literalType = type.literalType;
|
|
72170
72146
|
if (!literalType) {
|
|
72171
72147
|
literalType = type.literalType = cloneTypeReference(type);
|
|
72172
|
-
literalType.objectFlags |=
|
|
72148
|
+
literalType.objectFlags |= 32768 /* ArrayLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
|
|
72173
72149
|
}
|
|
72174
72150
|
return literalType;
|
|
72175
72151
|
}
|
|
@@ -72314,7 +72290,7 @@ var ts;
|
|
|
72314
72290
|
checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl);
|
|
72315
72291
|
}
|
|
72316
72292
|
}
|
|
72317
|
-
objectFlags |= ts.getObjectFlags(type) &
|
|
72293
|
+
objectFlags |= ts.getObjectFlags(type) & 917504 /* PropagatingFlags */;
|
|
72318
72294
|
var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined;
|
|
72319
72295
|
var prop = nameType ?
|
|
72320
72296
|
createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) :
|
|
@@ -72452,9 +72428,9 @@ var ts;
|
|
|
72452
72428
|
if (hasComputedSymbolProperty)
|
|
72453
72429
|
indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, esSymbolType));
|
|
72454
72430
|
var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, indexInfos);
|
|
72455
|
-
result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ |
|
|
72431
|
+
result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
|
|
72456
72432
|
if (isJSObjectLiteral) {
|
|
72457
|
-
result.objectFlags |=
|
|
72433
|
+
result.objectFlags |= 8192 /* JSLiteral */;
|
|
72458
72434
|
}
|
|
72459
72435
|
if (patternWithComputedProperties) {
|
|
72460
72436
|
result.objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;
|
|
@@ -72545,7 +72521,7 @@ var ts;
|
|
|
72545
72521
|
var member = attributeDecl.symbol;
|
|
72546
72522
|
if (ts.isJsxAttribute(attributeDecl)) {
|
|
72547
72523
|
var exprType = checkJsxAttribute(attributeDecl, checkMode);
|
|
72548
|
-
objectFlags |= ts.getObjectFlags(exprType) &
|
|
72524
|
+
objectFlags |= ts.getObjectFlags(exprType) & 917504 /* PropagatingFlags */;
|
|
72549
72525
|
var attributeSymbol = createSymbol(4 /* Property */ | member.flags, member.escapedName);
|
|
72550
72526
|
attributeSymbol.declarations = member.declarations;
|
|
72551
72527
|
attributeSymbol.parent = member.parent;
|
|
@@ -72629,7 +72605,7 @@ var ts;
|
|
|
72629
72605
|
function createJsxAttributesType() {
|
|
72630
72606
|
objectFlags |= freshObjectLiteralFlag;
|
|
72631
72607
|
var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
72632
|
-
result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ |
|
|
72608
|
+
result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
|
|
72633
72609
|
return result;
|
|
72634
72610
|
}
|
|
72635
72611
|
}
|
|
@@ -75836,7 +75812,7 @@ var ts;
|
|
|
75836
75812
|
var jsSymbol = getSymbolOfExpando(node, /*allowDeclaration*/ false);
|
|
75837
75813
|
if ((_a = jsSymbol === null || jsSymbol === void 0 ? void 0 : jsSymbol.exports) === null || _a === void 0 ? void 0 : _a.size) {
|
|
75838
75814
|
var jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
75839
|
-
jsAssignmentType.objectFlags |=
|
|
75815
|
+
jsAssignmentType.objectFlags |= 8192 /* JSLiteral */;
|
|
75840
75816
|
return getIntersectionType([returnType, jsAssignmentType]);
|
|
75841
75817
|
}
|
|
75842
75818
|
}
|
|
@@ -76103,7 +76079,7 @@ var ts;
|
|
|
76103
76079
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
76104
76080
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
76105
76081
|
var result_11 = createAnonymousType(undefined, resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
|
|
76106
|
-
result_11.objectFlags |=
|
|
76082
|
+
result_11.objectFlags |= 16777216 /* InstantiationExpressionType */;
|
|
76107
76083
|
result_11.node = node;
|
|
76108
76084
|
return result_11;
|
|
76109
76085
|
}
|
|
@@ -76871,7 +76847,7 @@ var ts;
|
|
|
76871
76847
|
var returnType = getReturnTypeFromBody(node, checkMode);
|
|
76872
76848
|
var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
|
|
76873
76849
|
var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, ts.emptyArray);
|
|
76874
|
-
returnOnlyType.objectFlags |=
|
|
76850
|
+
returnOnlyType.objectFlags |= 524288 /* NonInferrableType */;
|
|
76875
76851
|
return links.contextFreeType = returnOnlyType;
|
|
76876
76852
|
}
|
|
76877
76853
|
}
|
|
@@ -109895,7 +109871,7 @@ var ts;
|
|
|
109895
109871
|
return emitRestOrJSDocVariadicType(node);
|
|
109896
109872
|
case 318 /* JSDocNamepathType */:
|
|
109897
109873
|
return;
|
|
109898
|
-
case 319 /*
|
|
109874
|
+
case 319 /* JSDoc */:
|
|
109899
109875
|
return emitJSDoc(node);
|
|
109900
109876
|
case 321 /* JSDocTypeLiteral */:
|
|
109901
109877
|
return emitJSDocTypeLiteral(node);
|
|
@@ -126641,6 +126617,14 @@ var ts;
|
|
|
126641
126617
|
});
|
|
126642
126618
|
}
|
|
126643
126619
|
ts.signatureToDisplayParts = signatureToDisplayParts;
|
|
126620
|
+
function nodeToDisplayParts(node, enclosingDeclaration) {
|
|
126621
|
+
var file = enclosingDeclaration.getSourceFile();
|
|
126622
|
+
return mapToDisplayParts(function (writer) {
|
|
126623
|
+
var printer = ts.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
|
|
126624
|
+
printer.writeNode(4 /* Unspecified */, node, file, writer);
|
|
126625
|
+
});
|
|
126626
|
+
}
|
|
126627
|
+
ts.nodeToDisplayParts = nodeToDisplayParts;
|
|
126644
126628
|
function isImportOrExportSpecifierName(location) {
|
|
126645
126629
|
return !!location.parent && ts.isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location;
|
|
126646
126630
|
}
|
|
@@ -129981,6 +129965,8 @@ var ts;
|
|
|
129981
129965
|
CompletionSource["ClassMemberSnippet"] = "ClassMemberSnippet/";
|
|
129982
129966
|
/** A type-only import that needs to be promoted in order to be used at the completion location */
|
|
129983
129967
|
CompletionSource["TypeOnlyAlias"] = "TypeOnlyAlias/";
|
|
129968
|
+
/** Auto-import that comes attached to an object literal method snippet */
|
|
129969
|
+
CompletionSource["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
|
|
129984
129970
|
})(CompletionSource = Completions.CompletionSource || (Completions.CompletionSource = {}));
|
|
129985
129971
|
var SymbolOriginInfoKind;
|
|
129986
129972
|
(function (SymbolOriginInfoKind) {
|
|
@@ -129991,6 +129977,7 @@ var ts;
|
|
|
129991
129977
|
SymbolOriginInfoKind[SymbolOriginInfoKind["Nullable"] = 16] = "Nullable";
|
|
129992
129978
|
SymbolOriginInfoKind[SymbolOriginInfoKind["ResolvedExport"] = 32] = "ResolvedExport";
|
|
129993
129979
|
SymbolOriginInfoKind[SymbolOriginInfoKind["TypeOnlyAlias"] = 64] = "TypeOnlyAlias";
|
|
129980
|
+
SymbolOriginInfoKind[SymbolOriginInfoKind["ObjectLiteralMethod"] = 128] = "ObjectLiteralMethod";
|
|
129994
129981
|
SymbolOriginInfoKind[SymbolOriginInfoKind["SymbolMemberNoExport"] = 2] = "SymbolMemberNoExport";
|
|
129995
129982
|
SymbolOriginInfoKind[SymbolOriginInfoKind["SymbolMemberExport"] = 6] = "SymbolMemberExport";
|
|
129996
129983
|
})(SymbolOriginInfoKind || (SymbolOriginInfoKind = {}));
|
|
@@ -130021,6 +130008,9 @@ var ts;
|
|
|
130021
130008
|
function originIsTypeOnlyAlias(origin) {
|
|
130022
130009
|
return !!(origin && origin.kind & 64 /* TypeOnlyAlias */);
|
|
130023
130010
|
}
|
|
130011
|
+
function originIsObjectLiteralMethod(origin) {
|
|
130012
|
+
return !!(origin && origin.kind & 128 /* ObjectLiteralMethod */);
|
|
130013
|
+
}
|
|
130024
130014
|
var KeywordCompletionFilters;
|
|
130025
130015
|
(function (KeywordCompletionFilters) {
|
|
130026
130016
|
KeywordCompletionFilters[KeywordCompletionFilters["None"] = 0] = "None";
|
|
@@ -130446,6 +130436,22 @@ var ts;
|
|
|
130446
130436
|
source = CompletionSource.ClassMemberSnippet;
|
|
130447
130437
|
}
|
|
130448
130438
|
}
|
|
130439
|
+
if (preferences.includeCompletionsWithObjectLiteralMethodSnippets
|
|
130440
|
+
&& preferences.includeCompletionsWithInsertText
|
|
130441
|
+
&& origin && originIsObjectLiteralMethod(origin)) {
|
|
130442
|
+
var objectLiteral = ts.cast(tryGetObjectLikeCompletionContainer(contextToken), ts.isObjectLiteralExpression);
|
|
130443
|
+
var importAdder = void 0;
|
|
130444
|
+
var entry = getEntryForObjectLiteralMethodCompletion(symbol, name, objectLiteral, program, host, options, preferences, formatContext);
|
|
130445
|
+
if (!entry) {
|
|
130446
|
+
return undefined;
|
|
130447
|
+
}
|
|
130448
|
+
(insertText = entry.insertText, isSnippet = entry.isSnippet, importAdder = entry.importAdder, sourceDisplay = entry.sourceDisplay);
|
|
130449
|
+
source = CompletionSource.ObjectLiteralMethodSnippet;
|
|
130450
|
+
sortText = (parseInt(sortText, 10) + 1).toString();
|
|
130451
|
+
if (importAdder.hasFixes()) {
|
|
130452
|
+
hasAction = true;
|
|
130453
|
+
}
|
|
130454
|
+
}
|
|
130449
130455
|
if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
130450
130456
|
var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
|
|
130451
130457
|
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
|
|
@@ -130604,27 +130610,15 @@ var ts;
|
|
|
130604
130610
|
completionNodes.push(node);
|
|
130605
130611
|
}, body, 2 /* Property */, isAbstract);
|
|
130606
130612
|
if (completionNodes.length) {
|
|
130613
|
+
var format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */;
|
|
130607
130614
|
replacementSpan = modifiersSpan;
|
|
130608
130615
|
// If we have access to formatting settings, we print the nodes using the emitter,
|
|
130609
130616
|
// and then format the printed text.
|
|
130610
130617
|
if (formatContext) {
|
|
130611
|
-
|
|
130612
|
-
text: printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile),
|
|
130613
|
-
getLineAndCharacterOfPosition: function (pos) {
|
|
130614
|
-
return ts.getLineAndCharacterOfPosition(this, pos);
|
|
130615
|
-
},
|
|
130616
|
-
};
|
|
130617
|
-
var formatOptions_1 = ts.getFormatCodeSettingsForWriting(formatContext, sourceFile);
|
|
130618
|
-
var changes = ts.flatMap(completionNodes, function (node) {
|
|
130619
|
-
var nodeWithPos = ts.textChanges.assignPositionsToNode(node);
|
|
130620
|
-
return ts.formatting.formatNodeGivenIndentation(nodeWithPos, syntheticFile_1, sourceFile.languageVariant,
|
|
130621
|
-
/* indentation */ 0,
|
|
130622
|
-
/* delta */ 0, __assign(__assign({}, formatContext), { options: formatOptions_1 }));
|
|
130623
|
-
});
|
|
130624
|
-
insertText = ts.textChanges.applyChanges(syntheticFile_1.text, changes);
|
|
130618
|
+
insertText = printer.printAndFormatSnippetList(format, ts.factory.createNodeArray(completionNodes), sourceFile, formatContext);
|
|
130625
130619
|
}
|
|
130626
130620
|
else { // Otherwise, just use emitter to print the new nodes.
|
|
130627
|
-
insertText = printer.printSnippetList(
|
|
130621
|
+
insertText = printer.printSnippetList(format, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
130628
130622
|
}
|
|
130629
130623
|
}
|
|
130630
130624
|
return { insertText: insertText, isSnippet: isSnippet, importAdder: importAdder, replacementSpan: replacementSpan };
|
|
@@ -130674,12 +130668,92 @@ var ts;
|
|
|
130674
130668
|
}
|
|
130675
130669
|
return undefined;
|
|
130676
130670
|
}
|
|
130671
|
+
function getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclaration, program, host, options, preferences, formatContext) {
|
|
130672
|
+
var isSnippet;
|
|
130673
|
+
var insertText = name;
|
|
130674
|
+
var sourceFile = enclosingDeclaration.getSourceFile();
|
|
130675
|
+
var importAdder = ts.codefix.createImportAdder(sourceFile, program, preferences, host);
|
|
130676
|
+
var body;
|
|
130677
|
+
if (preferences.includeCompletionsWithSnippetText) {
|
|
130678
|
+
isSnippet = true;
|
|
130679
|
+
var emptyStmt = ts.factory.createEmptyStatement();
|
|
130680
|
+
body = ts.factory.createBlock([emptyStmt], /* multiline */ true);
|
|
130681
|
+
ts.setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 });
|
|
130682
|
+
}
|
|
130683
|
+
else {
|
|
130684
|
+
body = ts.factory.createBlock([], /* multiline */ true);
|
|
130685
|
+
}
|
|
130686
|
+
var method = createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences, importAdder, /*body*/ body);
|
|
130687
|
+
if (!method) {
|
|
130688
|
+
return undefined;
|
|
130689
|
+
}
|
|
130690
|
+
var printer = createSnippetPrinter({
|
|
130691
|
+
removeComments: true,
|
|
130692
|
+
module: options.module,
|
|
130693
|
+
target: options.target,
|
|
130694
|
+
omitTrailingSemicolon: false,
|
|
130695
|
+
newLine: ts.getNewLineKind(ts.getNewLineCharacter(options, ts.maybeBind(host, host.getNewLine))),
|
|
130696
|
+
});
|
|
130697
|
+
if (formatContext) {
|
|
130698
|
+
insertText = printer.printAndFormatSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, ts.factory.createNodeArray([method], /*hasTrailingComma*/ true), sourceFile, formatContext);
|
|
130699
|
+
}
|
|
130700
|
+
else {
|
|
130701
|
+
insertText = printer.printSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, ts.factory.createNodeArray([method], /*hasTrailingComma*/ true), sourceFile);
|
|
130702
|
+
}
|
|
130703
|
+
var methodSignature = ts.factory.createMethodSignature(method.modifiers, method.name, method.questionToken, method.typeParameters, method.parameters, method.type);
|
|
130704
|
+
var sourceDisplay = ts.nodeToDisplayParts(methodSignature, enclosingDeclaration);
|
|
130705
|
+
return { isSnippet: isSnippet, insertText: insertText, importAdder: importAdder, sourceDisplay: sourceDisplay };
|
|
130706
|
+
}
|
|
130707
|
+
;
|
|
130708
|
+
function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences, importAdder, body) {
|
|
130709
|
+
var declarations = symbol.getDeclarations();
|
|
130710
|
+
if (!(declarations && declarations.length)) {
|
|
130711
|
+
return undefined;
|
|
130712
|
+
}
|
|
130713
|
+
var checker = program.getTypeChecker();
|
|
130714
|
+
var scriptTarget = ts.getEmitScriptTarget(program.getCompilerOptions());
|
|
130715
|
+
var declaration = declarations[0];
|
|
130716
|
+
var name = ts.getSynthesizedDeepClone(ts.getNameOfDeclaration(declaration), /*includeTrivia*/ false);
|
|
130717
|
+
var type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration));
|
|
130718
|
+
var quotePreference = ts.getQuotePreference(sourceFile, preferences);
|
|
130719
|
+
var builderFlags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : undefined;
|
|
130720
|
+
switch (declaration.kind) {
|
|
130721
|
+
case 165 /* PropertySignature */:
|
|
130722
|
+
case 166 /* PropertyDeclaration */:
|
|
130723
|
+
case 167 /* MethodSignature */:
|
|
130724
|
+
case 168 /* MethodDeclaration */: {
|
|
130725
|
+
var signatures = checker.getSignaturesOfType(type, 0 /* Call */);
|
|
130726
|
+
if (signatures.length > 1) {
|
|
130727
|
+
// We don't support overloads in object literals.
|
|
130728
|
+
return undefined;
|
|
130729
|
+
}
|
|
130730
|
+
var typeNode = checker.typeToTypeNode(type, enclosingDeclaration, builderFlags, ts.codefix.getNoopSymbolTrackerWithResolver({ program: program, host: host }));
|
|
130731
|
+
var importableReference = ts.codefix.tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
|
|
130732
|
+
if (importableReference) {
|
|
130733
|
+
typeNode = importableReference.typeNode;
|
|
130734
|
+
ts.codefix.importSymbols(importAdder, importableReference.symbols);
|
|
130735
|
+
}
|
|
130736
|
+
if (!typeNode) {
|
|
130737
|
+
return undefined;
|
|
130738
|
+
}
|
|
130739
|
+
ts.Debug.assertNode(typeNode, ts.isFunctionTypeNode);
|
|
130740
|
+
return ts.factory.createMethodDeclaration(
|
|
130741
|
+
/*decorators*/ undefined,
|
|
130742
|
+
/*modifiers*/ undefined,
|
|
130743
|
+
/*asteriskToken*/ undefined, name,
|
|
130744
|
+
/*questionToken*/ undefined, typeNode.typeParameters, typeNode.parameters, typeNode.type, body);
|
|
130745
|
+
}
|
|
130746
|
+
default:
|
|
130747
|
+
return undefined;
|
|
130748
|
+
}
|
|
130749
|
+
}
|
|
130677
130750
|
function createSnippetPrinter(printerOptions) {
|
|
130678
130751
|
var baseWriter = ts.textChanges.createWriter(ts.getNewLineCharacter(printerOptions));
|
|
130679
130752
|
var printer = ts.createPrinter(printerOptions, baseWriter);
|
|
130680
130753
|
var writer = __assign(__assign({}, baseWriter), { write: function (s) { return baseWriter.write(ts.escapeSnippetText(s)); }, nonEscapingWrite: baseWriter.write, writeLiteral: function (s) { return baseWriter.writeLiteral(ts.escapeSnippetText(s)); }, writeStringLiteral: function (s) { return baseWriter.writeStringLiteral(ts.escapeSnippetText(s)); }, writeSymbol: function (s, symbol) { return baseWriter.writeSymbol(ts.escapeSnippetText(s), symbol); }, writeParameter: function (s) { return baseWriter.writeParameter(ts.escapeSnippetText(s)); }, writeComment: function (s) { return baseWriter.writeComment(ts.escapeSnippetText(s)); }, writeProperty: function (s) { return baseWriter.writeProperty(ts.escapeSnippetText(s)); } });
|
|
130681
130754
|
return {
|
|
130682
130755
|
printSnippetList: printSnippetList,
|
|
130756
|
+
printAndFormatSnippetList: printAndFormatSnippetList,
|
|
130683
130757
|
};
|
|
130684
130758
|
/* Snippet-escaping version of `printer.printList`. */
|
|
130685
130759
|
function printSnippetList(format, list, sourceFile) {
|
|
@@ -130687,6 +130761,22 @@ var ts;
|
|
|
130687
130761
|
printer.writeList(format, list, sourceFile, writer);
|
|
130688
130762
|
return writer.getText();
|
|
130689
130763
|
}
|
|
130764
|
+
function printAndFormatSnippetList(format, list, sourceFile, formatContext) {
|
|
130765
|
+
var syntheticFile = {
|
|
130766
|
+
text: printSnippetList(format, list, sourceFile),
|
|
130767
|
+
getLineAndCharacterOfPosition: function (pos) {
|
|
130768
|
+
return ts.getLineAndCharacterOfPosition(this, pos);
|
|
130769
|
+
},
|
|
130770
|
+
};
|
|
130771
|
+
var formatOptions = ts.getFormatCodeSettingsForWriting(formatContext, sourceFile);
|
|
130772
|
+
var changes = ts.flatMap(list, function (node) {
|
|
130773
|
+
var nodeWithPos = ts.textChanges.assignPositionsToNode(node);
|
|
130774
|
+
return ts.formatting.formatNodeGivenIndentation(nodeWithPos, syntheticFile, sourceFile.languageVariant,
|
|
130775
|
+
/* indentation */ 0,
|
|
130776
|
+
/* delta */ 0, __assign(__assign({}, formatContext), { options: formatOptions }));
|
|
130777
|
+
});
|
|
130778
|
+
return ts.textChanges.applyChanges(syntheticFile.text, changes);
|
|
130779
|
+
}
|
|
130690
130780
|
}
|
|
130691
130781
|
function originToCompletionEntryData(origin) {
|
|
130692
130782
|
var ambientModuleName = origin.fileName ? undefined : ts.stripQuotes(origin.moduleSymbol.name);
|
|
@@ -130799,7 +130889,7 @@ var ts;
|
|
|
130799
130889
|
var symbol = symbols[i];
|
|
130800
130890
|
var origin = symbolToOriginInfoMap === null || symbolToOriginInfoMap === void 0 ? void 0 : symbolToOriginInfoMap[i];
|
|
130801
130891
|
var info = getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, !!jsxIdentifierExpected);
|
|
130802
|
-
if (!info || uniques.get(info.name) || kind === 1 /* Global */ && symbolToSortTextIdMap && !shouldIncludeSymbol(symbol, symbolToSortTextIdMap)) {
|
|
130892
|
+
if (!info || (uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin))) || kind === 1 /* Global */ && symbolToSortTextIdMap && !shouldIncludeSymbol(symbol, symbolToSortTextIdMap)) {
|
|
130803
130893
|
continue;
|
|
130804
130894
|
}
|
|
130805
130895
|
var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
|
|
@@ -130930,7 +131020,9 @@ var ts;
|
|
|
130930
131020
|
return ts.firstDefined(symbols, function (symbol, index) {
|
|
130931
131021
|
var origin = symbolToOriginInfoMap[index];
|
|
130932
131022
|
var info = getCompletionEntryDisplayNameForSymbol(symbol, ts.getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
|
|
130933
|
-
return info && info.name === entryId.name && (entryId.source === CompletionSource.ClassMemberSnippet && symbol.flags & 106500 /* ClassMember */
|
|
131023
|
+
return info && info.name === entryId.name && (entryId.source === CompletionSource.ClassMemberSnippet && symbol.flags & 106500 /* ClassMember */
|
|
131024
|
+
|| entryId.source === CompletionSource.ObjectLiteralMethodSnippet && symbol.flags & (4 /* Property */ | 8192 /* Method */)
|
|
131025
|
+
|| getSourceFromOrigin(origin) === entryId.source)
|
|
130934
131026
|
? { type: "symbol", symbol: symbol, location: location, origin: origin, contextToken: contextToken, previousToken: previousToken, isJsxInitializer: isJsxInitializer, isTypeOnlyLocation: isTypeOnlyLocation }
|
|
130935
131027
|
: undefined;
|
|
130936
131028
|
}) || { type: "none" };
|
|
@@ -131012,6 +131104,20 @@ var ts;
|
|
|
131012
131104
|
};
|
|
131013
131105
|
}
|
|
131014
131106
|
}
|
|
131107
|
+
if (source === CompletionSource.ObjectLiteralMethodSnippet) {
|
|
131108
|
+
var enclosingDeclaration = tryGetObjectLikeCompletionContainer(contextToken);
|
|
131109
|
+
var importAdder = getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclaration, program, host, compilerOptions, preferences, formatContext).importAdder;
|
|
131110
|
+
if (importAdder.hasFixes()) {
|
|
131111
|
+
var changes = ts.textChanges.ChangeTracker.with({ host: host, formatContext: formatContext, preferences: preferences }, importAdder.writeFixes);
|
|
131112
|
+
return {
|
|
131113
|
+
sourceDisplay: undefined,
|
|
131114
|
+
codeActions: [{
|
|
131115
|
+
changes: changes,
|
|
131116
|
+
description: ts.diagnosticToString([ts.Diagnostics.Includes_imports_of_types_referenced_by_0, name]),
|
|
131117
|
+
}],
|
|
131118
|
+
};
|
|
131119
|
+
}
|
|
131120
|
+
}
|
|
131015
131121
|
if (originIsTypeOnlyAlias(origin)) {
|
|
131016
131122
|
var codeAction_1 = ts.codefix.getPromoteTypeOnlyCompletionAction(sourceFile, origin.declaration.name, program, host, formatContext, preferences);
|
|
131017
131123
|
ts.Debug.assertIsDefined(codeAction_1, "Expected to have a code action for promoting type-only alias");
|
|
@@ -131898,6 +132004,45 @@ var ts;
|
|
|
131898
132004
|
symbolToSortTextIdMap[symbolId] = importCompletionNode ? 11 /* LocationPriority */ : 16 /* AutoImportSuggestions */;
|
|
131899
132005
|
symbols.push(symbol);
|
|
131900
132006
|
}
|
|
132007
|
+
/* Mutates `symbols` and `symbolToOriginInfoMap`. */
|
|
132008
|
+
function collectObjectLiteralMethodSymbols(members) {
|
|
132009
|
+
// TODO: support JS files.
|
|
132010
|
+
if (ts.isInJSFile(location)) {
|
|
132011
|
+
return false;
|
|
132012
|
+
}
|
|
132013
|
+
members = members.slice(); // Needed in case `symbol` and `members` are the same array.
|
|
132014
|
+
for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
|
|
132015
|
+
var member = members_1[_i];
|
|
132016
|
+
if (!isObjectLiteralMethodSymbol(member)) {
|
|
132017
|
+
continue;
|
|
132018
|
+
}
|
|
132019
|
+
var origin = { kind: 128 /* ObjectLiteralMethod */ };
|
|
132020
|
+
symbolToOriginInfoMap[symbols.length] = origin;
|
|
132021
|
+
symbols.push(member);
|
|
132022
|
+
}
|
|
132023
|
+
}
|
|
132024
|
+
function isObjectLiteralMethodSymbol(symbol) {
|
|
132025
|
+
/*
|
|
132026
|
+
For an object type
|
|
132027
|
+
`type Foo = {
|
|
132028
|
+
bar(x: number): void;
|
|
132029
|
+
foo: (x: string) => string;
|
|
132030
|
+
}`,
|
|
132031
|
+
`bar` will have symbol flag `Method`,
|
|
132032
|
+
`foo` will have symbol flag `Property`.
|
|
132033
|
+
*/
|
|
132034
|
+
if (!(symbol.flags & (4 /* Property */ | 8192 /* Method */))) {
|
|
132035
|
+
return false;
|
|
132036
|
+
}
|
|
132037
|
+
if (symbol.flags & 4 /* Property */) {
|
|
132038
|
+
var type = program.getTypeChecker().getTypeOfSymbol(symbol);
|
|
132039
|
+
// We ignore non-function properties.
|
|
132040
|
+
if (!type.getCallSignatures().length) {
|
|
132041
|
+
return false;
|
|
132042
|
+
}
|
|
132043
|
+
}
|
|
132044
|
+
return true;
|
|
132045
|
+
}
|
|
131901
132046
|
/**
|
|
131902
132047
|
* Finds the first node that "embraces" the position, so that one may
|
|
131903
132048
|
* accurately aggregate locals from the closest containing scope.
|
|
@@ -132095,7 +132240,12 @@ var ts;
|
|
|
132095
132240
|
}
|
|
132096
132241
|
if (typeMembers && typeMembers.length > 0) {
|
|
132097
132242
|
// Add filtered items to the completion list
|
|
132098
|
-
|
|
132243
|
+
var filteredMembers = filterObjectMembersList(typeMembers, ts.Debug.checkDefined(existingMembers));
|
|
132244
|
+
symbols = ts.concatenate(symbols, filteredMembers);
|
|
132245
|
+
if (preferences.includeCompletionsWithObjectLiteralMethodSnippets
|
|
132246
|
+
&& objectLikeContainer.kind === 204 /* ObjectLiteralExpression */) {
|
|
132247
|
+
collectObjectLiteralMethodSymbols(filteredMembers);
|
|
132248
|
+
}
|
|
132099
132249
|
}
|
|
132100
132250
|
setSortTextToOptionalMember();
|
|
132101
132251
|
return 1 /* Success */;
|
|
@@ -132227,29 +132377,6 @@ var ts;
|
|
|
132227
132377
|
}
|
|
132228
132378
|
return 1 /* Success */;
|
|
132229
132379
|
}
|
|
132230
|
-
/**
|
|
132231
|
-
* Returns the immediate owning object literal or binding pattern of a context token,
|
|
132232
|
-
* on the condition that one exists and that the context implies completion should be given.
|
|
132233
|
-
*/
|
|
132234
|
-
function tryGetObjectLikeCompletionContainer(contextToken) {
|
|
132235
|
-
if (contextToken) {
|
|
132236
|
-
var parent = contextToken.parent;
|
|
132237
|
-
switch (contextToken.kind) {
|
|
132238
|
-
case 18 /* OpenBraceToken */: // const x = { |
|
|
132239
|
-
case 27 /* CommaToken */: // const x = { a: 0, |
|
|
132240
|
-
if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
|
|
132241
|
-
return parent;
|
|
132242
|
-
}
|
|
132243
|
-
break;
|
|
132244
|
-
case 41 /* AsteriskToken */:
|
|
132245
|
-
return ts.isMethodDeclaration(parent) ? ts.tryCast(parent.parent, ts.isObjectLiteralExpression) : undefined;
|
|
132246
|
-
case 79 /* Identifier */:
|
|
132247
|
-
return contextToken.text === "async" && ts.isShorthandPropertyAssignment(contextToken.parent)
|
|
132248
|
-
? contextToken.parent.parent : undefined;
|
|
132249
|
-
}
|
|
132250
|
-
}
|
|
132251
|
-
return undefined;
|
|
132252
|
-
}
|
|
132253
132380
|
function isConstructorParameterCompletion(node) {
|
|
132254
132381
|
return !!node.parent && ts.isParameter(node.parent) && ts.isConstructorDeclaration(node.parent.parent)
|
|
132255
132382
|
&& (ts.isParameterPropertyModifier(node.kind) || ts.isDeclarationName(node));
|
|
@@ -132672,6 +132799,29 @@ var ts;
|
|
|
132672
132799
|
return node.getStart(sourceFile) <= position && position <= node.getEnd();
|
|
132673
132800
|
}
|
|
132674
132801
|
}
|
|
132802
|
+
/**
|
|
132803
|
+
* Returns the immediate owning object literal or binding pattern of a context token,
|
|
132804
|
+
* on the condition that one exists and that the context implies completion should be given.
|
|
132805
|
+
*/
|
|
132806
|
+
function tryGetObjectLikeCompletionContainer(contextToken) {
|
|
132807
|
+
if (contextToken) {
|
|
132808
|
+
var parent = contextToken.parent;
|
|
132809
|
+
switch (contextToken.kind) {
|
|
132810
|
+
case 18 /* OpenBraceToken */: // const x = { |
|
|
132811
|
+
case 27 /* CommaToken */: // const x = { a: 0, |
|
|
132812
|
+
if (ts.isObjectLiteralExpression(parent) || ts.isObjectBindingPattern(parent)) {
|
|
132813
|
+
return parent;
|
|
132814
|
+
}
|
|
132815
|
+
break;
|
|
132816
|
+
case 41 /* AsteriskToken */:
|
|
132817
|
+
return ts.isMethodDeclaration(parent) ? ts.tryCast(parent.parent, ts.isObjectLiteralExpression) : undefined;
|
|
132818
|
+
case 79 /* Identifier */:
|
|
132819
|
+
return contextToken.text === "async" && ts.isShorthandPropertyAssignment(contextToken.parent)
|
|
132820
|
+
? contextToken.parent.parent : undefined;
|
|
132821
|
+
}
|
|
132822
|
+
}
|
|
132823
|
+
return undefined;
|
|
132824
|
+
}
|
|
132675
132825
|
function getRelevantTokens(position, sourceFile) {
|
|
132676
132826
|
var previousToken = ts.findPrecedingToken(position, sourceFile);
|
|
132677
132827
|
if (previousToken && position <= previousToken.end && (ts.isMemberName(previousToken) || ts.isKeyword(previousToken.kind))) {
|
|
@@ -155069,6 +155219,7 @@ var ts;
|
|
|
155069
155219
|
if (!ts.some(signatures)) {
|
|
155070
155220
|
break;
|
|
155071
155221
|
}
|
|
155222
|
+
// >> TODO: call `try get auto importable reference from type node` on type nodes?
|
|
155072
155223
|
if (declarations.length === 1) {
|
|
155073
155224
|
ts.Debug.assert(signatures.length === 1, "One declaration implies one signature");
|
|
155074
155225
|
var signature = signatures[0];
|
|
@@ -155099,6 +155250,27 @@ var ts;
|
|
|
155099
155250
|
}
|
|
155100
155251
|
}
|
|
155101
155252
|
codefix.addNewNodeForMemberSymbol = addNewNodeForMemberSymbol;
|
|
155253
|
+
// export function addNewNodeObjectLiteralProperties(
|
|
155254
|
+
// // changes: textChanges.ChangeTracker,
|
|
155255
|
+
// // context: CodeFixContextBase,
|
|
155256
|
+
// sourceFile: SourceFile,
|
|
155257
|
+
// program: Program,
|
|
155258
|
+
// preferences: UserPreferences,
|
|
155259
|
+
// host: LanguageServiceHost,
|
|
155260
|
+
// // info: ObjectLiteralInfo,
|
|
155261
|
+
// properties: Symbol[],
|
|
155262
|
+
// addNodes: (nodes: PropertyAssignment[]) => void,
|
|
155263
|
+
// ): void {
|
|
155264
|
+
// const importAdder = createImportAdder(sourceFile, program, preferences, host);
|
|
155265
|
+
// const quotePreference = getQuotePreference(sourceFile, preferences);
|
|
155266
|
+
// const target = getEmitScriptTarget(program.getCompilerOptions());
|
|
155267
|
+
// const checker = program.getTypeChecker();
|
|
155268
|
+
// const props = map(properties, prop => {
|
|
155269
|
+
// const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop));
|
|
155270
|
+
// return factory.createPropertyAssignment(createPropertyNameNodeForIdentifierOrLiteral(prop.name, target, quotePreference === QuotePreference.Single), initializer);
|
|
155271
|
+
// });
|
|
155272
|
+
// addNodes(props);
|
|
155273
|
+
// }
|
|
155102
155274
|
function createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) {
|
|
155103
155275
|
var program = context.program;
|
|
155104
155276
|
var checker = program.getTypeChecker();
|
|
@@ -155268,6 +155440,7 @@ var ts;
|
|
|
155268
155440
|
return createStubbedMethod(modifiers, name, optional,
|
|
155269
155441
|
/*typeParameters*/ undefined, parameters, getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration), quotePreference, body);
|
|
155270
155442
|
}
|
|
155443
|
+
codefix.createMethodImplementingSignatures = createMethodImplementingSignatures;
|
|
155271
155444
|
function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {
|
|
155272
155445
|
if (ts.length(signatures)) {
|
|
155273
155446
|
var type = checker.getUnionType(ts.map(signatures, checker.getReturnTypeOfSignature));
|
|
@@ -158495,8 +158668,8 @@ var ts;
|
|
|
158495
158668
|
ts.Debug.assert(members.length > 0, "Found no members"); // There must be at least one child, since we extracted from one.
|
|
158496
158669
|
var prevMember;
|
|
158497
158670
|
var allProperties = true;
|
|
158498
|
-
for (var _i = 0,
|
|
158499
|
-
var member =
|
|
158671
|
+
for (var _i = 0, members_2 = members; _i < members_2.length; _i++) {
|
|
158672
|
+
var member = members_2[_i];
|
|
158500
158673
|
if (member.pos > maxPos) {
|
|
158501
158674
|
return prevMember || members[0];
|
|
158502
158675
|
}
|