@typescript-deploys/pr-build 5.2.0-pr-54777-9 → 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/tsserver.js CHANGED
@@ -2147,6 +2147,7 @@ __export(server_exports, {
2147
2147
  startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,
2148
2148
  startOnNewLine: () => startOnNewLine,
2149
2149
  startTracing: () => startTracing,
2150
+ startWhitespaceCount: () => startWhitespaceCount,
2150
2151
  startsWith: () => startsWith,
2151
2152
  startsWithDirectory: () => startsWithDirectory,
2152
2153
  startsWithUnderscore: () => startsWithUnderscore,
@@ -2327,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
2327
2328
 
2328
2329
  // src/compiler/corePublic.ts
2329
2330
  var versionMajorMinor = "5.2";
2330
- var version = `${versionMajorMinor}.0-insiders.20230628`;
2331
+ var version = `${versionMajorMinor}.0-insiders.20230703`;
2331
2332
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2333
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2334
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3974,6 +3975,13 @@ function takeWhile(array, predicate) {
3974
3975
  return array.slice(0, index);
3975
3976
  }
3976
3977
  }
3978
+ function startWhitespaceCount(s) {
3979
+ for (let i = 0; i < s.length; i++) {
3980
+ if (!isWhiteSpaceLike(s.charCodeAt(i)))
3981
+ return i;
3982
+ }
3983
+ return s.length;
3984
+ }
3977
3985
  function skipWhile(array, predicate) {
3978
3986
  if (array) {
3979
3987
  const len = array.length;
@@ -9238,7 +9246,7 @@ var Diagnostics = {
9238
9246
  Identifier_expected: diag(1003, 1 /* Error */, "Identifier_expected_1003", "Identifier expected."),
9239
9247
  _0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."),
9240
9248
  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."),
9241
- 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."),
9249
+ 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:"),
9242
9250
  Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
9243
9251
  Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."),
9244
9252
  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."),
@@ -9500,7 +9508,7 @@ var Diagnostics = {
9500
9508
  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."),
9501
9509
  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."),
9502
9510
  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."),
9503
- 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."),
9511
+ 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:"),
9504
9512
  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}')'?"),
9505
9513
  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."),
9506
9514
  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'."),
@@ -9508,7 +9516,7 @@ var Diagnostics = {
9508
9516
  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."),
9509
9517
  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."),
9510
9518
  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."),
9511
- Non_simple_parameter_declared_here: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."),
9519
+ Non_simple_parameter_declared_here_Colon: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_Colon_1348", "Non-simple parameter declared here:"),
9512
9520
  use_strict_directive_used_here: diag(1349, 1 /* Error */, "use_strict_directive_used_here_1349", "'use strict' directive used here."),
9513
9521
  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."),
9514
9522
  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."),
@@ -9532,8 +9540,8 @@ var Diagnostics = {
9532
9540
  Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"),
9533
9541
  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'."),
9534
9542
  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."),
9535
- _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."),
9536
- _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."),
9543
+ _0_was_imported_here_Colon: diag(1376, 3 /* Message */, "_0_was_imported_here_Colon_1376", "'{0}' was imported here:"),
9544
+ _0_was_exported_here_Colon: diag(1377, 3 /* Message */, "_0_was_exported_here_Colon_1377", "'{0}' was exported here:"),
9537
9545
  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."),
9538
9546
  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'."),
9539
9547
  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'."),
@@ -9552,34 +9560,34 @@ var Diagnostics = {
9552
9560
  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"),
9553
9561
  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"),
9554
9562
  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"),
9555
- File_is_included_via_import_here: diag(1399, 3 /* Message */, "File_is_included_via_import_here_1399", "File is included via import here."),
9563
+ 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:"),
9556
9564
  Referenced_via_0_from_file_1: diag(1400, 3 /* Message */, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"),
9557
- File_is_included_via_reference_here: diag(1401, 3 /* Message */, "File_is_included_via_reference_here_1401", "File is included via reference here."),
9565
+ 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:"),
9558
9566
  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}'"),
9559
9567
  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}'"),
9560
- 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."),
9568
+ 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:"),
9561
9569
  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}'"),
9562
- 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."),
9570
+ 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:"),
9563
9571
  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}'"),
9564
- 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."),
9572
+ 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:"),
9565
9573
  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"),
9566
- 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."),
9574
+ 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:"),
9567
9575
  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"),
9568
9576
  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'"),
9569
- 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."),
9577
+ 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:"),
9570
9578
  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"),
9571
9579
  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'"),
9572
- 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."),
9580
+ 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:"),
9573
9581
  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"),
9574
9582
  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}'"),
9575
- 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."),
9583
+ 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:"),
9576
9584
  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}'"),
9577
9585
  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}'"),
9578
9586
  Library_0_specified_in_compilerOptions: diag(1422, 3 /* Message */, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"),
9579
- File_is_library_specified_here: diag(1423, 3 /* Message */, "File_is_library_specified_here_1423", "File is library specified here."),
9587
+ File_is_library_specified_here_Colon: diag(1423, 3 /* Message */, "File_is_library_specified_here_Colon_1423", "File is library specified here:"),
9580
9588
  Default_library: diag(1424, 3 /* Message */, "Default_library_1424", "Default library"),
9581
9589
  Default_library_for_target_0: diag(1425, 3 /* Message */, "Default_library_for_target_0_1425", "Default library for target '{0}'"),
9582
- 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."),
9590
+ 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:"),
9583
9591
  Root_file_specified_for_compilation: diag(1427, 3 /* Message */, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"),
9584
9592
  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}'"),
9585
9593
  File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
@@ -10032,7 +10040,7 @@ var Diagnostics = {
10032
10040
  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'?"),
10033
10041
  _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}'?"),
10034
10042
  _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."),
10035
- _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."),
10043
+ _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:"),
10036
10044
  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}'."),
10037
10045
  Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(
10038
10046
  2695,
@@ -10048,7 +10056,7 @@ var Diagnostics = {
10048
10056
  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}'."),
10049
10057
  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."),
10050
10058
  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."),
10051
- _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."),
10059
+ _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:"),
10052
10060
  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."),
10053
10061
  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."),
10054
10062
  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."),
@@ -10074,12 +10082,12 @@ var Diagnostics = {
10074
10082
  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}."),
10075
10083
  Cannot_find_lib_definition_for_0: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
10076
10084
  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}'?"),
10077
- _0_is_declared_here: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."),
10085
+ _0_is_declared_here_Colon: diag(2728, 3 /* Message */, "_0_is_declared_here_Colon_2728", "'{0}' is declared here:"),
10078
10086
  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."),
10079
10087
  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."),
10080
10088
  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(...)'."),
10081
10089
  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."),
10082
- Property_0_was_also_declared_here: diag(2733, 1 /* Error */, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."),
10090
+ 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:"),
10083
10091
  Are_you_missing_a_semicolon: diag(2734, 1 /* Error */, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"),
10084
10092
  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}'?"),
10085
10093
  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}'."),
@@ -10096,10 +10104,10 @@ var Diagnostics = {
10096
10104
  _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}'."),
10097
10105
  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."),
10098
10106
  _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}'?"),
10099
- The_implementation_signature_is_declared_here: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
10107
+ 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:"),
10100
10108
  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."),
10101
- The_first_export_default_is_here: diag(2752, 1 /* Error */, "The_first_export_default_is_here_2752", "The first export default is here."),
10102
- Another_export_default_is_here: diag(2753, 1 /* Error */, "Another_export_default_is_here_2753", "Another export default is here."),
10109
+ 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:"),
10110
+ Another_export_default_is_here_Colon: diag(2753, 1 /* Error */, "Another_export_default_is_here_Colon_2753", "Another export default is here:"),
10103
10111
  super_may_not_use_type_arguments: diag(2754, 1 /* Error */, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."),
10104
10112
  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."),
10105
10113
  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."),
@@ -10117,7 +10125,7 @@ var Diagnostics = {
10117
10125
  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."),
10118
10126
  No_overload_matches_this_call: diag(2769, 1 /* Error */, "No_overload_matches_this_call_2769", "No overload matches this call."),
10119
10127
  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."),
10120
- The_last_overload_is_declared_here: diag(2771, 1 /* Error */, "The_last_overload_is_declared_here_2771", "The last overload is declared here."),
10128
+ 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:"),
10121
10129
  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."),
10122
10130
  Did_you_forget_to_use_await: diag(2773, 1 /* Error */, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"),
10123
10131
  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?"),
@@ -10144,7 +10152,7 @@ var Diagnostics = {
10144
10152
  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."),
10145
10153
  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."),
10146
10154
  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'."),
10147
- 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."),
10155
+ 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:"),
10148
10156
  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."),
10149
10157
  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."),
10150
10158
  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."),
@@ -10581,8 +10589,8 @@ var Diagnostics = {
10581
10589
  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}"),
10582
10590
  Conflicts_are_in_this_file: diag(6201, 3 /* Message */, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."),
10583
10591
  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}"),
10584
- _0_was_also_declared_here: diag(6203, 3 /* Message */, "_0_was_also_declared_here_6203", "'{0}' was also declared here."),
10585
- and_here: diag(6204, 3 /* Message */, "and_here_6204", "and here."),
10592
+ _0_was_also_declared_here_Colon: diag(6203, 3 /* Message */, "_0_was_also_declared_here_Colon_6203", "'{0}' was also declared here:"),
10593
+ and_here_Colon: diag(6204, 3 /* Message */, "and_here_Colon_6204", "and here:"),
10586
10594
  All_type_parameters_are_unused: diag(6205, 1 /* Error */, "All_type_parameters_are_unused_6205", "All type parameters are unused."),
10587
10595
  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."),
10588
10596
  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}'."),
@@ -10986,6 +10994,7 @@ var Diagnostics = {
10986
10994
  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."),
10987
10995
  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."),
10988
10996
  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."),
10997
+ 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."),
10989
10998
  Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."),
10990
10999
  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."),
10991
11000
  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."),
@@ -11001,7 +11010,7 @@ var Diagnostics = {
11001
11010
  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."),
11002
11011
  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}'."),
11003
11012
  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."),
11004
- The_tag_was_first_specified_here: diag(8034, 1 /* Error */, "The_tag_was_first_specified_here_8034", "The tag was first specified here."),
11013
+ 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:"),
11005
11014
  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."),
11006
11015
  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."),
11007
11016
  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."),
@@ -18710,7 +18719,7 @@ function isNightly() {
18710
18719
  }
18711
18720
  function createTextWriter(newLine) {
18712
18721
  var output;
18713
- var indent3;
18722
+ var indent2;
18714
18723
  var lineStart;
18715
18724
  var lineCount;
18716
18725
  var linePos;
@@ -18728,7 +18737,7 @@ function createTextWriter(newLine) {
18728
18737
  function writeText(s) {
18729
18738
  if (s && s.length) {
18730
18739
  if (lineStart) {
18731
- s = getIndentString(indent3) + s;
18740
+ s = getIndentString(indent2) + s;
18732
18741
  lineStart = false;
18733
18742
  }
18734
18743
  output += s;
@@ -18747,7 +18756,7 @@ function createTextWriter(newLine) {
18747
18756
  }
18748
18757
  function reset2() {
18749
18758
  output = "";
18750
- indent3 = 0;
18759
+ indent2 = 0;
18751
18760
  lineStart = true;
18752
18761
  lineCount = 0;
18753
18762
  linePos = 0;
@@ -18784,15 +18793,15 @@ function createTextWriter(newLine) {
18784
18793
  writeLiteral,
18785
18794
  writeLine,
18786
18795
  increaseIndent: () => {
18787
- indent3++;
18796
+ indent2++;
18788
18797
  },
18789
18798
  decreaseIndent: () => {
18790
- indent3--;
18799
+ indent2--;
18791
18800
  },
18792
- getIndent: () => indent3,
18801
+ getIndent: () => indent2,
18793
18802
  getTextPos: () => output.length,
18794
18803
  getLine: () => lineCount,
18795
- getColumn: () => lineStart ? indent3 * getIndentSize() : output.length - linePos,
18804
+ getColumn: () => lineStart ? indent2 * getIndentSize() : output.length - linePos,
18796
18805
  getText: () => output,
18797
18806
  isAtStartOfLine: () => lineStart,
18798
18807
  hasTrailingComment: () => hasTrailingComment,
@@ -30992,7 +31001,8 @@ var Parser;
30992
31001
  nextToken();
30993
31002
  const statements = parseList(0 /* SourceElements */, parseStatement);
30994
31003
  Debug.assert(token() === 1 /* EndOfFileToken */);
30995
- const endOfFileToken = addJSDocComment(parseTokenNode());
31004
+ const endHasJSDoc = hasPrecedingJSDocComment();
31005
+ const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc);
30996
31006
  const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2);
30997
31007
  processCommentPragmas(sourceFile, sourceText);
30998
31008
  processPragmasIntoFields(sourceFile, reportPragmaDiagnostic);
@@ -31012,11 +31022,11 @@ var Parser;
31012
31022
  parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic));
31013
31023
  }
31014
31024
  }
31015
- function withJSDoc(node, hasJSDoc) {
31016
- return hasJSDoc ? addJSDocComment(node) : node;
31017
- }
31018
31025
  let hasDeprecatedTag = false;
31019
- function addJSDocComment(node) {
31026
+ function withJSDoc(node, hasJSDoc) {
31027
+ if (!hasJSDoc) {
31028
+ return node;
31029
+ }
31020
31030
  Debug.assert(!node.jsDoc);
31021
31031
  const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos));
31022
31032
  if (jsDoc.length)
@@ -31477,7 +31487,7 @@ var Parser;
31477
31487
  if (lastError) {
31478
31488
  addRelatedInfo(
31479
31489
  lastError,
31480
- createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind))
31490
+ createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon, tokenToString(openKind), tokenToString(closeKind))
31481
31491
  );
31482
31492
  }
31483
31493
  }
@@ -31810,6 +31820,9 @@ var Parser;
31810
31820
  case 22 /* HeritageClauses */:
31811
31821
  return isHeritageClause2();
31812
31822
  case 23 /* ImportOrExportSpecifiers */:
31823
+ if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) {
31824
+ return false;
31825
+ }
31813
31826
  return tokenIsIdentifierOrKeyword(token());
31814
31827
  case 13 /* JsxAttributes */:
31815
31828
  return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */;
@@ -32168,6 +32181,9 @@ var Parser;
32168
32181
  case 22 /* HeritageClauses */:
32169
32182
  return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected);
32170
32183
  case 23 /* ImportOrExportSpecifiers */:
32184
+ if (token() === 161 /* FromKeyword */) {
32185
+ return parseErrorAtCurrentToken(Diagnostics._0_expected, "}");
32186
+ }
32171
32187
  return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
32172
32188
  case 13 /* JsxAttributes */:
32173
32189
  return parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
@@ -33059,7 +33075,7 @@ var Parser;
33059
33075
  if (lastError && lastError.code === Diagnostics._0_expected.code) {
33060
33076
  addRelatedInfo(
33061
33077
  lastError,
33062
- createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
33078
+ createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon, "{", "}")
33063
33079
  );
33064
33080
  }
33065
33081
  }
@@ -33525,12 +33541,14 @@ var Parser;
33525
33541
  return arrowExpression;
33526
33542
  }
33527
33543
  const pos = getNodePos();
33544
+ const hasJSDoc = hasPrecedingJSDocComment();
33528
33545
  const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
33529
33546
  if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) {
33530
33547
  return parseSimpleArrowFunctionExpression(
33531
33548
  pos,
33532
33549
  expr,
33533
33550
  allowReturnTypeInArrowFunction,
33551
+ hasJSDoc,
33534
33552
  /*asyncModifier*/
33535
33553
  void 0
33536
33554
  );
@@ -33576,7 +33594,7 @@ var Parser;
33576
33594
  ), pos);
33577
33595
  }
33578
33596
  }
33579
- function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) {
33597
+ function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) {
33580
33598
  Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
33581
33599
  const parameter = factory2.createParameterDeclaration(
33582
33600
  /*modifiers*/
@@ -33609,7 +33627,7 @@ var Parser;
33609
33627
  equalsGreaterThanToken,
33610
33628
  body
33611
33629
  );
33612
- return addJSDocComment(finishNode(node, pos));
33630
+ return withJSDoc(finishNode(node, pos), hasJSDoc);
33613
33631
  }
33614
33632
  function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) {
33615
33633
  const triState = isParenthesizedArrowFunctionExpression();
@@ -33737,9 +33755,10 @@ var Parser;
33737
33755
  if (token() === 134 /* AsyncKeyword */) {
33738
33756
  if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) {
33739
33757
  const pos = getNodePos();
33758
+ const hasJSDoc = hasPrecedingJSDocComment();
33740
33759
  const asyncModifier = parseModifiersForArrowFunction();
33741
33760
  const expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
33742
- return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier);
33761
+ return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier);
33743
33762
  }
33744
33763
  }
33745
33764
  return void 0;
@@ -35413,6 +35432,9 @@ var Parser;
35413
35432
  return void 0;
35414
35433
  }
35415
35434
  }
35435
+ function nextTokenIsStringLiteral() {
35436
+ return nextToken() === 11 /* StringLiteral */;
35437
+ }
35416
35438
  function nextTokenIsIdentifierOrStringLiteralOnSameLine() {
35417
35439
  nextToken();
35418
35440
  return !scanner2.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */);
@@ -36157,7 +36179,7 @@ var Parser;
36157
36179
  if (lastError && lastError.code === Diagnostics._0_expected.code) {
36158
36180
  addRelatedInfo(
36159
36181
  lastError,
36160
- createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")
36182
+ createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here_Colon, "{", "}")
36161
36183
  );
36162
36184
  }
36163
36185
  }
@@ -36525,20 +36547,20 @@ var Parser;
36525
36547
  function doJSDocScan() {
36526
36548
  let state = 1 /* SawAsterisk */;
36527
36549
  let margin;
36528
- let indent3 = start2 - (content.lastIndexOf("\n", start2) + 1) + 4;
36550
+ let indent2 = start2 - (content.lastIndexOf("\n", start2) + 1) + 4;
36529
36551
  function pushComment(text) {
36530
36552
  if (!margin) {
36531
- margin = indent3;
36553
+ margin = indent2;
36532
36554
  }
36533
36555
  comments.push(text);
36534
- indent3 += text.length;
36556
+ indent2 += text.length;
36535
36557
  }
36536
36558
  nextTokenJSDoc();
36537
36559
  while (parseOptionalJsdoc(5 /* WhitespaceTrivia */))
36538
36560
  ;
36539
36561
  if (parseOptionalJsdoc(4 /* NewLineTrivia */)) {
36540
36562
  state = 0 /* BeginningOfLine */;
36541
- indent3 = 0;
36563
+ indent2 = 0;
36542
36564
  }
36543
36565
  loop:
36544
36566
  while (true) {
@@ -36547,14 +36569,14 @@ var Parser;
36547
36569
  removeTrailingWhitespace(comments);
36548
36570
  if (!commentsPos)
36549
36571
  commentsPos = getNodePos();
36550
- addTag(parseTag(indent3));
36572
+ addTag(parseTag(indent2));
36551
36573
  state = 0 /* BeginningOfLine */;
36552
36574
  margin = void 0;
36553
36575
  break;
36554
36576
  case 4 /* NewLineTrivia */:
36555
36577
  comments.push(scanner2.getTokenText());
36556
36578
  state = 0 /* BeginningOfLine */;
36557
- indent3 = 0;
36579
+ indent2 = 0;
36558
36580
  break;
36559
36581
  case 42 /* AsteriskToken */:
36560
36582
  const asterisk = scanner2.getTokenText();
@@ -36564,16 +36586,16 @@ var Parser;
36564
36586
  } else {
36565
36587
  Debug.assert(state === 0 /* BeginningOfLine */);
36566
36588
  state = 1 /* SawAsterisk */;
36567
- indent3 += asterisk.length;
36589
+ indent2 += asterisk.length;
36568
36590
  }
36569
36591
  break;
36570
36592
  case 5 /* WhitespaceTrivia */:
36571
36593
  Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text");
36572
36594
  const whitespace = scanner2.getTokenText();
36573
- if (margin !== void 0 && indent3 + whitespace.length > margin) {
36574
- comments.push(whitespace.slice(margin - indent3));
36595
+ if (margin !== void 0 && indent2 + whitespace.length > margin) {
36596
+ comments.push(whitespace.slice(margin - indent2));
36575
36597
  }
36576
- indent3 += whitespace.length;
36598
+ indent2 += whitespace.length;
36577
36599
  break;
36578
36600
  case 1 /* EndOfFileToken */:
36579
36601
  break loop;
@@ -36775,7 +36797,7 @@ var Parser;
36775
36797
  }
36776
36798
  return parseTagComments(margin, indentText.slice(margin));
36777
36799
  }
36778
- function parseTagComments(indent3, initialMargin) {
36800
+ function parseTagComments(indent2, initialMargin) {
36779
36801
  const commentsPos2 = getNodePos();
36780
36802
  let comments2 = [];
36781
36803
  const parts2 = [];
@@ -36784,10 +36806,10 @@ var Parser;
36784
36806
  let margin;
36785
36807
  function pushComment(text) {
36786
36808
  if (!margin) {
36787
- margin = indent3;
36809
+ margin = indent2;
36788
36810
  }
36789
36811
  comments2.push(text);
36790
- indent3 += text.length;
36812
+ indent2 += text.length;
36791
36813
  }
36792
36814
  if (initialMargin !== void 0) {
36793
36815
  if (initialMargin !== "") {
@@ -36802,7 +36824,7 @@ var Parser;
36802
36824
  case 4 /* NewLineTrivia */:
36803
36825
  state = 0 /* BeginningOfLine */;
36804
36826
  comments2.push(scanner2.getTokenText());
36805
- indent3 = 0;
36827
+ indent2 = 0;
36806
36828
  break;
36807
36829
  case 60 /* AtToken */:
36808
36830
  scanner2.resetTokenState(scanner2.getTokenEnd() - 1);
@@ -36812,11 +36834,11 @@ var Parser;
36812
36834
  case 5 /* WhitespaceTrivia */:
36813
36835
  Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text");
36814
36836
  const whitespace = scanner2.getTokenText();
36815
- if (margin !== void 0 && indent3 + whitespace.length > margin) {
36816
- comments2.push(whitespace.slice(margin - indent3));
36837
+ if (margin !== void 0 && indent2 + whitespace.length > margin) {
36838
+ comments2.push(whitespace.slice(margin - indent2));
36817
36839
  state = 2 /* SavingComments */;
36818
36840
  }
36819
- indent3 += whitespace.length;
36841
+ indent2 += whitespace.length;
36820
36842
  break;
36821
36843
  case 19 /* OpenBraceToken */:
36822
36844
  state = 2 /* SavingComments */;
@@ -36849,7 +36871,7 @@ var Parser;
36849
36871
  case 42 /* AsteriskToken */:
36850
36872
  if (state === 0 /* BeginningOfLine */) {
36851
36873
  state = 1 /* SawAsterisk */;
36852
- indent3 += 1;
36874
+ indent2 += 1;
36853
36875
  break;
36854
36876
  }
36855
36877
  default:
@@ -36914,8 +36936,8 @@ var Parser;
36914
36936
  function isJSDocLinkTag(kind) {
36915
36937
  return kind === "link" || kind === "linkcode" || kind === "linkplain";
36916
36938
  }
36917
- function parseUnknownTag(start3, tagName, indent3, indentText) {
36918
- return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3);
36939
+ function parseUnknownTag(start3, tagName, indent2, indentText) {
36940
+ return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start3, getNodePos(), indent2, indentText)), start3);
36919
36941
  }
36920
36942
  function addTag(tag) {
36921
36943
  if (!tag) {
@@ -36962,7 +36984,7 @@ var Parser;
36962
36984
  return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments;
36963
36985
  }
36964
36986
  }
36965
- function parseParameterOrPropertyTag(start3, tagName, target, indent3) {
36987
+ function parseParameterOrPropertyTag(start3, tagName, target, indent2) {
36966
36988
  let typeExpression = tryParseTypeExpression();
36967
36989
  let isNameFirst = !typeExpression;
36968
36990
  skipWhitespaceOrAsterisk();
@@ -36971,8 +36993,8 @@ var Parser;
36971
36993
  if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) {
36972
36994
  typeExpression = tryParseTypeExpression();
36973
36995
  }
36974
- const comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
36975
- const nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent3);
36996
+ const comment = parseTrailingTagComments(start3, getNodePos(), indent2, indentText);
36997
+ const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2);
36976
36998
  if (nestedTypeLiteral) {
36977
36999
  typeExpression = nestedTypeLiteral;
36978
37000
  isNameFirst = true;
@@ -36980,12 +37002,12 @@ var Parser;
36980
37002
  const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment);
36981
37003
  return finishNode(result2, start3);
36982
37004
  }
36983
- function parseNestedTypeLiteral(typeExpression, name, target, indent3) {
37005
+ function parseNestedTypeLiteral(typeExpression, name, target, indent2) {
36984
37006
  if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) {
36985
37007
  const pos = getNodePos();
36986
37008
  let child;
36987
37009
  let children;
36988
- while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) {
37010
+ while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) {
36989
37011
  if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) {
36990
37012
  children = append(children, child);
36991
37013
  } else if (child.kind === 352 /* JSDocTemplateTag */) {
@@ -36998,14 +37020,14 @@ var Parser;
36998
37020
  }
36999
37021
  }
37000
37022
  }
37001
- function parseReturnTag(start3, tagName, indent3, indentText) {
37023
+ function parseReturnTag(start3, tagName, indent2, indentText) {
37002
37024
  if (some(tags, isJSDocReturnTag)) {
37003
37025
  parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
37004
37026
  }
37005
37027
  const typeExpression = tryParseTypeExpression();
37006
- return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3);
37028
+ return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(), indent2, indentText)), start3);
37007
37029
  }
37008
- function parseTypeTag(start3, tagName, indent3, indentText) {
37030
+ function parseTypeTag(start3, tagName, indent2, indentText) {
37009
37031
  if (some(tags, isJSDocTypeTag)) {
37010
37032
  parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText));
37011
37033
  }
@@ -37013,25 +37035,25 @@ var Parser;
37013
37035
  /*mayOmitBraces*/
37014
37036
  true
37015
37037
  );
37016
- const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent3, indentText) : void 0;
37038
+ const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent2, indentText) : void 0;
37017
37039
  return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start3);
37018
37040
  }
37019
- function parseSeeTag(start3, tagName, indent3, indentText) {
37041
+ function parseSeeTag(start3, tagName, indent2, indentText) {
37020
37042
  const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner2.getTokenValue()));
37021
37043
  const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference();
37022
- const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent3, indentText) : void 0;
37044
+ const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start3, getNodePos(), indent2, indentText) : void 0;
37023
37045
  return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start3);
37024
37046
  }
37025
- function parseThrowsTag(start3, tagName, indent3, indentText) {
37047
+ function parseThrowsTag(start3, tagName, indent2, indentText) {
37026
37048
  const typeExpression = tryParseTypeExpression();
37027
- const comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
37049
+ const comment = parseTrailingTagComments(start3, getNodePos(), indent2, indentText);
37028
37050
  return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start3);
37029
37051
  }
37030
- function parseAuthorTag(start3, tagName, indent3, indentText) {
37052
+ function parseAuthorTag(start3, tagName, indent2, indentText) {
37031
37053
  const commentStart = getNodePos();
37032
37054
  const textOnly = parseAuthorNameAndEmail();
37033
37055
  let commentEnd = scanner2.getTokenFullStart();
37034
- const comments2 = parseTrailingTagComments(start3, commentEnd, indent3, indentText);
37056
+ const comments2 = parseTrailingTagComments(start3, commentEnd, indent2, indentText);
37035
37057
  if (!comments2) {
37036
37058
  commentEnd = scanner2.getTokenFullStart();
37037
37059
  }
@@ -37115,19 +37137,19 @@ var Parser;
37115
37137
  skipWhitespace();
37116
37138
  return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start3, getNodePos(), margin, indentText)), start3);
37117
37139
  }
37118
- function parseTypedefTag(start3, tagName, indent3, indentText) {
37140
+ function parseTypedefTag(start3, tagName, indent2, indentText) {
37119
37141
  let typeExpression = tryParseTypeExpression();
37120
37142
  skipWhitespaceOrAsterisk();
37121
37143
  const fullName = parseJSDocTypeNameWithNamespace();
37122
37144
  skipWhitespace();
37123
- let comment = parseTagComments(indent3);
37145
+ let comment = parseTagComments(indent2);
37124
37146
  let end2;
37125
37147
  if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) {
37126
37148
  let child;
37127
37149
  let childTypeTag;
37128
37150
  let jsDocPropertyTags;
37129
37151
  let hasChildren = false;
37130
- while (child = tryParse(() => parseChildPropertyTag(indent3))) {
37152
+ while (child = tryParse(() => parseChildPropertyTag(indent2))) {
37131
37153
  if (child.kind === 352 /* JSDocTemplateTag */) {
37132
37154
  break;
37133
37155
  }
@@ -37136,7 +37158,7 @@ var Parser;
37136
37158
  if (childTypeTag) {
37137
37159
  const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
37138
37160
  if (lastError) {
37139
- addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here));
37161
+ addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here_Colon));
37140
37162
  }
37141
37163
  break;
37142
37164
  } else {
@@ -37155,7 +37177,7 @@ var Parser;
37155
37177
  }
37156
37178
  end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end;
37157
37179
  if (!comment) {
37158
- comment = parseTrailingTagComments(start3, end2, indent3, indentText);
37180
+ comment = parseTrailingTagComments(start3, end2, indent2, indentText);
37159
37181
  }
37160
37182
  const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment);
37161
37183
  return finishNode(typedefTag, start3, end2);
@@ -37185,11 +37207,11 @@ var Parser;
37185
37207
  }
37186
37208
  return typeNameOrNamespaceName;
37187
37209
  }
37188
- function parseCallbackTagParameters(indent3) {
37210
+ function parseCallbackTagParameters(indent2) {
37189
37211
  const pos = getNodePos();
37190
37212
  let child;
37191
37213
  let parameters;
37192
- while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) {
37214
+ while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) {
37193
37215
  if (child.kind === 352 /* JSDocTemplateTag */) {
37194
37216
  parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);
37195
37217
  break;
@@ -37198,11 +37220,11 @@ var Parser;
37198
37220
  }
37199
37221
  return createNodeArray(parameters || [], pos);
37200
37222
  }
37201
- function parseJSDocSignature(start3, indent3) {
37202
- const parameters = parseCallbackTagParameters(indent3);
37223
+ function parseJSDocSignature(start3, indent2) {
37224
+ const parameters = parseCallbackTagParameters(indent2);
37203
37225
  const returnTag = tryParse(() => {
37204
37226
  if (parseOptionalJsdoc(60 /* AtToken */)) {
37205
- const tag = parseTag(indent3);
37227
+ const tag = parseTag(indent2);
37206
37228
  if (tag && tag.kind === 349 /* JSDocReturnTag */) {
37207
37229
  return tag;
37208
37230
  }
@@ -37215,23 +37237,23 @@ var Parser;
37215
37237
  returnTag
37216
37238
  ), start3);
37217
37239
  }
37218
- function parseCallbackTag(start3, tagName, indent3, indentText) {
37240
+ function parseCallbackTag(start3, tagName, indent2, indentText) {
37219
37241
  const fullName = parseJSDocTypeNameWithNamespace();
37220
37242
  skipWhitespace();
37221
- let comment = parseTagComments(indent3);
37222
- const typeExpression = parseJSDocSignature(start3, indent3);
37243
+ let comment = parseTagComments(indent2);
37244
+ const typeExpression = parseJSDocSignature(start3, indent2);
37223
37245
  if (!comment) {
37224
- comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
37246
+ comment = parseTrailingTagComments(start3, getNodePos(), indent2, indentText);
37225
37247
  }
37226
37248
  const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
37227
37249
  return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start3, end2);
37228
37250
  }
37229
- function parseOverloadTag(start3, tagName, indent3, indentText) {
37251
+ function parseOverloadTag(start3, tagName, indent2, indentText) {
37230
37252
  skipWhitespace();
37231
- let comment = parseTagComments(indent3);
37232
- const typeExpression = parseJSDocSignature(start3, indent3);
37253
+ let comment = parseTagComments(indent2);
37254
+ const typeExpression = parseJSDocSignature(start3, indent2);
37233
37255
  if (!comment) {
37234
- comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText);
37256
+ comment = parseTrailingTagComments(start3, getNodePos(), indent2, indentText);
37235
37257
  }
37236
37258
  const end2 = comment !== void 0 ? getNodePos() : typeExpression.end;
37237
37259
  return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start3, end2);
@@ -37247,18 +37269,18 @@ var Parser;
37247
37269
  }
37248
37270
  return a.escapedText === b.escapedText;
37249
37271
  }
37250
- function parseChildPropertyTag(indent3) {
37251
- return parseChildParameterOrPropertyTag(1 /* Property */, indent3);
37272
+ function parseChildPropertyTag(indent2) {
37273
+ return parseChildParameterOrPropertyTag(1 /* Property */, indent2);
37252
37274
  }
37253
- function parseChildParameterOrPropertyTag(target, indent3, name) {
37275
+ function parseChildParameterOrPropertyTag(target, indent2, name) {
37254
37276
  let canParseTag = true;
37255
37277
  let seenAsterisk = false;
37256
37278
  while (true) {
37257
37279
  switch (nextTokenJSDoc()) {
37258
37280
  case 60 /* AtToken */:
37259
37281
  if (canParseTag) {
37260
- const child = tryParseChildTag(target, indent3);
37261
- if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
37282
+ const child = tryParseChildTag(target, indent2);
37283
+ if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
37262
37284
  return false;
37263
37285
  }
37264
37286
  return child;
@@ -37283,7 +37305,7 @@ var Parser;
37283
37305
  }
37284
37306
  }
37285
37307
  }
37286
- function tryParseChildTag(target, indent3) {
37308
+ function tryParseChildTag(target, indent2) {
37287
37309
  Debug.assert(token() === 60 /* AtToken */);
37288
37310
  const start3 = scanner2.getTokenFullStart();
37289
37311
  nextTokenJSDoc();
@@ -37303,14 +37325,14 @@ var Parser;
37303
37325
  t = 2 /* Parameter */ | 4 /* CallbackParameter */;
37304
37326
  break;
37305
37327
  case "template":
37306
- return parseTemplateTag(start3, tagName, indent3, indentText);
37328
+ return parseTemplateTag(start3, tagName, indent2, indentText);
37307
37329
  default:
37308
37330
  return false;
37309
37331
  }
37310
37332
  if (!(target & t)) {
37311
37333
  return false;
37312
37334
  }
37313
- return parseParameterOrPropertyTag(start3, tagName, target, indent3);
37335
+ return parseParameterOrPropertyTag(start3, tagName, target, indent2);
37314
37336
  }
37315
37337
  function parseTemplateTagTypeParameter() {
37316
37338
  const typeParameterPos = getNodePos();
@@ -37351,10 +37373,10 @@ var Parser;
37351
37373
  } while (parseOptionalJsdoc(28 /* CommaToken */));
37352
37374
  return createNodeArray(typeParameters, pos);
37353
37375
  }
37354
- function parseTemplateTag(start3, tagName, indent3, indentText) {
37376
+ function parseTemplateTag(start3, tagName, indent2, indentText) {
37355
37377
  const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0;
37356
37378
  const typeParameters = parseTemplateTagTypeParameters();
37357
- return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start3, getNodePos(), indent3, indentText)), start3);
37379
+ return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start3, getNodePos(), indent2, indentText)), start3);
37358
37380
  }
37359
37381
  function parseOptionalJsdoc(t) {
37360
37382
  if (token() === t) {
@@ -44090,10 +44112,10 @@ function createBinder() {
44090
44112
  const decl = getNameOfDeclaration(declaration) || declaration;
44091
44113
  const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message);
44092
44114
  file.bindDiagnostics.push(
44093
- multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3
44115
+ multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here_Colon : Diagnostics.and_here_Colon)) : diag3
44094
44116
  );
44095
44117
  if (multipleDefaultExports) {
44096
- relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here));
44118
+ relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here_Colon));
44097
44119
  }
44098
44120
  });
44099
44121
  const diag2 = messageNeedsName ? createDiagnosticForNode2(declarationName, message, getDisplayName(node)) : createDiagnosticForNode2(declarationName, message);
@@ -48679,7 +48701,7 @@ function createTypeChecker(host) {
48679
48701
  if (deprecatedTag) {
48680
48702
  addRelatedInfo(
48681
48703
  diagnostic,
48682
- createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here)
48704
+ createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here_Colon)
48683
48705
  );
48684
48706
  }
48685
48707
  suggestionDiagnostics.add(diagnostic);
@@ -48874,8 +48896,8 @@ function createTypeChecker(host) {
48874
48896
  if (adjustedNode === errorNode)
48875
48897
  continue;
48876
48898
  err.relatedInformation = err.relatedInformation || [];
48877
- const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here, symbolName2);
48878
- const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here);
48899
+ const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here_Colon, symbolName2);
48900
+ const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here_Colon);
48879
48901
  if (length(err.relatedInformation) >= 5 || some(err.relatedInformation, (r) => compareDiagnostics(r, followOnMessage) === 0 /* EqualTo */ || compareDiagnostics(r, leadingMessage) === 0 /* EqualTo */))
48880
48902
  continue;
48881
48903
  addRelatedInfo(err, !length(err.relatedInformation) ? leadingMessage : followOnMessage);
@@ -49486,7 +49508,7 @@ function createTypeChecker(host) {
49486
49508
  if (suggestion.valueDeclaration) {
49487
49509
  addRelatedInfo(
49488
49510
  diagnostic,
49489
- createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
49511
+ createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here_Colon, suggestionName)
49490
49512
  );
49491
49513
  }
49492
49514
  }
@@ -49548,7 +49570,7 @@ function createTypeChecker(host) {
49548
49570
  diagnostic,
49549
49571
  createDiagnosticForNode(
49550
49572
  typeOnlyDeclaration,
49551
- typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here,
49573
+ typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here_Colon : Diagnostics._0_was_imported_here_Colon,
49552
49574
  unescapedName
49553
49575
  )
49554
49576
  );
@@ -49685,7 +49707,7 @@ function createTypeChecker(host) {
49685
49707
  return true;
49686
49708
  }
49687
49709
  }
49688
- error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name));
49710
+ error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_Colon, unescapeLeadingUnderscores(name));
49689
49711
  return true;
49690
49712
  }
49691
49713
  }
@@ -49727,7 +49749,7 @@ function createTypeChecker(host) {
49727
49749
  if (isExtendedByInterface(errorLocation)) {
49728
49750
  error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
49729
49751
  } else {
49730
- error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
49752
+ error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon, unescapeLeadingUnderscores(name));
49731
49753
  }
49732
49754
  return true;
49733
49755
  }
@@ -49750,7 +49772,7 @@ function createTypeChecker(host) {
49750
49772
  } else if (maybeMappedType(errorLocation, symbol)) {
49751
49773
  error2(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");
49752
49774
  } else {
49753
- error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName);
49775
+ error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon, rawName);
49754
49776
  }
49755
49777
  return true;
49756
49778
  }
@@ -49856,7 +49878,7 @@ function createTypeChecker(host) {
49856
49878
  if (diagnosticMessage) {
49857
49879
  addRelatedInfo(
49858
49880
  diagnosticMessage,
49859
- createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)
49881
+ createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here_Colon, declarationName)
49860
49882
  );
49861
49883
  }
49862
49884
  }
@@ -49924,7 +49946,7 @@ function createTypeChecker(host) {
49924
49946
  const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node));
49925
49947
  const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */;
49926
49948
  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;
49927
- const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here;
49949
+ const relatedMessage = isExport ? Diagnostics._0_was_exported_here_Colon : Diagnostics._0_was_imported_here_Colon;
49928
49950
  const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText);
49929
49951
  addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name));
49930
49952
  }
@@ -50246,7 +50268,7 @@ function createTypeChecker(host) {
50246
50268
  if (suggestion.valueDeclaration) {
50247
50269
  addRelatedInfo(
50248
50270
  diagnostic,
50249
- createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)
50271
+ createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here_Colon, suggestionName)
50250
50272
  );
50251
50273
  }
50252
50274
  } else {
@@ -50276,7 +50298,7 @@ function createTypeChecker(host) {
50276
50298
  if (localSymbol.declarations) {
50277
50299
  addRelatedInfo(
50278
50300
  diagnostic,
50279
- ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))
50301
+ ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here_Colon : Diagnostics.and_here_Colon, declarationName))
50280
50302
  );
50281
50303
  }
50282
50304
  }
@@ -56321,11 +56343,11 @@ function createTypeChecker(host) {
56321
56343
  const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration;
56322
56344
  addRelatedInfo(
56323
56345
  error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName),
56324
- createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName)
56346
+ createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here_Colon, unescapedName)
56325
56347
  );
56326
56348
  addRelatedInfo(
56327
56349
  error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName),
56328
- createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName)
56350
+ createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here_Colon, unescapedName)
56329
56351
  );
56330
56352
  }
56331
56353
  const union = createSymbol(s.flags | exportedMember.flags, name);
@@ -56836,7 +56858,7 @@ function createTypeChecker(host) {
56836
56858
  return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : (
56837
56859
  // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty
56838
56860
  symbol.links.writeType || symbol.links.type
56839
- ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */));
56861
+ ) : getTypeOfSymbol(symbol);
56840
56862
  }
56841
56863
  if (symbol.flags & 98304 /* Accessor */) {
56842
56864
  return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);
@@ -57560,7 +57582,7 @@ function createTypeChecker(host) {
57560
57582
  if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
57561
57583
  const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
57562
57584
  const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
57563
- forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
57585
+ forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here_Colon, name));
57564
57586
  error2(declName || decl, Diagnostics.Duplicate_property_0, name);
57565
57587
  lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */);
57566
57588
  }
@@ -62472,7 +62494,7 @@ function createTypeChecker(host) {
62472
62494
  if (moduleSymbol.flags & targetMeaning) {
62473
62495
  links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning);
62474
62496
  } else {
62475
- 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;
62497
+ 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;
62476
62498
  error2(node, errorMessage, node.argument.literal.text);
62477
62499
  links.resolvedSymbol = unknownSymbol;
62478
62500
  links.resolvedType = errorType;
@@ -66233,7 +66255,7 @@ function createTypeChecker(host) {
66233
66255
  );
66234
66256
  reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2));
66235
66257
  if (length(unmatchedProperty.declarations)) {
66236
- associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName));
66258
+ associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here_Colon, propName));
66237
66259
  }
66238
66260
  if (shouldSkipElaboration && errorInfo) {
66239
66261
  overrideNextErrorInfo++;
@@ -67187,7 +67209,8 @@ function createTypeChecker(host) {
67187
67209
  return !!elementType && isEmptyLiteralType(elementType);
67188
67210
  }
67189
67211
  function isTupleLikeType(type) {
67190
- return isTupleType(type) || !!getPropertyOfType(type, "0");
67212
+ let lengthType;
67213
+ return isTupleType(type) || !!getPropertyOfType(type, "0") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */));
67191
67214
  }
67192
67215
  function isArrayOrTupleLikeType(type) {
67193
67216
  return isArrayLikeType(type) || isTupleLikeType(type);
@@ -70710,15 +70733,7 @@ function createTypeChecker(host) {
70710
70733
  location = location.parent;
70711
70734
  }
70712
70735
  if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
70713
- const type = removeOptionalTypeMarker(
70714
- isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression(
70715
- location,
70716
- /*checkMode*/
70717
- void 0,
70718
- /*writeOnly*/
70719
- true
70720
- ) : getTypeOfExpression(location)
70721
- );
70736
+ const type = removeOptionalTypeMarker(getTypeOfExpression(location));
70722
70737
  if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
70723
70738
  return type;
70724
70739
  }
@@ -72557,6 +72572,10 @@ function createTypeChecker(host) {
72557
72572
  function hasDefaultValue(node) {
72558
72573
  return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */;
72559
72574
  }
72575
+ function isSpreadIntoCallOrNew(node) {
72576
+ const parent2 = walkUpParenthesizedExpressions(node.parent);
72577
+ return isSpreadElement(parent2) && isCallOrNewExpression(parent2.parent);
72578
+ }
72560
72579
  function checkArrayLiteral(node, checkMode, forceTuple) {
72561
72580
  const elements = node.elements;
72562
72581
  const elementCount = elements.length;
@@ -72564,14 +72583,13 @@ function createTypeChecker(host) {
72564
72583
  const elementFlags = [];
72565
72584
  pushCachedContextualType(node);
72566
72585
  const inDestructuringPattern = isAssignmentTarget(node);
72567
- const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent);
72568
- const inConstContext = isSpreadIntoCallOrNew || isConstContext(node);
72586
+ const inConstContext = isConstContext(node);
72569
72587
  const contextualType = getApparentTypeOfContextualType(
72570
72588
  node,
72571
72589
  /*contextFlags*/
72572
72590
  void 0
72573
72591
  );
72574
- const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType);
72592
+ const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType);
72575
72593
  let hasOmittedExpression = false;
72576
72594
  for (let i = 0; i < elementCount; i++) {
72577
72595
  const e = elements[i];
@@ -74012,7 +74030,7 @@ function createTypeChecker(host) {
74012
74030
  if (diagnosticMessage) {
74013
74031
  addRelatedInfo(
74014
74032
  diagnosticMessage,
74015
- createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)
74033
+ createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here_Colon, declarationName)
74016
74034
  );
74017
74035
  }
74018
74036
  }
@@ -74099,7 +74117,7 @@ function createTypeChecker(host) {
74099
74117
  const suggestedName = symbolName(suggestion);
74100
74118
  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;
74101
74119
  errorInfo = chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);
74102
- relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName);
74120
+ relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here_Colon, suggestedName);
74103
74121
  } else {
74104
74122
  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;
74105
74123
  errorInfo = chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container);
@@ -74816,7 +74834,7 @@ function createTypeChecker(host) {
74816
74834
  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);
74817
74835
  const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration;
74818
74836
  if (tagNameDeclaration) {
74819
- addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName)));
74837
+ addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here_Colon, entityNameToString(node.tagName)));
74820
74838
  }
74821
74839
  if (errorOutputContainer && errorOutputContainer.skipLogging) {
74822
74840
  (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2);
@@ -75268,7 +75286,7 @@ function createTypeChecker(host) {
75268
75286
  if (diags) {
75269
75287
  for (const d of diags) {
75270
75288
  if (last2.declaration && candidatesForArgumentError.length > 3) {
75271
- addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here));
75289
+ addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here_Colon));
75272
75290
  }
75273
75291
  addImplementationSuccessElaboration(last2, d);
75274
75292
  diagnostics.add(d);
@@ -80408,7 +80426,7 @@ function createTypeChecker(host) {
80408
80426
  const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;
80409
80427
  addRelatedInfo(
80410
80428
  error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
80411
- createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)
80429
+ createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here_Colon)
80412
80430
  );
80413
80431
  break;
80414
80432
  }
@@ -80874,7 +80892,7 @@ function createTypeChecker(host) {
80874
80892
  const diag2 = error2(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);
80875
80893
  const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2);
80876
80894
  if (aliasDeclaration) {
80877
- addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName)));
80895
+ addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here_Colon, idText(rootName)));
80878
80896
  }
80879
80897
  }
80880
80898
  }
@@ -81818,7 +81836,7 @@ function createTypeChecker(host) {
81818
81836
  if (firstDeclaration) {
81819
81837
  addRelatedInfo(
81820
81838
  err,
81821
- createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)
81839
+ createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here_Colon, declName)
81822
81840
  );
81823
81841
  }
81824
81842
  }
@@ -82928,7 +82946,7 @@ function createTypeChecker(host) {
82928
82946
  typeToString(info.type)
82929
82947
  );
82930
82948
  if (propDeclaration && errorNode !== propDeclaration) {
82931
- addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop)));
82949
+ addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here_Colon, symbolToString(prop)));
82932
82950
  }
82933
82951
  diagnostics.add(diagnostic);
82934
82952
  }
@@ -87263,7 +87281,7 @@ function createTypeChecker(host) {
87263
87281
  createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here)
87264
87282
  );
87265
87283
  });
87266
- const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here));
87284
+ const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here_Colon) : createDiagnosticForNode(parameter, Diagnostics.and_here_Colon));
87267
87285
  addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2);
87268
87286
  return true;
87269
87287
  }
@@ -119602,7 +119620,7 @@ var gutterSeparator = " ";
119602
119620
  var resetEscapeSequence = "\x1B[0m";
119603
119621
  var ellipsis = "...";
119604
119622
  var halfIndent = " ";
119605
- var indent = " ";
119623
+ var bullet = "\u25CF ";
119606
119624
  function getCategoryFormat(category) {
119607
119625
  switch (category) {
119608
119626
  case 1 /* Error */:
@@ -119618,39 +119636,49 @@ function getCategoryFormat(category) {
119618
119636
  function formatColorAndReset(text, formatStyle) {
119619
119637
  return formatStyle + text + resetEscapeSequence;
119620
119638
  }
119621
- function formatCodeSpan(file, start2, length2, indent3, squiggleColor, host) {
119639
+ function formatCodeSpan(file, start2, length2, indent2, underlineColor, host) {
119622
119640
  const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start2);
119623
119641
  const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start2 + length2);
119624
119642
  const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line;
119643
+ const gutterWidth = 1;
119625
119644
  const hasMoreThanFiveLines = lastLine - firstLine >= 4;
119626
- let gutterWidth = (lastLine + 1 + "").length;
119627
- if (hasMoreThanFiveLines) {
119628
- gutterWidth = Math.max(ellipsis.length, gutterWidth);
119645
+ let whitespaceToTrim = Number.MAX_VALUE;
119646
+ for (let i = firstLine; i <= lastLine; i++) {
119647
+ if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
119648
+ i = lastLine - 1;
119649
+ }
119650
+ const lineStart = getPositionOfLineAndCharacter(file, i, 0);
119651
+ const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
119652
+ const lineContent = file.text.slice(lineStart, lineEnd);
119653
+ whitespaceToTrim = Math.min(whitespaceToTrim, startWhitespaceCount(lineContent));
119629
119654
  }
119630
119655
  let context = "";
119631
119656
  for (let i = firstLine; i <= lastLine; i++) {
119632
119657
  context += host.getNewLine();
119633
119658
  if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
119634
- context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
119659
+ context += indent2 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
119635
119660
  i = lastLine - 1;
119636
119661
  }
119637
119662
  const lineStart = getPositionOfLineAndCharacter(file, i, 0);
119638
119663
  const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
119639
119664
  let lineContent = file.text.slice(lineStart, lineEnd);
119665
+ lineContent = lineContent.slice(whitespaceToTrim);
119640
119666
  lineContent = trimStringEnd(lineContent);
119641
119667
  lineContent = lineContent.replace(/\t/g, " ");
119642
- context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
119668
+ const gutterLine = "|";
119669
+ context += indent2 + padLeft(gutterLine, gutterWidth) + gutterSeparator;
119643
119670
  context += lineContent + host.getNewLine();
119644
- context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
119645
- context += squiggleColor;
119671
+ context += indent2 + padLeft("", gutterWidth) + gutterSeparator;
119672
+ context += underlineColor;
119646
119673
  if (i === firstLine) {
119647
119674
  const lastCharForLine = i === lastLine ? lastLineChar : void 0;
119648
- context += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
119649
- context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
119675
+ context += lineContent.slice(0, firstLineChar - whitespaceToTrim).replace(/\S/g, " ");
119676
+ const amendedLastChar = lastCharForLine ? lastCharForLine - whitespaceToTrim : void 0;
119677
+ context += lineContent.slice(firstLineChar - whitespaceToTrim, amendedLastChar).replace(/./g, "\u2594");
119650
119678
  } else if (i === lastLine) {
119651
- context += lineContent.slice(0, lastLineChar).replace(/./g, "~");
119679
+ context += lineContent.slice(0, lastLineChar).replace(/./g, "\u2594");
119652
119680
  } else {
119653
- context += lineContent.replace(/./g, "~");
119681
+ context += lineContent.replace(/./g, "\u2594");
119654
119682
  }
119655
119683
  context += resetEscapeSequence;
119656
119684
  }
@@ -119668,54 +119696,87 @@ function formatLocation(file, start2, host, color = formatColorAndReset) {
119668
119696
  return output;
119669
119697
  }
119670
119698
  function formatDiagnosticsWithColorAndContext(diagnostics, host) {
119699
+ var _a, _b;
119700
+ const terminalWidth = ((_b = (_a = sys).getWidthOfTerminal) == null ? void 0 : _b.call(_a)) ?? 0;
119701
+ const indent2 = terminalWidth < 60 ? "" : halfIndent;
119671
119702
  let output = "";
119672
119703
  for (const diagnostic of diagnostics) {
119673
- if (diagnostic.file) {
119674
- const { file, start: start2 } = diagnostic;
119675
- output += formatLocation(file, start2, host);
119676
- output += " - ";
119677
- }
119678
- output += formatColorAndReset(diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
119679
- output += formatColorAndReset(` TS${diagnostic.code}: `, "\x1B[90m" /* Grey */);
119680
- output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
119704
+ const diagnosticCode = "TS" + diagnostic.code;
119705
+ const diagnosticCatName = diagnosticCategoryName(
119706
+ diagnostic,
119707
+ /*lowerCase*/
119708
+ false
119709
+ );
119710
+ const diagnosticCatNameColored = formatColorAndReset(diagnosticCatName, getCategoryFormat(diagnostic.category));
119681
119711
  if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) {
119712
+ const { file, start: start2 } = diagnostic;
119713
+ const location = formatLocation(file, start2, host);
119714
+ const locationLength = location.replace(/\u001b[[0-9]+m/g, "").length;
119715
+ const codeLength = diagnosticCode.length;
119716
+ output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + location;
119717
+ const defaultPad = codeLength + 1;
119718
+ let padWidth = terminalWidth < 60 ? defaultPad : terminalWidth - (bullet.length + locationLength + codeLength + diagnosticCatName.length + 2);
119719
+ if (padWidth < diagnosticCode.length)
119720
+ padWidth = defaultPad;
119721
+ output += padLeft(diagnosticCatNameColored, padWidth + (diagnosticCatNameColored.length - diagnosticCatName.length));
119722
+ output += " " + diagnosticCode;
119723
+ output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, indent2, getCategoryFormat(diagnostic.category), host);
119682
119724
  output += host.getNewLine();
119683
- output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, "", getCategoryFormat(diagnostic.category), host);
119725
+ } else {
119726
+ output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + " " + diagnosticCatNameColored + " " + diagnosticCode;
119684
119727
  }
119728
+ let diagnosticText = flattenDiagnosticMessageText(
119729
+ diagnostic.messageText,
119730
+ host.getNewLine(),
119731
+ 0,
119732
+ /*pretty*/
119733
+ true
119734
+ );
119735
+ diagnosticText = diagnosticText.split(host.getNewLine()).map((text) => indent2 + text).join(host.getNewLine());
119736
+ output += diagnosticText;
119737
+ output += host.getNewLine();
119685
119738
  if (diagnostic.relatedInformation) {
119686
119739
  output += host.getNewLine();
119687
119740
  for (const { file, start: start2, length: length2, messageText } of diagnostic.relatedInformation) {
119741
+ output += indent2 + trimStringStart(flattenDiagnosticMessageText(
119742
+ messageText,
119743
+ host.getNewLine(),
119744
+ 0,
119745
+ /*pretty*/
119746
+ true
119747
+ ));
119688
119748
  if (file) {
119749
+ output += " " + formatLocation(file, start2, host);
119689
119750
  output += host.getNewLine();
119690
- output += halfIndent + formatLocation(file, start2, host);
119691
- output += formatCodeSpan(file, start2, length2, indent, "\x1B[96m" /* Cyan */, host);
119751
+ output += formatCodeSpan(file, start2, length2, indent2 + " ", "\x1B[96m" /* Cyan */, host);
119692
119752
  }
119693
- output += host.getNewLine();
119694
- output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine());
119695
119753
  }
119696
119754
  }
119697
- output += host.getNewLine();
119698
119755
  }
119699
119756
  return output;
119700
119757
  }
119701
- function flattenDiagnosticMessageText(diag2, newLine, indent3 = 0) {
119758
+ function flattenDiagnosticMessageText(diag2, newLine, indent2 = 0, pretty = false) {
119702
119759
  if (isString(diag2)) {
119703
119760
  return diag2;
119704
119761
  } else if (diag2 === void 0) {
119705
119762
  return "";
119706
119763
  }
119707
119764
  let result = "";
119708
- if (indent3) {
119765
+ if (indent2) {
119709
119766
  result += newLine;
119710
- for (let i = 0; i < indent3; i++) {
119711
- result += " ";
119712
- }
119767
+ const indentsToReplaceWithNewLines = pretty ? 1 : 0;
119768
+ if (indent2 > indentsToReplaceWithNewLines) {
119769
+ for (let i = indentsToReplaceWithNewLines; i < indent2; i++) {
119770
+ result += " ";
119771
+ }
119772
+ } else
119773
+ result += newLine;
119713
119774
  }
119714
119775
  result += diag2.messageText;
119715
- indent3++;
119776
+ indent2++;
119716
119777
  if (diag2.next) {
119717
119778
  for (const kid of diag2.next) {
119718
- result += flattenDiagnosticMessageText(kid, newLine, indent3);
119779
+ result += flattenDiagnosticMessageText(kid, newLine, indent2);
119719
119780
  }
119720
119781
  }
119721
119782
  return result;
@@ -120023,8 +120084,8 @@ var plainJSErrors = /* @__PURE__ */ new Set([
120023
120084
  // binder errors
120024
120085
  Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
120025
120086
  Diagnostics.A_module_cannot_have_multiple_default_exports.code,
120026
- Diagnostics.Another_export_default_is_here.code,
120027
- Diagnostics.The_first_export_default_is_here.code,
120087
+ Diagnostics.Another_export_default_is_here_Colon.code,
120088
+ Diagnostics.The_first_export_default_is_here_Colon.code,
120028
120089
  Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,
120029
120090
  Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,
120030
120091
  Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,
@@ -121380,6 +121441,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121380
121441
  case 265 /* TypeAliasDeclaration */:
121381
121442
  diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files));
121382
121443
  return "skip";
121444
+ case 176 /* Constructor */:
121445
+ case 174 /* MethodDeclaration */:
121446
+ case 262 /* FunctionDeclaration */:
121447
+ if (!node.body) {
121448
+ diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files));
121449
+ return "skip";
121450
+ }
121451
+ return;
121383
121452
  case 266 /* EnumDeclaration */:
121384
121453
  const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */));
121385
121454
  diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword));
@@ -122813,16 +122882,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
122813
122882
  let message2;
122814
122883
  switch (reason.kind) {
122815
122884
  case 3 /* Import */:
122816
- message2 = Diagnostics.File_is_included_via_import_here;
122885
+ message2 = Diagnostics.File_is_included_via_import_here_Colon;
122817
122886
  break;
122818
122887
  case 4 /* ReferenceFile */:
122819
- message2 = Diagnostics.File_is_included_via_reference_here;
122888
+ message2 = Diagnostics.File_is_included_via_reference_here_Colon;
122820
122889
  break;
122821
122890
  case 5 /* TypeReferenceDirective */:
122822
- message2 = Diagnostics.File_is_included_via_type_library_reference_here;
122891
+ message2 = Diagnostics.File_is_included_via_type_library_reference_here_Colon;
122823
122892
  break;
122824
122893
  case 7 /* LibReferenceDirective */:
122825
- message2 = Diagnostics.File_is_included_via_library_reference_here;
122894
+ message2 = Diagnostics.File_is_included_via_library_reference_here_Colon;
122826
122895
  break;
122827
122896
  default:
122828
122897
  Debug.assertNever(reason);
@@ -122846,14 +122915,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
122846
122915
  const matchedByFiles = getMatchedFileSpec(program, fileName);
122847
122916
  if (matchedByFiles) {
122848
122917
  configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles);
122849
- message = Diagnostics.File_is_matched_by_files_list_specified_here;
122918
+ message = Diagnostics.File_is_matched_by_files_list_specified_here_Colon;
122850
122919
  break;
122851
122920
  }
122852
122921
  const matchedByInclude = getMatchedIncludeSpec(program, fileName);
122853
122922
  if (!matchedByInclude || !isString(matchedByInclude))
122854
122923
  return void 0;
122855
122924
  configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
122856
- message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
122925
+ message = Diagnostics.File_is_matched_by_include_pattern_specified_here_Colon;
122857
122926
  break;
122858
122927
  case 1 /* SourceFromProjectReference */:
122859
122928
  case 2 /* OutputFromProjectReference */:
@@ -122874,23 +122943,23 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
122874
122943
  return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(
122875
122944
  sourceFile,
122876
122945
  referencesSyntax.elements[index],
122877
- reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
122946
+ reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here_Colon : Diagnostics.File_is_source_from_referenced_project_specified_here_Colon
122878
122947
  ) : void 0;
122879
122948
  case 8 /* AutomaticTypeDirectiveFile */:
122880
122949
  if (!options.types)
122881
122950
  return void 0;
122882
122951
  configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference);
122883
- message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
122952
+ message = Diagnostics.File_is_entry_point_of_type_library_specified_here_Colon;
122884
122953
  break;
122885
122954
  case 6 /* LibFile */:
122886
122955
  if (reason.index !== void 0) {
122887
122956
  configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]);
122888
- message = Diagnostics.File_is_library_specified_here;
122957
+ message = Diagnostics.File_is_library_specified_here_Colon;
122889
122958
  break;
122890
122959
  }
122891
122960
  const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : void 0);
122892
122961
  configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0;
122893
- message = Diagnostics.File_is_default_library_for_target_specified_here;
122962
+ message = Diagnostics.File_is_default_library_for_target_specified_here_Colon;
122894
122963
  break;
122895
122964
  default:
122896
122965
  Debug.assertNever(reason);
@@ -131850,7 +131919,7 @@ function getDisplayPartWriter() {
131850
131919
  const absoluteMaximumLength = defaultMaximumTruncationLength * 10;
131851
131920
  let displayParts;
131852
131921
  let lineStart;
131853
- let indent3;
131922
+ let indent2;
131854
131923
  let length2;
131855
131924
  resetWriter();
131856
131925
  const unknownWrite = (text) => writeKind(text, 17 /* text */);
@@ -131886,12 +131955,12 @@ function getDisplayPartWriter() {
131886
131955
  hasTrailingWhitespace: () => false,
131887
131956
  hasTrailingComment: () => false,
131888
131957
  rawWrite: notImplemented,
131889
- getIndent: () => indent3,
131958
+ getIndent: () => indent2,
131890
131959
  increaseIndent: () => {
131891
- indent3++;
131960
+ indent2++;
131892
131961
  },
131893
131962
  decreaseIndent: () => {
131894
- indent3--;
131963
+ indent2--;
131895
131964
  },
131896
131965
  clear: resetWriter
131897
131966
  };
@@ -131899,7 +131968,7 @@ function getDisplayPartWriter() {
131899
131968
  if (length2 > absoluteMaximumLength)
131900
131969
  return;
131901
131970
  if (lineStart) {
131902
- const indentString = getIndentString(indent3);
131971
+ const indentString = getIndentString(indent2);
131903
131972
  if (indentString) {
131904
131973
  length2 += indentString.length;
131905
131974
  displayParts.push(displayPart(indentString, 16 /* space */));
@@ -131931,7 +132000,7 @@ function getDisplayPartWriter() {
131931
132000
  function resetWriter() {
131932
132001
  displayParts = [];
131933
132002
  lineStart = true;
131934
- indent3 = 0;
132003
+ indent2 = 0;
131935
132004
  length2 = 0;
131936
132005
  }
131937
132006
  }
@@ -149708,7 +149777,7 @@ var errorCodes18 = [
149708
149777
  Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,
149709
149778
  Diagnostics.Cannot_find_namespace_0.code,
149710
149779
  Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
149711
- Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
149780
+ Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon.code,
149712
149781
  Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,
149713
149782
  Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code
149714
149783
  ];
@@ -150209,6 +150278,10 @@ function shouldUseRequire(sourceFile, program) {
150209
150278
  if (compilerOptions.configFile) {
150210
150279
  return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */;
150211
150280
  }
150281
+ if (sourceFile.impliedNodeFormat === 1 /* CommonJS */)
150282
+ return true;
150283
+ if (sourceFile.impliedNodeFormat === 99 /* ESNext */)
150284
+ return false;
150212
150285
  for (const otherFile of program.getSourceFiles()) {
150213
150286
  if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile))
150214
150287
  continue;
@@ -157658,6 +157731,13 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
157658
157731
  data = originToCompletionEntryData(origin);
157659
157732
  hasAction = !importStatementCompletion;
157660
157733
  }
157734
+ const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports);
157735
+ if ((parentNamedImportOrExport == null ? void 0 : parentNamedImportOrExport.kind) === 275 /* NamedImports */) {
157736
+ const possibleToken = stringToToken(name);
157737
+ if (parentNamedImportOrExport && possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) {
157738
+ insertText = `${name} as ${name}_`;
157739
+ }
157740
+ }
157661
157741
  return {
157662
157742
  name,
157663
157743
  kind: ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location),
@@ -158438,7 +158518,7 @@ function createCompletionDetails(name, kindModifiers, kind, displayParts, docume
158438
158518
  }
158439
158519
  function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken, formatContext, preferences, data, source, cancellationToken) {
158440
158520
  if (data == null ? void 0 : data.moduleSpecifier) {
158441
- if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken).replacementSpan) {
158521
+ if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) {
158442
158522
  return { codeActions: void 0, sourceDisplay: [textPart(data.moduleSpecifier)] };
158443
158523
  }
158444
158524
  }
@@ -158660,7 +158740,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
158660
158740
  let isNewIdentifierLocation = false;
158661
158741
  let flags = 0 /* None */;
158662
158742
  if (contextToken) {
158663
- const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken);
158743
+ const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile);
158664
158744
  if (importStatementCompletionInfo.keywordCompletion) {
158665
158745
  if (importStatementCompletionInfo.isKeywordOnlyCompletion) {
158666
158746
  return {
@@ -160304,7 +160384,7 @@ function tryGetObjectLiteralContextualType(node, typeChecker) {
160304
160384
  }
160305
160385
  return void 0;
160306
160386
  }
160307
- function getImportStatementCompletionInfo(contextToken) {
160387
+ function getImportStatementCompletionInfo(contextToken, sourceFile) {
160308
160388
  var _a, _b, _c;
160309
160389
  let keywordCompletion;
160310
160390
  let isKeywordOnlyCompletion = false;
@@ -160320,6 +160400,12 @@ function getImportStatementCompletionInfo(contextToken) {
160320
160400
  function getCandidate() {
160321
160401
  const parent2 = contextToken.parent;
160322
160402
  if (isImportEqualsDeclaration(parent2)) {
160403
+ const lastToken = parent2.getLastToken(sourceFile);
160404
+ if (isIdentifier(contextToken) && lastToken !== contextToken) {
160405
+ keywordCompletion = 161 /* FromKeyword */;
160406
+ isKeywordOnlyCompletion = true;
160407
+ return void 0;
160408
+ }
160323
160409
  keywordCompletion = contextToken.kind === 156 /* TypeKeyword */ ? void 0 : 156 /* TypeKeyword */;
160324
160410
  return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0;
160325
160411
  }
@@ -160821,7 +160907,7 @@ function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, c
160821
160907
  extensionOptions,
160822
160908
  host,
160823
160909
  /*moduleSpecifierIsRelative*/
160824
- false,
160910
+ true,
160825
160911
  scriptPath
160826
160912
  ).values());
160827
160913
  }
@@ -167908,8 +167994,8 @@ var ChangeTracker = class _ChangeTracker {
167908
167994
  const startPosition = getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition);
167909
167995
  const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
167910
167996
  const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
167911
- const indent3 = sourceFile.text.slice(lineStartPosition, startPosition);
167912
- const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent3}`;
167997
+ const indent2 = sourceFile.text.slice(lineStartPosition, startPosition);
167998
+ const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent2}`;
167913
167999
  this.insertText(sourceFile, token.getStart(sourceFile), text);
167914
168000
  }
167915
168001
  insertJsdocCommentBefore(sourceFile, node, tag) {
@@ -167928,8 +168014,8 @@ var ChangeTracker = class _ChangeTracker {
167928
168014
  }
167929
168015
  }
167930
168016
  const startPosition = getPrecedingNonSpaceCharacterPosition(sourceFile.text, fnStart - 1);
167931
- const indent3 = sourceFile.text.slice(startPosition, fnStart);
167932
- this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent3 });
168017
+ const indent2 = sourceFile.text.slice(startPosition, fnStart);
168018
+ this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent2 });
167933
168019
  }
167934
168020
  createJSDocText(sourceFile, node) {
167935
168021
  const comments = flatMap(node.jsDoc, (jsDoc2) => isString(jsDoc2.comment) ? factory.createJSDocText(jsDoc2.comment) : jsDoc2.comment);
@@ -173731,6 +173817,7 @@ __export(ts_exports2, {
173731
173817
  startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd,
173732
173818
  startOnNewLine: () => startOnNewLine,
173733
173819
  startTracing: () => startTracing,
173820
+ startWhitespaceCount: () => startWhitespaceCount,
173734
173821
  startsWith: () => startsWith,
173735
173822
  startsWithDirectory: () => startsWithDirectory,
173736
173823
  startsWithUnderscore: () => startsWithUnderscore,
@@ -174115,7 +174202,7 @@ __export(ts_server_exports3, {
174115
174202
  getLocationInNewDocument: () => getLocationInNewDocument,
174116
174203
  hasArgument: () => hasArgument,
174117
174204
  hasNoTypeScriptSource: () => hasNoTypeScriptSource,
174118
- indent: () => indent2,
174205
+ indent: () => indent,
174119
174206
  isConfigFile: () => isConfigFile,
174120
174207
  isConfiguredProject: () => isConfiguredProject,
174121
174208
  isDynamicFileName: () => isDynamicFileName,
@@ -174679,7 +174766,7 @@ function removeSorted(array, remove, compare) {
174679
174766
  }
174680
174767
  }
174681
174768
  var indentStr = "\n ";
174682
- function indent2(str) {
174769
+ function indent(str) {
174683
174770
  return indentStr + str.replace(/\n/g, indentStr);
174684
174771
  }
174685
174772
  function stringifyIndented(json) {
@@ -181347,7 +181434,7 @@ function formatMessage2(msg, logger, byteLength, newLine) {
181347
181434
  const verboseLogging = logger.hasLevel(3 /* verbose */);
181348
181435
  const json = JSON.stringify(msg);
181349
181436
  if (verboseLogging) {
181350
- logger.info(`${msg.type}:${indent2(JSON.stringify(msg, void 0, " "))}`);
181437
+ logger.info(`${msg.type}:${indent(JSON.stringify(msg, void 0, " "))}`);
181351
181438
  }
181352
181439
  const len = byteLength(json, "utf8");
181353
181440
  return `Content-Length: ${1 + len}\r
@@ -182568,9 +182655,9 @@ var Session3 = class _Session {
182568
182655
  logErrorWorker(err, cmd, fileRequest) {
182569
182656
  let msg = "Exception on executing command " + cmd;
182570
182657
  if (err.message) {
182571
- msg += ":\n" + indent2(err.message);
182658
+ msg += ":\n" + indent(err.message);
182572
182659
  if (err.stack) {
182573
- msg += "\n" + indent2(err.stack);
182660
+ msg += "\n" + indent(err.stack);
182574
182661
  }
182575
182662
  }
182576
182663
  if (this.logger.hasLevel(3 /* verbose */)) {
@@ -182582,7 +182669,7 @@ var Session3 = class _Session {
182582
182669
  const text = getSnapshotText(scriptInfo.getSnapshot());
182583
182670
  msg += `
182584
182671
 
182585
- File text of ${fileRequest.file}:${indent2(text)}
182672
+ File text of ${fileRequest.file}:${indent(text)}
182586
182673
  `;
182587
182674
  }
182588
182675
  } catch {
@@ -184423,7 +184510,7 @@ ${e.message}`;
184423
184510
  if (this.logger.hasLevel(2 /* requestTime */)) {
184424
184511
  start2 = this.hrtime();
184425
184512
  if (this.logger.hasLevel(3 /* verbose */)) {
184426
- this.logger.info(`request:${indent2(this.toStringMessage(message))}`);
184513
+ this.logger.info(`request:${indent(this.toStringMessage(message))}`);
184427
184514
  }
184428
184515
  }
184429
184516
  let request;
@@ -185362,7 +185449,7 @@ __export(ts_server_exports4, {
185362
185449
  getLogLevel: () => getLogLevel,
185363
185450
  hasArgument: () => hasArgument,
185364
185451
  hasNoTypeScriptSource: () => hasNoTypeScriptSource,
185365
- indent: () => indent2,
185452
+ indent: () => indent,
185366
185453
  initializeNodeSystem: () => initializeNodeSystem,
185367
185454
  isConfigFile: () => isConfigFile,
185368
185455
  isConfiguredProject: () => isConfiguredProject,
@@ -186009,7 +186096,7 @@ function startNodeSession(options, logger, cancellationToken) {
186009
186096
  const verboseLogging = logger.hasLevel(3 /* verbose */);
186010
186097
  if (verboseLogging) {
186011
186098
  const json = JSON.stringify(msg);
186012
- logger.info(`${msg.type}:${indent2(json)}`);
186099
+ logger.info(`${msg.type}:${indent(json)}`);
186013
186100
  }
186014
186101
  process.send(msg);
186015
186102
  }
@@ -188244,6 +188331,7 @@ start(initializeNodeSystem(), require("os").platform());
188244
188331
  startEndOverlapsWithStartEnd,
188245
188332
  startOnNewLine,
188246
188333
  startTracing,
188334
+ startWhitespaceCount,
188247
188335
  startsWith,
188248
188336
  startsWithDirectory,
188249
188337
  startsWithUnderscore,