@typescript-deploys/pr-build 5.2.0-pr-54718-7 → 5.2.0-pr-54838-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 CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.2";
21
- var version = `${versionMajorMinor}.0-insiders.20230630`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230703`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -1277,6 +1277,13 @@ function takeWhile(array, predicate) {
1277
1277
  return array.slice(0, index);
1278
1278
  }
1279
1279
  }
1280
+ function startWhitespaceCount(s) {
1281
+ for (let i = 0; i < s.length; i++) {
1282
+ if (!isWhiteSpaceLike(s.charCodeAt(i)))
1283
+ return i;
1284
+ }
1285
+ return s.length;
1286
+ }
1280
1287
  function skipWhile(array, predicate) {
1281
1288
  if (array) {
1282
1289
  const len = array.length;
@@ -5717,7 +5724,7 @@ var Diagnostics = {
5717
5724
  Identifier_expected: diag(1003, 1 /* Error */, "Identifier_expected_1003", "Identifier expected."),
5718
5725
  _0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."),
5719
5726
  A_file_cannot_have_a_reference_to_itself: diag(1006, 1 /* Error */, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."),
5720
- The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, 1 /* Error */, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."),
5727
+ The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon: diag(1007, 1 /* Error */, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon_1007", "The parser expected to find a '{1}' to match the '{0}' token here:"),
5721
5728
  Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
5722
5729
  Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."),
5723
5730
  An_element_access_expression_should_take_an_argument: diag(1011, 1 /* Error */, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."),
@@ -5979,7 +5986,7 @@ var Diagnostics = {
5979
5986
  unique_symbol_types_are_not_allowed_here: diag(1335, 1 /* Error */, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."),
5980
5987
  An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, 1 /* Error */, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),
5981
5988
  infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, 1 /* Error */, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."),
5982
- Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, 1 /* Error */, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
5989
+ Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_Colon: diag(1339, 1 /* Error */, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_Colon_1339", "Module '{0}' does not refer to a value, but is used as a value here:"),
5983
5990
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* Error */, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
5984
5991
  Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
5985
5992
  The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, 1 /* Error */, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),
@@ -5987,7 +5994,7 @@ var Diagnostics = {
5987
5994
  An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
5988
5995
  This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1 /* Error */, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
5989
5996
  use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, 1 /* Error */, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."),
5990
- Non_simple_parameter_declared_here: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."),
5997
+ Non_simple_parameter_declared_here_Colon: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_Colon_1348", "Non-simple parameter declared here:"),
5991
5998
  use_strict_directive_used_here: diag(1349, 1 /* Error */, "use_strict_directive_used_here_1349", "'use strict' directive used here."),
5992
5999
  Print_the_final_configuration_instead_of_building: diag(1350, 3 /* Message */, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."),
5993
6000
  An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, 1 /* Error */, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."),
@@ -6011,8 +6018,8 @@ var Diagnostics = {
6011
6018
  Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"),
6012
6019
  This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),
6013
6020
  await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, 1 /* Error */, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
6014
- _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."),
6015
- _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."),
6021
+ _0_was_imported_here_Colon: diag(1376, 3 /* Message */, "_0_was_imported_here_Colon_1376", "'{0}' was imported here:"),
6022
+ _0_was_exported_here_Colon: diag(1377, 3 /* Message */, "_0_was_exported_here_Colon_1377", "'{0}' was exported here:"),
6016
6023
  Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, 1 /* Error */, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
6017
6024
  An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, 1 /* Error */, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
6018
6025
  An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1 /* Error */, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
@@ -6031,34 +6038,34 @@ var Diagnostics = {
6031
6038
  Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),
6032
6039
  Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, 3 /* Message */, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),
6033
6040
  Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),
6034
- File_is_included_via_import_here: diag(1399, 3 /* Message */, "File_is_included_via_import_here_1399", "File is included via import here."),
6041
+ File_is_included_via_import_here_Colon: diag(1399, 3 /* Message */, "File_is_included_via_import_here_Colon_1399", "File is included via import here:"),
6035
6042
  Referenced_via_0_from_file_1: diag(1400, 3 /* Message */, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"),
6036
- File_is_included_via_reference_here: diag(1401, 3 /* Message */, "File_is_included_via_reference_here_1401", "File is included via reference here."),
6043
+ File_is_included_via_reference_here_Colon: diag(1401, 3 /* Message */, "File_is_included_via_reference_here_Colon_1401", "File is included via reference here:"),
6037
6044
  Type_library_referenced_via_0_from_file_1: diag(1402, 3 /* Message */, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"),
6038
6045
  Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, 3 /* Message */, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),
6039
- File_is_included_via_type_library_reference_here: diag(1404, 3 /* Message */, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."),
6046
+ File_is_included_via_type_library_reference_here_Colon: diag(1404, 3 /* Message */, "File_is_included_via_type_library_reference_here_Colon_1404", "File is included via type library reference here:"),
6040
6047
  Library_referenced_via_0_from_file_1: diag(1405, 3 /* Message */, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"),
6041
- File_is_included_via_library_reference_here: diag(1406, 3 /* Message */, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."),
6048
+ File_is_included_via_library_reference_here_Colon: diag(1406, 3 /* Message */, "File_is_included_via_library_reference_here_Colon_1406", "File is included via library reference here:"),
6042
6049
  Matched_by_include_pattern_0_in_1: diag(1407, 3 /* Message */, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"),
6043
- File_is_matched_by_include_pattern_specified_here: diag(1408, 3 /* Message */, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."),
6050
+ File_is_matched_by_include_pattern_specified_here_Colon: diag(1408, 3 /* Message */, "File_is_matched_by_include_pattern_specified_here_Colon_1408", "File is matched by include pattern specified here:"),
6044
6051
  Part_of_files_list_in_tsconfig_json: diag(1409, 3 /* Message */, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"),
6045
- File_is_matched_by_files_list_specified_here: diag(1410, 3 /* Message */, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."),
6052
+ File_is_matched_by_files_list_specified_here_Colon: diag(1410, 3 /* Message */, "File_is_matched_by_files_list_specified_here_Colon_1410", "File is matched by 'files' list specified here:"),
6046
6053
  Output_from_referenced_project_0_included_because_1_specified: diag(1411, 3 /* Message */, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"),
6047
6054
  Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, 3 /* Message */, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"),
6048
- File_is_output_from_referenced_project_specified_here: diag(1413, 3 /* Message */, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."),
6055
+ File_is_output_from_referenced_project_specified_here_Colon: diag(1413, 3 /* Message */, "File_is_output_from_referenced_project_specified_here_Colon_1413", "File is output from referenced project specified here:"),
6049
6056
  Source_from_referenced_project_0_included_because_1_specified: diag(1414, 3 /* Message */, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"),
6050
6057
  Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, 3 /* Message */, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"),
6051
- File_is_source_from_referenced_project_specified_here: diag(1416, 3 /* Message */, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."),
6058
+ File_is_source_from_referenced_project_specified_here_Colon: diag(1416, 3 /* Message */, "File_is_source_from_referenced_project_specified_here_Colon_1416", "File is source from referenced project specified here:"),
6052
6059
  Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, 3 /* Message */, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"),
6053
6060
  Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, 3 /* Message */, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),
6054
- File_is_entry_point_of_type_library_specified_here: diag(1419, 3 /* Message */, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."),
6061
+ File_is_entry_point_of_type_library_specified_here_Colon: diag(1419, 3 /* Message */, "File_is_entry_point_of_type_library_specified_here_Colon_1419", "File is entry point of type library specified here:"),
6055
6062
  Entry_point_for_implicit_type_library_0: diag(1420, 3 /* Message */, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"),
6056
6063
  Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, 3 /* Message */, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"),
6057
6064
  Library_0_specified_in_compilerOptions: diag(1422, 3 /* Message */, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"),
6058
- File_is_library_specified_here: diag(1423, 3 /* Message */, "File_is_library_specified_here_1423", "File is library specified here."),
6065
+ File_is_library_specified_here_Colon: diag(1423, 3 /* Message */, "File_is_library_specified_here_Colon_1423", "File is library specified here:"),
6059
6066
  Default_library: diag(1424, 3 /* Message */, "Default_library_1424", "Default library"),
6060
6067
  Default_library_for_target_0: diag(1425, 3 /* Message */, "Default_library_for_target_0_1425", "Default library for target '{0}'"),
6061
- File_is_default_library_for_target_specified_here: diag(1426, 3 /* Message */, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."),
6068
+ File_is_default_library_for_target_specified_here_Colon: diag(1426, 3 /* Message */, "File_is_default_library_for_target_specified_here_Colon_1426", "File is default library for target specified here:"),
6062
6069
  Root_file_specified_for_compilation: diag(1427, 3 /* Message */, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"),
6063
6070
  File_is_output_of_project_reference_source_0: diag(1428, 3 /* Message */, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"),
6064
6071
  File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
@@ -6511,7 +6518,7 @@ var Diagnostics = {
6511
6518
  Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, 1 /* Error */, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"),
6512
6519
  _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),
6513
6520
  _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, 1 /* Error */, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),
6514
- _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."),
6521
+ _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon: diag(2693, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon_2693", "'{0}' only refers to a type, but is being used as a value here:"),
6515
6522
  Namespace_0_has_no_exported_member_1: diag(2694, 1 /* Error */, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."),
6516
6523
  Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(
6517
6524
  2695,
@@ -6527,7 +6534,7 @@ var Diagnostics = {
6527
6534
  Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, 1 /* Error */, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),
6528
6535
  Rest_types_may_only_be_created_from_object_types: diag(2700, 1 /* Error */, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."),
6529
6536
  The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, 1 /* Error */, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."),
6530
- _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."),
6537
+ _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_Colon: diag(2702, 1 /* Error */, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_Colon_2702", "'{0}' only refers to a type, but is being used as a namespace here:"),
6531
6538
  The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, 1 /* Error */, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."),
6532
6539
  The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, 1 /* Error */, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."),
6533
6540
  An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, 1 /* Error */, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),
@@ -6553,12 +6560,12 @@ var Diagnostics = {
6553
6560
  Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, 1 /* Error */, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."),
6554
6561
  Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
6555
6562
  Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* Error */, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"),
6556
- _0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."),
6563
+ _0_is_declared_here_Colon: diag(2728, 3 /* Message */, "_0_is_declared_here_Colon_2728", "'{0}' is declared here:"),
6557
6564
  Property_0_is_used_before_its_initialization: diag(2729, 1 /* Error */, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."),
6558
6565
  An_arrow_function_cannot_have_a_this_parameter: diag(2730, 1 /* Error */, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."),
6559
6566
  Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, 1 /* Error */, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),
6560
6567
  Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, 1 /* Error */, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),
6561
- Property_0_was_also_declared_here: diag(2733, 1 /* Error */, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."),
6568
+ Property_0_was_also_declared_here_Colon: diag(2733, 1 /* Error */, "Property_0_was_also_declared_here_Colon_2733", "Property '{0}' was also declared here:"),
6562
6569
  Are_you_missing_a_semicolon: diag(2734, 1 /* Error */, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"),
6563
6570
  Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, 1 /* Error */, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),
6564
6571
  Operator_0_cannot_be_applied_to_type_1: diag(2736, 1 /* Error */, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."),
@@ -6575,10 +6582,10 @@ var Diagnostics = {
6575
6582
  _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, 1 /* Error */, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),
6576
6583
  Cannot_access_ambient_const_enums_when_0_is_enabled: diag(2748, 1 /* Error */, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."),
6577
6584
  _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, 1 /* Error */, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),
6578
- The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
6585
+ The_implementation_signature_is_declared_here_Colon: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_Colon_2750", "The implementation signature is declared here:"),
6579
6586
  Circularity_originates_in_type_at_this_location: diag(2751, 1 /* Error */, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."),
6580
- The_first_export_default_is_here: diag(2752, 1 /* Error */, "The_first_export_default_is_here_2752", "The first export default is here."),
6581
- Another_export_default_is_here: diag(2753, 1 /* Error */, "Another_export_default_is_here_2753", "Another export default is here."),
6587
+ The_first_export_default_is_here_Colon: diag(2752, 1 /* Error */, "The_first_export_default_is_here_Colon_2752", "The first export default is here:"),
6588
+ Another_export_default_is_here_Colon: diag(2753, 1 /* Error */, "Another_export_default_is_here_Colon_2753", "Another export default is here:"),
6582
6589
  super_may_not_use_type_arguments: diag(2754, 1 /* Error */, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."),
6583
6590
  No_constituent_of_type_0_is_callable: diag(2755, 1 /* Error */, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."),
6584
6591
  Not_all_constituents_of_type_0_are_callable: diag(2756, 1 /* Error */, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."),
@@ -6596,7 +6603,7 @@ var Diagnostics = {
6596
6603
  The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, 1 /* Error */, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."),
6597
6604
  No_overload_matches_this_call: diag(2769, 1 /* Error */, "No_overload_matches_this_call_2769", "No overload matches this call."),
6598
6605
  The_last_overload_gave_the_following_error: diag(2770, 1 /* Error */, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."),
6599
- The_last_overload_is_declared_here: diag(2771, 1 /* Error */, "The_last_overload_is_declared_here_2771", "The last overload is declared here."),
6606
+ The_last_overload_is_declared_here_Colon: diag(2771, 1 /* Error */, "The_last_overload_is_declared_here_Colon_2771", "The last overload is declared here:"),
6600
6607
  Overload_0_of_1_2_gave_the_following_error: diag(2772, 1 /* Error */, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."),
6601
6608
  Did_you_forget_to_use_await: diag(2773, 1 /* Error */, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"),
6602
6609
  This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, 1 /* Error */, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"),
@@ -6623,7 +6630,7 @@ var Diagnostics = {
6623
6630
  The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, 1 /* Error */, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),
6624
6631
  It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, 1 /* Error */, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),
6625
6632
  A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, 1 /* Error */, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),
6626
- The_declaration_was_marked_as_deprecated_here: diag(2798, 1 /* Error */, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."),
6633
+ The_declaration_was_marked_as_deprecated_here_Colon: diag(2798, 1 /* Error */, "The_declaration_was_marked_as_deprecated_here_Colon_2798", "The declaration was marked as deprecated here:"),
6627
6634
  Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, 1 /* Error */, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."),
6628
6635
  Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, 1 /* Error */, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."),
6629
6636
  This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, 1 /* Error */, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."),
@@ -7060,8 +7067,8 @@ var Diagnostics = {
7060
7067
  Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, 1 /* Error */, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"),
7061
7068
  Conflicts_are_in_this_file: diag(6201, 3 /* Message */, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."),
7062
7069
  Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, 1 /* Error */, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"),
7063
- _0_was_also_declared_here: diag(6203, 3 /* Message */, "_0_was_also_declared_here_6203", "'{0}' was also declared here."),
7064
- and_here: diag(6204, 3 /* Message */, "and_here_6204", "and here."),
7070
+ _0_was_also_declared_here_Colon: diag(6203, 3 /* Message */, "_0_was_also_declared_here_Colon_6203", "'{0}' was also declared here:"),
7071
+ and_here_Colon: diag(6204, 3 /* Message */, "and_here_Colon_6204", "and here:"),
7065
7072
  All_type_parameters_are_unused: diag(6205, 1 /* Error */, "All_type_parameters_are_unused_6205", "All type parameters are unused."),
7066
7073
  package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, 3 /* Message */, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."),
7067
7074
  package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, 3 /* Message */, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),
@@ -7465,6 +7472,7 @@ var Diagnostics = {
7465
7472
  Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."),
7466
7473
  Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."),
7467
7474
  Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."),
7475
+ Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."),
7468
7476
  Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."),
7469
7477
  JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."),
7470
7478
  JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),
@@ -7480,7 +7488,7 @@ var Diagnostics = {
7480
7488
  You_cannot_rename_a_module_via_a_global_import: diag(8031, 1 /* Error */, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."),
7481
7489
  Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, 1 /* Error */, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),
7482
7490
  A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, 1 /* Error */, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."),
7483
- The_tag_was_first_specified_here: diag(8034, 1 /* Error */, "The_tag_was_first_specified_here_8034", "The tag was first specified here."),
7491
+ The_tag_was_first_specified_here_Colon: diag(8034, 1 /* Error */, "The_tag_was_first_specified_here_Colon_8034", "The tag was first specified here:"),
7484
7492
  You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."),
7485
7493
  You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."),
7486
7494
  Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."),
@@ -14741,7 +14749,7 @@ function isNightly() {
14741
14749
  }
14742
14750
  function createTextWriter(newLine) {
14743
14751
  var output;
14744
- var indent2;
14752
+ var indent;
14745
14753
  var lineStart;
14746
14754
  var lineCount;
14747
14755
  var linePos;
@@ -14759,7 +14767,7 @@ function createTextWriter(newLine) {
14759
14767
  function writeText(s) {
14760
14768
  if (s && s.length) {
14761
14769
  if (lineStart) {
14762
- s = getIndentString(indent2) + s;
14770
+ s = getIndentString(indent) + s;
14763
14771
  lineStart = false;
14764
14772
  }
14765
14773
  output += s;
@@ -14778,7 +14786,7 @@ function createTextWriter(newLine) {
14778
14786
  }
14779
14787
  function reset() {
14780
14788
  output = "";
14781
- indent2 = 0;
14789
+ indent = 0;
14782
14790
  lineStart = true;
14783
14791
  lineCount = 0;
14784
14792
  linePos = 0;
@@ -14815,15 +14823,15 @@ function createTextWriter(newLine) {
14815
14823
  writeLiteral,
14816
14824
  writeLine,
14817
14825
  increaseIndent: () => {
14818
- indent2++;
14826
+ indent++;
14819
14827
  },
14820
14828
  decreaseIndent: () => {
14821
- indent2--;
14829
+ indent--;
14822
14830
  },
14823
- getIndent: () => indent2,
14831
+ getIndent: () => indent,
14824
14832
  getTextPos: () => output.length,
14825
14833
  getLine: () => lineCount,
14826
- getColumn: () => lineStart ? indent2 * getIndentSize() : output.length - linePos,
14834
+ getColumn: () => lineStart ? indent * getIndentSize() : output.length - linePos,
14827
14835
  getText: () => output,
14828
14836
  isAtStartOfLine: () => lineStart,
14829
14837
  hasTrailingComment: () => hasTrailingComment,
@@ -26594,7 +26602,8 @@ var Parser;
26594
26602
  nextToken();
26595
26603
  const statements = parseList(0 /* SourceElements */, parseStatement);
26596
26604
  Debug.assert(token() === 1 /* EndOfFileToken */);
26597
- const endOfFileToken = addJSDocComment(parseTokenNode());
26605
+ const endHasJSDoc = hasPrecedingJSDocComment();
26606
+ const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc);
26598
26607
  const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2);
26599
26608
  processCommentPragmas(sourceFile, sourceText);
26600
26609
  processPragmasIntoFields(sourceFile, reportPragmaDiagnostic);
@@ -26614,11 +26623,11 @@ var Parser;
26614
26623
  parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic));
26615
26624
  }
26616
26625
  }
26617
- function withJSDoc(node, hasJSDoc) {
26618
- return hasJSDoc ? addJSDocComment(node) : node;
26619
- }
26620
26626
  let hasDeprecatedTag = false;
26621
- function addJSDocComment(node) {
26627
+ function withJSDoc(node, hasJSDoc) {
26628
+ if (!hasJSDoc) {
26629
+ return node;
26630
+ }
26622
26631
  Debug.assert(!node.jsDoc);
26623
26632
  const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos));
26624
26633
  if (jsDoc.length)
@@ -27079,7 +27088,7 @@ var Parser;
27079
27088
  if (lastError) {
27080
27089
  addRelatedInfo(
27081
27090
  lastError,
27082
- createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind))
27091
+ createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon, tokenToString(openKind), tokenToString(closeKind))
27083
27092
  );
27084
27093
  }
27085
27094
  }
@@ -28667,7 +28676,7 @@ var Parser;
28667
28676
  if (lastError && lastError.code === Diagnostics._0_expected.code) {
28668
28677
  addRelatedInfo(
28669
28678
  lastError,
28670
- createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
28679
+ createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon, "{", "}")
28671
28680
  );
28672
28681
  }
28673
28682
  }
@@ -29133,12 +29142,14 @@ var Parser;
29133
29142
  return arrowExpression;
29134
29143
  }
29135
29144
  const pos = getNodePos();
29145
+ const hasJSDoc = hasPrecedingJSDocComment();
29136
29146
  const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
29137
29147
  if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) {
29138
29148
  return parseSimpleArrowFunctionExpression(
29139
29149
  pos,
29140
29150
  expr,
29141
29151
  allowReturnTypeInArrowFunction,
29152
+ hasJSDoc,
29142
29153
  /*asyncModifier*/
29143
29154
  void 0
29144
29155
  );
@@ -29184,7 +29195,7 @@ var Parser;
29184
29195
  ), pos);
29185
29196
  }
29186
29197
  }
29187
- function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) {
29198
+ function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) {
29188
29199
  Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
29189
29200
  const parameter = factory2.createParameterDeclaration(
29190
29201
  /*modifiers*/
@@ -29217,7 +29228,7 @@ var Parser;
29217
29228
  equalsGreaterThanToken,
29218
29229
  body
29219
29230
  );
29220
- return addJSDocComment(finishNode(node, pos));
29231
+ return withJSDoc(finishNode(node, pos), hasJSDoc);
29221
29232
  }
29222
29233
  function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) {
29223
29234
  const triState = isParenthesizedArrowFunctionExpression();
@@ -29345,9 +29356,10 @@ var Parser;
29345
29356
  if (token() === 134 /* AsyncKeyword */) {
29346
29357
  if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) {
29347
29358
  const pos = getNodePos();
29359
+ const hasJSDoc = hasPrecedingJSDocComment();
29348
29360
  const asyncModifier = parseModifiersForArrowFunction();
29349
29361
  const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
29350
- return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier);
29362
+ return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier);
29351
29363
  }
29352
29364
  }
29353
29365
  return void 0;
@@ -31768,7 +31780,7 @@ var Parser;
31768
31780
  if (lastError && lastError.code === Diagnostics._0_expected.code) {
31769
31781
  addRelatedInfo(
31770
31782
  lastError,
31771
- createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
31783
+ createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon, "{", "}")
31772
31784
  );
31773
31785
  }
31774
31786
  }
@@ -32136,20 +32148,20 @@ var Parser;
32136
32148
  function doJSDocScan() {
32137
32149
  let state = 1 /* SawAsterisk */;
32138
32150
  let margin;
32139
- let indent2 = start - (content.lastIndexOf("\n", start) + 1) + 4;
32151
+ let indent = start - (content.lastIndexOf("\n", start) + 1) + 4;
32140
32152
  function pushComment(text) {
32141
32153
  if (!margin) {
32142
- margin = indent2;
32154
+ margin = indent;
32143
32155
  }
32144
32156
  comments.push(text);
32145
- indent2 += text.length;
32157
+ indent += text.length;
32146
32158
  }
32147
32159
  nextTokenJSDoc();
32148
32160
  while (parseOptionalJsdoc(5 /* WhitespaceTrivia */))
32149
32161
  ;
32150
32162
  if (parseOptionalJsdoc(4 /* NewLineTrivia */)) {
32151
32163
  state = 0 /* BeginningOfLine */;
32152
- indent2 = 0;
32164
+ indent = 0;
32153
32165
  }
32154
32166
  loop:
32155
32167
  while (true) {
@@ -32158,14 +32170,14 @@ var Parser;
32158
32170
  removeTrailingWhitespace(comments);
32159
32171
  if (!commentsPos)
32160
32172
  commentsPos = getNodePos();
32161
- addTag(parseTag(indent2));
32173
+ addTag(parseTag(indent));
32162
32174
  state = 0 /* BeginningOfLine */;
32163
32175
  margin = void 0;
32164
32176
  break;
32165
32177
  case 4 /* NewLineTrivia */:
32166
32178
  comments.push(scanner.getTokenText());
32167
32179
  state = 0 /* BeginningOfLine */;
32168
- indent2 = 0;
32180
+ indent = 0;
32169
32181
  break;
32170
32182
  case 42 /* AsteriskToken */:
32171
32183
  const asterisk = scanner.getTokenText();
@@ -32175,16 +32187,16 @@ var Parser;
32175
32187
  } else {
32176
32188
  Debug.assert(state === 0 /* BeginningOfLine */);
32177
32189
  state = 1 /* SawAsterisk */;
32178
- indent2 += asterisk.length;
32190
+ indent += asterisk.length;
32179
32191
  }
32180
32192
  break;
32181
32193
  case 5 /* WhitespaceTrivia */:
32182
32194
  Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text");
32183
32195
  const whitespace = scanner.getTokenText();
32184
- if (margin !== void 0 && indent2 + whitespace.length > margin) {
32185
- comments.push(whitespace.slice(margin - indent2));
32196
+ if (margin !== void 0 && indent + whitespace.length > margin) {
32197
+ comments.push(whitespace.slice(margin - indent));
32186
32198
  }
32187
- indent2 += whitespace.length;
32199
+ indent += whitespace.length;
32188
32200
  break;
32189
32201
  case 1 /* EndOfFileToken */:
32190
32202
  break loop;
@@ -32386,7 +32398,7 @@ var Parser;
32386
32398
  }
32387
32399
  return parseTagComments(margin, indentText.slice(margin));
32388
32400
  }
32389
- function parseTagComments(indent2, initialMargin) {
32401
+ function parseTagComments(indent, initialMargin) {
32390
32402
  const commentsPos2 = getNodePos();
32391
32403
  let comments2 = [];
32392
32404
  const parts2 = [];
@@ -32395,10 +32407,10 @@ var Parser;
32395
32407
  let margin;
32396
32408
  function pushComment(text) {
32397
32409
  if (!margin) {
32398
- margin = indent2;
32410
+ margin = indent;
32399
32411
  }
32400
32412
  comments2.push(text);
32401
- indent2 += text.length;
32413
+ indent += text.length;
32402
32414
  }
32403
32415
  if (initialMargin !== void 0) {
32404
32416
  if (initialMargin !== "") {
@@ -32413,7 +32425,7 @@ var Parser;
32413
32425
  case 4 /* NewLineTrivia */:
32414
32426
  state = 0 /* BeginningOfLine */;
32415
32427
  comments2.push(scanner.getTokenText());
32416
- indent2 = 0;
32428
+ indent = 0;
32417
32429
  break;
32418
32430
  case 60 /* AtToken */:
32419
32431
  scanner.resetTokenState(scanner.getTokenEnd() - 1);
@@ -32423,11 +32435,11 @@ var Parser;
32423
32435
  case 5 /* WhitespaceTrivia */:
32424
32436
  Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text");
32425
32437
  const whitespace = scanner.getTokenText();
32426
- if (margin !== void 0 && indent2 + whitespace.length > margin) {
32427
- comments2.push(whitespace.slice(margin - indent2));
32438
+ if (margin !== void 0 && indent + whitespace.length > margin) {
32439
+ comments2.push(whitespace.slice(margin - indent));
32428
32440
  state = 2 /* SavingComments */;
32429
32441
  }
32430
- indent2 += whitespace.length;
32442
+ indent += whitespace.length;
32431
32443
  break;
32432
32444
  case 19 /* OpenBraceToken */:
32433
32445
  state = 2 /* SavingComments */;
@@ -32460,7 +32472,7 @@ var Parser;
32460
32472
  case 42 /* AsteriskToken */:
32461
32473
  if (state === 0 /* BeginningOfLine */) {
32462
32474
  state = 1 /* SawAsterisk */;
32463
- indent2 += 1;
32475
+ indent += 1;
32464
32476
  break;
32465
32477
  }
32466
32478
  default:
@@ -32525,8 +32537,8 @@ var Parser;
32525
32537
  function isJSDocLinkTag(kind) {
32526
32538
  return kind === "link" || kind === "linkcode" || kind === "linkplain";
32527
32539
  }
32528
- function parseUnknownTag(start2, tagName, indent2, indentText) {
32529
- return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2);
32540
+ function parseUnknownTag(start2, tagName, indent, indentText) {
32541
+ return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent, indentText)), start2);
32530
32542
  }
32531
32543
  function addTag(tag) {
32532
32544
  if (!tag) {
@@ -32573,7 +32585,7 @@ var Parser;
32573
32585
  return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments;
32574
32586
  }
32575
32587
  }
32576
- function parseParameterOrPropertyTag(start2, tagName, target, indent2) {
32588
+ function parseParameterOrPropertyTag(start2, tagName, target, indent) {
32577
32589
  let typeExpression = tryParseTypeExpression();
32578
32590
  let isNameFirst = !typeExpression;
32579
32591
  skipWhitespaceOrAsterisk();
@@ -32582,8 +32594,8 @@ var Parser;
32582
32594
  if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) {
32583
32595
  typeExpression = tryParseTypeExpression();
32584
32596
  }
32585
- const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText);
32586
- const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2);
32597
+ const comment = parseTrailingTagComments(start2, getNodePos(), indent, indentText);
32598
+ const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent);
32587
32599
  if (nestedTypeLiteral) {
32588
32600
  typeExpression = nestedTypeLiteral;
32589
32601
  isNameFirst = true;
@@ -32591,12 +32603,12 @@ var Parser;
32591
32603
  const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment);
32592
32604
  return finishNode(result2, start2);
32593
32605
  }
32594
- function parseNestedTypeLiteral(typeExpression, name, target, indent2) {
32606
+ function parseNestedTypeLiteral(typeExpression, name, target, indent) {
32595
32607
  if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) {
32596
32608
  const pos = getNodePos();
32597
32609
  let child;
32598
32610
  let children;
32599
- while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) {
32611
+ while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent, name))) {
32600
32612
  if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) {
32601
32613
  children = append(children, child);
32602
32614
  } else if (child.kind === 352 /* JSDocTemplateTag */) {
@@ -32609,14 +32621,14 @@ var Parser;
32609
32621
  }
32610
32622
  }
32611
32623
  }
32612
- function parseReturnTag(start2, tagName, indent2, indentText) {
32624
+ function parseReturnTag(start2, tagName, indent, indentText) {
32613
32625
  if (some(tags, isJSDocReturnTag)) {
32614
32626
  parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
32615
32627
  }
32616
32628
  const typeExpression = tryParseTypeExpression();
32617
- return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2);
32629
+ return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent, indentText)), start2);
32618
32630
  }
32619
- function parseTypeTag(start2, tagName, indent2, indentText) {
32631
+ function parseTypeTag(start2, tagName, indent, indentText) {
32620
32632
  if (some(tags, isJSDocTypeTag)) {
32621
32633
  parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
32622
32634
  }
@@ -32624,25 +32636,25 @@ var Parser;
32624
32636
  /*mayOmitBraces*/
32625
32637
  true
32626
32638
  );
32627
- const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent2, indentText) : void 0;
32639
+ const comments2 = indent !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent, indentText) : void 0;
32628
32640
  return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start2);
32629
32641
  }
32630
- function parseSeeTag(start2, tagName, indent2, indentText) {
32642
+ function parseSeeTag(start2, tagName, indent, indentText) {
32631
32643
  const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner.getTokenValue()));
32632
32644
  const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference();
32633
- const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent2, indentText) : void 0;
32645
+ const comments2 = indent !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent, indentText) : void 0;
32634
32646
  return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start2);
32635
32647
  }
32636
- function parseThrowsTag(start2, tagName, indent2, indentText) {
32648
+ function parseThrowsTag(start2, tagName, indent, indentText) {
32637
32649
  const typeExpression = tryParseTypeExpression();
32638
- const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText);
32650
+ const comment = parseTrailingTagComments(start2, getNodePos(), indent, indentText);
32639
32651
  return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start2);
32640
32652
  }
32641
- function parseAuthorTag(start2, tagName, indent2, indentText) {
32653
+ function parseAuthorTag(start2, tagName, indent, indentText) {
32642
32654
  const commentStart = getNodePos();
32643
32655
  const textOnly = parseAuthorNameAndEmail();
32644
32656
  let commentEnd = scanner.getTokenFullStart();
32645
- const comments2 = parseTrailingTagComments(start2, commentEnd, indent2, indentText);
32657
+ const comments2 = parseTrailingTagComments(start2, commentEnd, indent, indentText);
32646
32658
  if (!comments2) {
32647
32659
  commentEnd = scanner.getTokenFullStart();
32648
32660
  }
@@ -32726,19 +32738,19 @@ var Parser;
32726
32738
  skipWhitespace();
32727
32739
  return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2);
32728
32740
  }
32729
- function parseTypedefTag(start2, tagName, indent2, indentText) {
32741
+ function parseTypedefTag(start2, tagName, indent, indentText) {
32730
32742
  let typeExpression = tryParseTypeExpression();
32731
32743
  skipWhitespaceOrAsterisk();
32732
32744
  const fullName = parseJSDocTypeNameWithNamespace();
32733
32745
  skipWhitespace();
32734
- let comment = parseTagComments(indent2);
32746
+ let comment = parseTagComments(indent);
32735
32747
  let end2;
32736
32748
  if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) {
32737
32749
  let child;
32738
32750
  let childTypeTag;
32739
32751
  let jsDocPropertyTags;
32740
32752
  let hasChildren = false;
32741
- while (child = tryParse(() => parseChildPropertyTag(indent2))) {
32753
+ while (child = tryParse(() => parseChildPropertyTag(indent))) {
32742
32754
  if (child.kind === 352 /* JSDocTemplateTag */) {
32743
32755
  break;
32744
32756
  }
@@ -32747,7 +32759,7 @@ var Parser;
32747
32759
  if (childTypeTag) {
32748
32760
  const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
32749
32761
  if (lastError) {
32750
- addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here));
32762
+ addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here_Colon));
32751
32763
  }
32752
32764
  break;
32753
32765
  } else {
@@ -32766,7 +32778,7 @@ var Parser;
32766
32778
  }
32767
32779
  end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end;
32768
32780
  if (!comment) {
32769
- comment = parseTrailingTagComments(start2, end2, indent2, indentText);
32781
+ comment = parseTrailingTagComments(start2, end2, indent, indentText);
32770
32782
  }
32771
32783
  const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment);
32772
32784
  return finishNode(typedefTag, start2, end2);
@@ -32796,11 +32808,11 @@ var Parser;
32796
32808
  }
32797
32809
  return typeNameOrNamespaceName;
32798
32810
  }
32799
- function parseCallbackTagParameters(indent2) {
32811
+ function parseCallbackTagParameters(indent) {
32800
32812
  const pos = getNodePos();
32801
32813
  let child;
32802
32814
  let parameters;
32803
- while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) {
32815
+ while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent))) {
32804
32816
  if (child.kind === 352 /* JSDocTemplateTag */) {
32805
32817
  parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);
32806
32818
  break;
@@ -32809,11 +32821,11 @@ var Parser;
32809
32821
  }
32810
32822
  return createNodeArray(parameters || [], pos);
32811
32823
  }
32812
- function parseJSDocSignature(start2, indent2) {
32813
- const parameters = parseCallbackTagParameters(indent2);
32824
+ function parseJSDocSignature(start2, indent) {
32825
+ const parameters = parseCallbackTagParameters(indent);
32814
32826
  const returnTag = tryParse(() => {
32815
32827
  if (parseOptionalJsdoc(60 /* AtToken */)) {
32816
- const tag = parseTag(indent2);
32828
+ const tag = parseTag(indent);
32817
32829
  if (tag && tag.kind === 349 /* JSDocReturnTag */) {
32818
32830
  return tag;
32819
32831
  }
@@ -32826,23 +32838,23 @@ var Parser;
32826
32838
  returnTag
32827
32839
  ), start2);
32828
32840
  }
32829
- function parseCallbackTag(start2, tagName, indent2, indentText) {
32841
+ function parseCallbackTag(start2, tagName, indent, indentText) {
32830
32842
  const fullName = parseJSDocTypeNameWithNamespace();
32831
32843
  skipWhitespace();
32832
- let comment = parseTagComments(indent2);
32833
- const typeExpression = parseJSDocSignature(start2, indent2);
32844
+ let comment = parseTagComments(indent);
32845
+ const typeExpression = parseJSDocSignature(start2, indent);
32834
32846
  if (!comment) {
32835
- comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText);
32847
+ comment = parseTrailingTagComments(start2, getNodePos(), indent, indentText);
32836
32848
  }
32837
32849
  const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
32838
32850
  return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start2, end2);
32839
32851
  }
32840
- function parseOverloadTag(start2, tagName, indent2, indentText) {
32852
+ function parseOverloadTag(start2, tagName, indent, indentText) {
32841
32853
  skipWhitespace();
32842
- let comment = parseTagComments(indent2);
32843
- const typeExpression = parseJSDocSignature(start2, indent2);
32854
+ let comment = parseTagComments(indent);
32855
+ const typeExpression = parseJSDocSignature(start2, indent);
32844
32856
  if (!comment) {
32845
- comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText);
32857
+ comment = parseTrailingTagComments(start2, getNodePos(), indent, indentText);
32846
32858
  }
32847
32859
  const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
32848
32860
  return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2);
@@ -32858,17 +32870,17 @@ var Parser;
32858
32870
  }
32859
32871
  return a.escapedText === b.escapedText;
32860
32872
  }
32861
- function parseChildPropertyTag(indent2) {
32862
- return parseChildParameterOrPropertyTag(1 /* Property */, indent2);
32873
+ function parseChildPropertyTag(indent) {
32874
+ return parseChildParameterOrPropertyTag(1 /* Property */, indent);
32863
32875
  }
32864
- function parseChildParameterOrPropertyTag(target, indent2, name) {
32876
+ function parseChildParameterOrPropertyTag(target, indent, name) {
32865
32877
  let canParseTag = true;
32866
32878
  let seenAsterisk = false;
32867
32879
  while (true) {
32868
32880
  switch (nextTokenJSDoc()) {
32869
32881
  case 60 /* AtToken */:
32870
32882
  if (canParseTag) {
32871
- const child = tryParseChildTag(target, indent2);
32883
+ const child = tryParseChildTag(target, indent);
32872
32884
  if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
32873
32885
  return false;
32874
32886
  }
@@ -32894,7 +32906,7 @@ var Parser;
32894
32906
  }
32895
32907
  }
32896
32908
  }
32897
- function tryParseChildTag(target, indent2) {
32909
+ function tryParseChildTag(target, indent) {
32898
32910
  Debug.assert(token() === 60 /* AtToken */);
32899
32911
  const start2 = scanner.getTokenFullStart();
32900
32912
  nextTokenJSDoc();
@@ -32914,14 +32926,14 @@ var Parser;
32914
32926
  t = 2 /* Parameter */ | 4 /* CallbackParameter */;
32915
32927
  break;
32916
32928
  case "template":
32917
- return parseTemplateTag(start2, tagName, indent2, indentText);
32929
+ return parseTemplateTag(start2, tagName, indent, indentText);
32918
32930
  default:
32919
32931
  return false;
32920
32932
  }
32921
32933
  if (!(target & t)) {
32922
32934
  return false;
32923
32935
  }
32924
- return parseParameterOrPropertyTag(start2, tagName, target, indent2);
32936
+ return parseParameterOrPropertyTag(start2, tagName, target, indent);
32925
32937
  }
32926
32938
  function parseTemplateTagTypeParameter() {
32927
32939
  const typeParameterPos = getNodePos();
@@ -32962,10 +32974,10 @@ var Parser;
32962
32974
  } while (parseOptionalJsdoc(28 /* CommaToken */));
32963
32975
  return createNodeArray(typeParameters, pos);
32964
32976
  }
32965
- function parseTemplateTag(start2, tagName, indent2, indentText) {
32977
+ function parseTemplateTag(start2, tagName, indent, indentText) {
32966
32978
  const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0;
32967
32979
  const typeParameters = parseTemplateTagTypeParameters();
32968
- return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2);
32980
+ return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent, indentText)), start2);
32969
32981
  }
32970
32982
  function parseOptionalJsdoc(t) {
32971
32983
  if (token() === t) {
@@ -39471,10 +39483,10 @@ function createBinder() {
39471
39483
  const decl = getNameOfDeclaration(declaration) || declaration;
39472
39484
  const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message);
39473
39485
  file.bindDiagnostics.push(
39474
- multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3
39486
+ multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here_Colon : Diagnostics.and_here_Colon)) : diag3
39475
39487
  );
39476
39488
  if (multipleDefaultExports) {
39477
- relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here));
39489
+ relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here_Colon));
39478
39490
  }
39479
39491
  });
39480
39492
  const diag2 = messageNeedsName ? createDiagnosticForNode2(declarationName, message, getDisplayName(node)) : createDiagnosticForNode2(declarationName, message);
@@ -44012,7 +44024,7 @@ function createTypeChecker(host) {
44012
44024
  if (deprecatedTag) {
44013
44025
  addRelatedInfo(
44014
44026
  diagnostic,
44015
- createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here)
44027
+ createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here_Colon)
44016
44028
  );
44017
44029
  }
44018
44030
  suggestionDiagnostics.add(diagnostic);
@@ -44207,8 +44219,8 @@ function createTypeChecker(host) {
44207
44219
  if (adjustedNode === errorNode)
44208
44220
  continue;
44209
44221
  err.relatedInformation = err.relatedInformation || [];
44210
- const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here, symbolName2);
44211
- const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here);
44222
+ const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here_Colon, symbolName2);
44223
+ const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here_Colon);
44212
44224
  if (length(err.relatedInformation) >= 5 || some(err.relatedInformation, (r) => compareDiagnostics(r, followOnMessage) === 0 /* EqualTo */ || compareDiagnostics(r, leadingMessage) === 0 /* EqualTo */))
44213
44225
  continue;
44214
44226
  addRelatedInfo(err, !length(err.relatedInformation) ? leadingMessage : followOnMessage);
@@ -44819,7 +44831,7 @@ function createTypeChecker(host) {
44819
44831
  if (suggestion.valueDeclaration) {
44820
44832
  addRelatedInfo(
44821
44833
  diagnostic,
44822
- createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
44834
+ createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here_Colon, suggestionName)
44823
44835
  );
44824
44836
  }
44825
44837
  }
@@ -44881,7 +44893,7 @@ function createTypeChecker(host) {
44881
44893
  diagnostic,
44882
44894
  createDiagnosticForNode(
44883
44895
  typeOnlyDeclaration,
44884
- typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here,
44896
+ typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here_Colon : Diagnostics._0_was_imported_here_Colon,
44885
44897
  unescapedName
44886
44898
  )
44887
44899
  );
@@ -45018,7 +45030,7 @@ function createTypeChecker(host) {
45018
45030
  return true;
45019
45031
  }
45020
45032
  }
45021
- error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name));
45033
+ error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_Colon, unescapeLeadingUnderscores(name));
45022
45034
  return true;
45023
45035
  }
45024
45036
  }
@@ -45060,7 +45072,7 @@ function createTypeChecker(host) {
45060
45072
  if (isExtendedByInterface(errorLocation)) {
45061
45073
  error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
45062
45074
  } else {
45063
- error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
45075
+ error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon, unescapeLeadingUnderscores(name));
45064
45076
  }
45065
45077
  return true;
45066
45078
  }
@@ -45083,7 +45095,7 @@ function createTypeChecker(host) {
45083
45095
  } else if (maybeMappedType(errorLocation, symbol)) {
45084
45096
  error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K");
45085
45097
  } else {
45086
- error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName);
45098
+ error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon, rawName);
45087
45099
  }
45088
45100
  return true;
45089
45101
  }
@@ -45189,7 +45201,7 @@ function createTypeChecker(host) {
45189
45201
  if (diagnosticMessage) {
45190
45202
  addRelatedInfo(
45191
45203
  diagnosticMessage,
45192
- createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)
45204
+ createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here_Colon, declarationName)
45193
45205
  );
45194
45206
  }
45195
45207
  }
@@ -45257,7 +45269,7 @@ function createTypeChecker(host) {
45257
45269
  const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node));
45258
45270
  const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */;
45259
45271
  const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
45260
- const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here;
45272
+ const relatedMessage = isExport ? Diagnostics._0_was_exported_here_Colon : Diagnostics._0_was_imported_here_Colon;
45261
45273
  const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText);
45262
45274
  addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name));
45263
45275
  }
@@ -45579,7 +45591,7 @@ function createTypeChecker(host) {
45579
45591
  if (suggestion.valueDeclaration) {
45580
45592
  addRelatedInfo(
45581
45593
  diagnostic,
45582
- createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
45594
+ createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here_Colon, suggestionName)
45583
45595
  );
45584
45596
  }
45585
45597
  } else {
@@ -45609,7 +45621,7 @@ function createTypeChecker(host) {
45609
45621
  if (localSymbol.declarations) {
45610
45622
  addRelatedInfo(
45611
45623
  diagnostic,
45612
- ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))
45624
+ ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here_Colon : Diagnostics.and_here_Colon, declarationName))
45613
45625
  );
45614
45626
  }
45615
45627
  }
@@ -51654,11 +51666,11 @@ function createTypeChecker(host) {
51654
51666
  const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration;
51655
51667
  addRelatedInfo(
51656
51668
  error(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName),
51657
- createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName)
51669
+ createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here_Colon, unescapedName)
51658
51670
  );
51659
51671
  addRelatedInfo(
51660
51672
  error(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName),
51661
- createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName)
51673
+ createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here_Colon, unescapedName)
51662
51674
  );
51663
51675
  }
51664
51676
  const union = createSymbol(s.flags | exportedMember.flags, name);
@@ -52893,7 +52905,7 @@ function createTypeChecker(host) {
52893
52905
  if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
52894
52906
  const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
52895
52907
  const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
52896
- forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
52908
+ forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here_Colon, name));
52897
52909
  error(declName || decl, Diagnostics.Duplicate_property_0, name);
52898
52910
  lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);
52899
52911
  }
@@ -55258,7 +55270,7 @@ function createTypeChecker(host) {
55258
55270
  return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray;
55259
55271
  }
55260
55272
  const node = type.node;
55261
- const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, (element) => removeMissingType(getTypeFromTypeNode(element), element.kind === 190 /* OptionalType */));
55273
+ const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);
55262
55274
  if (popTypeResolution()) {
55263
55275
  type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
55264
55276
  } else {
@@ -57805,7 +57817,7 @@ function createTypeChecker(host) {
57805
57817
  if (moduleSymbol.flags & targetMeaning) {
57806
57818
  links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning);
57807
57819
  } else {
57808
- const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;
57820
+ const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_Colon : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;
57809
57821
  error(node, errorMessage, node.argument.literal.text);
57810
57822
  links.resolvedSymbol = unknownSymbol;
57811
57823
  links.resolvedType = errorType;
@@ -61566,7 +61578,7 @@ function createTypeChecker(host) {
61566
61578
  );
61567
61579
  reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2));
61568
61580
  if (length(unmatchedProperty.declarations)) {
61569
- associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName));
61581
+ associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here_Colon, propName));
61570
61582
  }
61571
61583
  if (shouldSkipElaboration && errorInfo) {
61572
61584
  overrideNextErrorInfo++;
@@ -69341,7 +69353,7 @@ function createTypeChecker(host) {
69341
69353
  if (diagnosticMessage) {
69342
69354
  addRelatedInfo(
69343
69355
  diagnosticMessage,
69344
- createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)
69356
+ createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here_Colon, declarationName)
69345
69357
  );
69346
69358
  }
69347
69359
  }
@@ -69428,7 +69440,7 @@ function createTypeChecker(host) {
69428
69440
  const suggestedName = symbolName(suggestion);
69429
69441
  const message = isUncheckedJS ? Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2;
69430
69442
  errorInfo = chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);
69431
- relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName);
69443
+ relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here_Colon, suggestedName);
69432
69444
  } else {
69433
69445
  const diagnostic = containerSeemsToBeEmptyDomElement(containingType) ? Diagnostics.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom : Diagnostics.Property_0_does_not_exist_on_type_1;
69434
69446
  errorInfo = chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container);
@@ -70145,7 +70157,7 @@ function createTypeChecker(host) {
70145
70157
  const diag2 = createDiagnosticForNode(node.tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount);
70146
70158
  const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration;
70147
70159
  if (tagNameDeclaration) {
70148
- addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName)));
70160
+ addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here_Colon, entityNameToString(node.tagName)));
70149
70161
  }
70150
70162
  if (errorOutputContainer && errorOutputContainer.skipLogging) {
70151
70163
  (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
@@ -70597,7 +70609,7 @@ function createTypeChecker(host) {
70597
70609
  if (diags) {
70598
70610
  for (const d of diags) {
70599
70611
  if (last2.declaration && candidatesForArgumentError.length > 3) {
70600
- addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here));
70612
+ addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here_Colon));
70601
70613
  }
70602
70614
  addImplementationSuccessElaboration(last2, d);
70603
70615
  diagnostics.add(d);
@@ -75737,7 +75749,7 @@ function createTypeChecker(host) {
75737
75749
  const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;
75738
75750
  addRelatedInfo(
75739
75751
  error(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
75740
- createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)
75752
+ createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here_Colon)
75741
75753
  );
75742
75754
  break;
75743
75755
  }
@@ -76203,7 +76215,7 @@ function createTypeChecker(host) {
76203
76215
  const diag2 = error(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled);
76204
76216
  const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration);
76205
76217
  if (aliasDeclaration) {
76206
- addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName)));
76218
+ addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here_Colon, idText(rootName)));
76207
76219
  }
76208
76220
  }
76209
76221
  }
@@ -77147,7 +77159,7 @@ function createTypeChecker(host) {
77147
77159
  if (firstDeclaration) {
77148
77160
  addRelatedInfo(
77149
77161
  err,
77150
- createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)
77162
+ createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here_Colon, declName)
77151
77163
  );
77152
77164
  }
77153
77165
  }
@@ -78257,7 +78269,7 @@ function createTypeChecker(host) {
78257
78269
  typeToString(info.type)
78258
78270
  );
78259
78271
  if (propDeclaration && errorNode !== propDeclaration) {
78260
- addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop)));
78272
+ addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here_Colon, symbolToString(prop)));
78261
78273
  }
78262
78274
  diagnostics.add(diagnostic);
78263
78275
  }
@@ -82592,7 +82604,7 @@ function createTypeChecker(host) {
82592
82604
  createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here)
82593
82605
  );
82594
82606
  });
82595
- const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here));
82607
+ const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here_Colon) : createDiagnosticForNode(parameter, Diagnostics.and_here_Colon));
82596
82608
  addRelatedInfo(error(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2);
82597
82609
  return true;
82598
82610
  }
@@ -114699,7 +114711,7 @@ var gutterSeparator = " ";
114699
114711
  var resetEscapeSequence = "\x1B[0m";
114700
114712
  var ellipsis = "...";
114701
114713
  var halfIndent = " ";
114702
- var indent = " ";
114714
+ var bullet = "\u25CF ";
114703
114715
  function getCategoryFormat(category) {
114704
114716
  switch (category) {
114705
114717
  case 1 /* Error */:
@@ -114715,39 +114727,49 @@ function getCategoryFormat(category) {
114715
114727
  function formatColorAndReset(text, formatStyle) {
114716
114728
  return formatStyle + text + resetEscapeSequence;
114717
114729
  }
114718
- function formatCodeSpan(file, start, length2, indent2, squiggleColor, host) {
114730
+ function formatCodeSpan(file, start, length2, indent, underlineColor, host) {
114719
114731
  const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start);
114720
114732
  const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start + length2);
114721
114733
  const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line;
114734
+ const gutterWidth = 1;
114722
114735
  const hasMoreThanFiveLines = lastLine - firstLine >= 4;
114723
- let gutterWidth = (lastLine + 1 + "").length;
114724
- if (hasMoreThanFiveLines) {
114725
- gutterWidth = Math.max(ellipsis.length, gutterWidth);
114736
+ let whitespaceToTrim = Number.MAX_VALUE;
114737
+ for (let i = firstLine; i <= lastLine; i++) {
114738
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
114739
+ i = lastLine - 1;
114740
+ }
114741
+ const lineStart = getPositionOfLineAndCharacter(file, i, 0);
114742
+ const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
114743
+ const lineContent = file.text.slice(lineStart, lineEnd);
114744
+ whitespaceToTrim = Math.min(whitespaceToTrim, startWhitespaceCount(lineContent));
114726
114745
  }
114727
114746
  let context = "";
114728
114747
  for (let i = firstLine; i <= lastLine; i++) {
114729
114748
  context += host.getNewLine();
114730
114749
  if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
114731
- context += indent2 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
114750
+ context += indent + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
114732
114751
  i = lastLine - 1;
114733
114752
  }
114734
114753
  const lineStart = getPositionOfLineAndCharacter(file, i, 0);
114735
114754
  const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
114736
114755
  let lineContent = file.text.slice(lineStart, lineEnd);
114756
+ lineContent = lineContent.slice(whitespaceToTrim);
114737
114757
  lineContent = trimStringEnd(lineContent);
114738
114758
  lineContent = lineContent.replace(/\t/g, " ");
114739
- context += indent2 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
114759
+ const gutterLine = "|";
114760
+ context += indent + padLeft(gutterLine, gutterWidth) + gutterSeparator;
114740
114761
  context += lineContent + host.getNewLine();
114741
- context += indent2 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
114742
- context += squiggleColor;
114762
+ context += indent + padLeft("", gutterWidth) + gutterSeparator;
114763
+ context += underlineColor;
114743
114764
  if (i === firstLine) {
114744
114765
  const lastCharForLine = i === lastLine ? lastLineChar : void 0;
114745
- context += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
114746
- context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
114766
+ context += lineContent.slice(0, firstLineChar - whitespaceToTrim).replace(/\S/g, " ");
114767
+ const amendedLastChar = lastCharForLine ? lastCharForLine - whitespaceToTrim : void 0;
114768
+ context += lineContent.slice(firstLineChar - whitespaceToTrim, amendedLastChar).replace(/./g, "\u2594");
114747
114769
  } else if (i === lastLine) {
114748
- context += lineContent.slice(0, lastLineChar).replace(/./g, "~");
114770
+ context += lineContent.slice(0, lastLineChar).replace(/./g, "\u2594");
114749
114771
  } else {
114750
- context += lineContent.replace(/./g, "~");
114772
+ context += lineContent.replace(/./g, "\u2594");
114751
114773
  }
114752
114774
  context += resetEscapeSequence;
114753
114775
  }
@@ -114765,54 +114787,87 @@ function formatLocation(file, start, host, color = formatColorAndReset) {
114765
114787
  return output;
114766
114788
  }
114767
114789
  function formatDiagnosticsWithColorAndContext(diagnostics, host) {
114790
+ var _a, _b;
114791
+ const terminalWidth = ((_b = (_a = sys).getWidthOfTerminal) == null ? void 0 : _b.call(_a)) ?? 0;
114792
+ const indent = terminalWidth < 60 ? "" : halfIndent;
114768
114793
  let output = "";
114769
114794
  for (const diagnostic of diagnostics) {
114770
- if (diagnostic.file) {
114771
- const { file, start } = diagnostic;
114772
- output += formatLocation(file, start, host);
114773
- output += " - ";
114774
- }
114775
- output += formatColorAndReset(diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
114776
- output += formatColorAndReset(` TS${diagnostic.code}: `, "\x1B[90m" /* Grey */);
114777
- output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
114795
+ const diagnosticCode = "TS" + diagnostic.code;
114796
+ const diagnosticCatName = diagnosticCategoryName(
114797
+ diagnostic,
114798
+ /*lowerCase*/
114799
+ false
114800
+ );
114801
+ const diagnosticCatNameColored = formatColorAndReset(diagnosticCatName, getCategoryFormat(diagnostic.category));
114778
114802
  if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {
114803
+ const { file, start } = diagnostic;
114804
+ const location = formatLocation(file, start, host);
114805
+ const locationLength = location.replace(/\u001b[[0-9]+m/g, "").length;
114806
+ const codeLength = diagnosticCode.length;
114807
+ output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + location;
114808
+ const defaultPad = codeLength + 1;
114809
+ let padWidth = terminalWidth < 60 ? defaultPad : terminalWidth - (bullet.length + locationLength + codeLength + diagnosticCatName.length + 2);
114810
+ if (padWidth < diagnosticCode.length)
114811
+ padWidth = defaultPad;
114812
+ output += padLeft(diagnosticCatNameColored, padWidth + (diagnosticCatNameColored.length - diagnosticCatName.length));
114813
+ output += " " + diagnosticCode;
114814
+ output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, indent, getCategoryFormat(diagnostic.category), host);
114779
114815
  output += host.getNewLine();
114780
- output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, "", getCategoryFormat(diagnostic.category), host);
114816
+ } else {
114817
+ output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + " " + diagnosticCatNameColored + " " + diagnosticCode;
114781
114818
  }
114819
+ let diagnosticText = flattenDiagnosticMessageText(
114820
+ diagnostic.messageText,
114821
+ host.getNewLine(),
114822
+ 0,
114823
+ /*pretty*/
114824
+ true
114825
+ );
114826
+ diagnosticText = diagnosticText.split(host.getNewLine()).map((text) => indent + text).join(host.getNewLine());
114827
+ output += diagnosticText;
114828
+ output += host.getNewLine();
114782
114829
  if (diagnostic.relatedInformation) {
114783
114830
  output += host.getNewLine();
114784
114831
  for (const { file, start, length: length2, messageText } of diagnostic.relatedInformation) {
114832
+ output += indent + trimStringStart(flattenDiagnosticMessageText(
114833
+ messageText,
114834
+ host.getNewLine(),
114835
+ 0,
114836
+ /*pretty*/
114837
+ true
114838
+ ));
114785
114839
  if (file) {
114840
+ output += " " + formatLocation(file, start, host);
114786
114841
  output += host.getNewLine();
114787
- output += halfIndent + formatLocation(file, start, host);
114788
- output += formatCodeSpan(file, start, length2, indent, "\x1B[96m" /* Cyan */, host);
114842
+ output += formatCodeSpan(file, start, length2, indent + " ", "\x1B[96m" /* Cyan */, host);
114789
114843
  }
114790
- output += host.getNewLine();
114791
- output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine());
114792
114844
  }
114793
114845
  }
114794
- output += host.getNewLine();
114795
114846
  }
114796
114847
  return output;
114797
114848
  }
114798
- function flattenDiagnosticMessageText(diag2, newLine, indent2 = 0) {
114849
+ function flattenDiagnosticMessageText(diag2, newLine, indent = 0, pretty = false) {
114799
114850
  if (isString(diag2)) {
114800
114851
  return diag2;
114801
114852
  } else if (diag2 === void 0) {
114802
114853
  return "";
114803
114854
  }
114804
114855
  let result = "";
114805
- if (indent2) {
114856
+ if (indent) {
114806
114857
  result += newLine;
114807
- for (let i = 0; i < indent2; i++) {
114808
- result += " ";
114809
- }
114858
+ const indentsToReplaceWithNewLines = pretty ? 1 : 0;
114859
+ if (indent > indentsToReplaceWithNewLines) {
114860
+ for (let i = indentsToReplaceWithNewLines; i < indent; i++) {
114861
+ result += " ";
114862
+ }
114863
+ } else
114864
+ result += newLine;
114810
114865
  }
114811
114866
  result += diag2.messageText;
114812
- indent2++;
114867
+ indent++;
114813
114868
  if (diag2.next) {
114814
114869
  for (const kid of diag2.next) {
114815
- result += flattenDiagnosticMessageText(kid, newLine, indent2);
114870
+ result += flattenDiagnosticMessageText(kid, newLine, indent);
114816
114871
  }
114817
114872
  }
114818
114873
  return result;
@@ -115116,8 +115171,8 @@ var plainJSErrors = /* @__PURE__ */ new Set([
115116
115171
  // binder errors
115117
115172
  Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
115118
115173
  Diagnostics.A_module_cannot_have_multiple_default_exports.code,
115119
- Diagnostics.Another_export_default_is_here.code,
115120
- Diagnostics.The_first_export_default_is_here.code,
115174
+ Diagnostics.Another_export_default_is_here_Colon.code,
115175
+ Diagnostics.The_first_export_default_is_here_Colon.code,
115121
115176
  Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,
115122
115177
  Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,
115123
115178
  Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,
@@ -116473,6 +116528,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
116473
116528
  case 265 /* TypeAliasDeclaration */:
116474
116529
  diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files));
116475
116530
  return "skip";
116531
+ case 176 /* Constructor */:
116532
+ case 174 /* MethodDeclaration */:
116533
+ case 262 /* FunctionDeclaration */:
116534
+ if (!node.body) {
116535
+ diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files));
116536
+ return "skip";
116537
+ }
116538
+ return;
116476
116539
  case 266 /* EnumDeclaration */:
116477
116540
  const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */));
116478
116541
  diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword));
@@ -117906,16 +117969,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
117906
117969
  let message2;
117907
117970
  switch (reason.kind) {
117908
117971
  case 3 /* Import */:
117909
- message2 = Diagnostics.File_is_included_via_import_here;
117972
+ message2 = Diagnostics.File_is_included_via_import_here_Colon;
117910
117973
  break;
117911
117974
  case 4 /* ReferenceFile */:
117912
- message2 = Diagnostics.File_is_included_via_reference_here;
117975
+ message2 = Diagnostics.File_is_included_via_reference_here_Colon;
117913
117976
  break;
117914
117977
  case 5 /* TypeReferenceDirective */:
117915
- message2 = Diagnostics.File_is_included_via_type_library_reference_here;
117978
+ message2 = Diagnostics.File_is_included_via_type_library_reference_here_Colon;
117916
117979
  break;
117917
117980
  case 7 /* LibReferenceDirective */:
117918
- message2 = Diagnostics.File_is_included_via_library_reference_here;
117981
+ message2 = Diagnostics.File_is_included_via_library_reference_here_Colon;
117919
117982
  break;
117920
117983
  default:
117921
117984
  Debug.assertNever(reason);
@@ -117939,14 +118002,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
117939
118002
  const matchedByFiles = getMatchedFileSpec(program, fileName);
117940
118003
  if (matchedByFiles) {
117941
118004
  configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles);
117942
- message = Diagnostics.File_is_matched_by_files_list_specified_here;
118005
+ message = Diagnostics.File_is_matched_by_files_list_specified_here_Colon;
117943
118006
  break;
117944
118007
  }
117945
118008
  const matchedByInclude = getMatchedIncludeSpec(program, fileName);
117946
118009
  if (!matchedByInclude || !isString(matchedByInclude))
117947
118010
  return void 0;
117948
118011
  configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
117949
- message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
118012
+ message = Diagnostics.File_is_matched_by_include_pattern_specified_here_Colon;
117950
118013
  break;
117951
118014
  case 1 /* SourceFromProjectReference */:
117952
118015
  case 2 /* OutputFromProjectReference */:
@@ -117967,23 +118030,23 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
117967
118030
  return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(
117968
118031
  sourceFile,
117969
118032
  referencesSyntax.elements[index],
117970
- reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
118033
+ reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here_Colon : Diagnostics.File_is_source_from_referenced_project_specified_here_Colon
117971
118034
  ) : void 0;
117972
118035
  case 8 /* AutomaticTypeDirectiveFile */:
117973
118036
  if (!options.types)
117974
118037
  return void 0;
117975
118038
  configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference);
117976
- message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
118039
+ message = Diagnostics.File_is_entry_point_of_type_library_specified_here_Colon;
117977
118040
  break;
117978
118041
  case 6 /* LibFile */:
117979
118042
  if (reason.index !== void 0) {
117980
118043
  configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]);
117981
- message = Diagnostics.File_is_library_specified_here;
118044
+ message = Diagnostics.File_is_library_specified_here_Colon;
117982
118045
  break;
117983
118046
  }
117984
118047
  const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : void 0);
117985
118048
  configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0;
117986
- message = Diagnostics.File_is_default_library_for_target_specified_here;
118049
+ message = Diagnostics.File_is_default_library_for_target_specified_here_Colon;
117987
118050
  break;
117988
118051
  default:
117989
118052
  Debug.assertNever(reason);