@typescript-deploys/pr-build 4.6.0-pr-47126-18 → 4.6.0-pr-47337-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.6";
72
- ts.version = ts.versionMajorMinor + ".0-insiders.20220119";
72
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220121";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -1855,14 +1855,6 @@ var ts;
1855
1855
  }
1856
1856
  return s.slice(0, end + 1);
1857
1857
  }
1858
- function startWhitespaceCount(s) {
1859
- for (var i = 0; i < s.length; i++) {
1860
- if (!ts.isWhiteSpaceLike(s.charCodeAt(i)))
1861
- return i;
1862
- }
1863
- return s.length;
1864
- }
1865
- ts.startWhitespaceCount = startWhitespaceCount;
1866
1858
  })(ts || (ts = {}));
1867
1859
  var ts;
1868
1860
  (function (ts) {
@@ -4179,9 +4171,13 @@ var ts;
4179
4171
  }
4180
4172
  ts.getFileWatcherEventKind = getFileWatcherEventKind;
4181
4173
  ts.ignoredPaths = ["/node_modules/.", "/.git", "/.#"];
4182
- ts.sysLog = ts.noop;
4174
+ var curSysLog = ts.noop;
4175
+ function sysLog(s) {
4176
+ return curSysLog(s);
4177
+ }
4178
+ ts.sysLog = sysLog;
4183
4179
  function setSysLog(logger) {
4184
- ts.sysLog = logger;
4180
+ curSysLog = logger;
4185
4181
  }
4186
4182
  ts.setSysLog = setSysLog;
4187
4183
  function createDirectoryWatcherSupportingRecursive(_a) {
@@ -4301,7 +4297,7 @@ var ts;
4301
4297
  }
4302
4298
  function onTimerToUpdateChildWatches() {
4303
4299
  timerToUpdateChildWatches = undefined;
4304
- ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
4300
+ sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
4305
4301
  var start = ts.timestamp();
4306
4302
  var invokeMap = new ts.Map();
4307
4303
  while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
@@ -4312,7 +4308,7 @@ var ts;
4312
4308
  var hasChanges = updateChildWatches(dirName, dirPath, options);
4313
4309
  invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
4314
4310
  }
4315
- ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
4311
+ sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
4316
4312
  callbackCache.forEach(function (callbacks, rootDirName) {
4317
4313
  var existing = invokeMap.get(rootDirName);
4318
4314
  if (existing) {
@@ -4328,7 +4324,7 @@ var ts;
4328
4324
  }
4329
4325
  });
4330
4326
  var elapsed = ts.timestamp() - start;
4331
- ts.sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
4327
+ sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
4332
4328
  }
4333
4329
  function removeChildWatches(parentWatcher) {
4334
4330
  if (!parentWatcher)
@@ -4830,7 +4826,7 @@ var ts;
4830
4826
  }
4831
4827
  };
4832
4828
  function invokeCallbackAndUpdateWatcher(createWatcher) {
4833
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4829
+ sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
4834
4830
  callback("rename", "");
4835
4831
  if (watcher) {
4836
4832
  watcher.close();
@@ -4847,7 +4843,7 @@ var ts;
4847
4843
  }
4848
4844
  }
4849
4845
  if (hitSystemWatcherLimit) {
4850
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
4846
+ sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
4851
4847
  return watchPresentFileSystemEntryWithFsWatchFile();
4852
4848
  }
4853
4849
  try {
@@ -4859,7 +4855,7 @@ var ts;
4859
4855
  }
4860
4856
  catch (e) {
4861
4857
  hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
4862
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
4858
+ sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
4863
4859
  return watchPresentFileSystemEntryWithFsWatchFile();
4864
4860
  }
4865
4861
  }
@@ -5079,7 +5075,7 @@ var ts;
5079
5075
  Identifier_expected: diag(1003, ts.DiagnosticCategory.Error, "Identifier_expected_1003", "Identifier expected."),
5080
5076
  _0_expected: diag(1005, ts.DiagnosticCategory.Error, "_0_expected_1005", "'{0}' expected."),
5081
5077
  A_file_cannot_have_a_reference_to_itself: diag(1006, ts.DiagnosticCategory.Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."),
5082
- The_parser_expected_to_find_a_to_match_the_token_here_Colon: diag(1007, ts.DiagnosticCategory.Error, "The_parser_expected_to_find_a_to_match_the_token_here_Colon_1007", "The parser expected to find a '}' to match the '{' token here:"),
5078
+ The_parser_expected_to_find_a_to_match_the_token_here: diag(1007, ts.DiagnosticCategory.Error, "The_parser_expected_to_find_a_to_match_the_token_here_1007", "The parser expected to find a '}' to match the '{' token here."),
5083
5079
  Trailing_comma_not_allowed: diag(1009, ts.DiagnosticCategory.Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."),
5084
5080
  Asterisk_Slash_expected: diag(1010, ts.DiagnosticCategory.Error, "Asterisk_Slash_expected_1010", "'*/' expected."),
5085
5081
  An_element_access_expression_should_take_an_argument: diag(1011, ts.DiagnosticCategory.Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."),
@@ -5320,7 +5316,7 @@ var ts;
5320
5316
  unique_symbol_types_are_not_allowed_here: diag(1335, ts.DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."),
5321
5317
  An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, ts.DiagnosticCategory.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."),
5322
5318
  infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, ts.DiagnosticCategory.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."),
5323
- Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_Colon: diag(1339, ts.DiagnosticCategory.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:"),
5319
+ Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.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."),
5324
5320
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.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}')'?"),
5325
5321
  Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
5326
5322
  The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext: diag(1343, ts.DiagnosticCategory.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', 'node12', or 'nodenext'."),
@@ -5328,7 +5324,7 @@ var ts;
5328
5324
  An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
5329
5325
  This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
5330
5326
  use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, ts.DiagnosticCategory.Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."),
5331
- Non_simple_parameter_declared_here_Colon: diag(1348, ts.DiagnosticCategory.Error, "Non_simple_parameter_declared_here_Colon_1348", "Non-simple parameter declared here:"),
5327
+ Non_simple_parameter_declared_here: diag(1348, ts.DiagnosticCategory.Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."),
5332
5328
  use_strict_directive_used_here: diag(1349, ts.DiagnosticCategory.Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."),
5333
5329
  Print_the_final_configuration_instead_of_building: diag(1350, ts.DiagnosticCategory.Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."),
5334
5330
  An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, ts.DiagnosticCategory.Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."),
@@ -5352,8 +5348,8 @@ var ts;
5352
5348
  Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"),
5353
5349
  Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, ts.DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"),
5354
5350
  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, ts.DiagnosticCategory.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."),
5355
- _0_was_imported_here_Colon: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_Colon_1376", "'{0}' was imported here:"),
5356
- _0_was_exported_here_Colon: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_Colon_1377", "'{0}' was exported here:"),
5351
+ _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
5352
+ _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
5357
5353
  Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
5358
5354
  An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.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'."),
5359
5355
  An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.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'."),
@@ -5374,34 +5370,34 @@ var ts;
5374
5370
  Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, ts.DiagnosticCategory.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"),
5375
5371
  Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, ts.DiagnosticCategory.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"),
5376
5372
  Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, ts.DiagnosticCategory.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"),
5377
- File_is_included_via_import_here_Colon: diag(1399, ts.DiagnosticCategory.Message, "File_is_included_via_import_here_Colon_1399", "File is included via import here:"),
5373
+ File_is_included_via_import_here: diag(1399, ts.DiagnosticCategory.Message, "File_is_included_via_import_here_1399", "File is included via import here."),
5378
5374
  Referenced_via_0_from_file_1: diag(1400, ts.DiagnosticCategory.Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"),
5379
- File_is_included_via_reference_here_Colon: diag(1401, ts.DiagnosticCategory.Message, "File_is_included_via_reference_here_Colon_1401", "File is included via reference here:"),
5375
+ File_is_included_via_reference_here: diag(1401, ts.DiagnosticCategory.Message, "File_is_included_via_reference_here_1401", "File is included via reference here."),
5380
5376
  Type_library_referenced_via_0_from_file_1: diag(1402, ts.DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"),
5381
5377
  Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, ts.DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),
5382
- File_is_included_via_type_library_reference_here_Colon: diag(1404, ts.DiagnosticCategory.Message, "File_is_included_via_type_library_reference_here_Colon_1404", "File is included via type library reference here:"),
5378
+ File_is_included_via_type_library_reference_here: diag(1404, ts.DiagnosticCategory.Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."),
5383
5379
  Library_referenced_via_0_from_file_1: diag(1405, ts.DiagnosticCategory.Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"),
5384
- File_is_included_via_library_reference_here_Colon: diag(1406, ts.DiagnosticCategory.Message, "File_is_included_via_library_reference_here_Colon_1406", "File is included via library reference here:"),
5380
+ File_is_included_via_library_reference_here: diag(1406, ts.DiagnosticCategory.Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."),
5385
5381
  Matched_by_include_pattern_0_in_1: diag(1407, ts.DiagnosticCategory.Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"),
5386
- File_is_matched_by_include_pattern_specified_here_Colon: diag(1408, ts.DiagnosticCategory.Message, "File_is_matched_by_include_pattern_specified_here_Colon_1408", "File is matched by include pattern specified here:"),
5382
+ File_is_matched_by_include_pattern_specified_here: diag(1408, ts.DiagnosticCategory.Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."),
5387
5383
  Part_of_files_list_in_tsconfig_json: diag(1409, ts.DiagnosticCategory.Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"),
5388
- File_is_matched_by_files_list_specified_here_Colon: diag(1410, ts.DiagnosticCategory.Message, "File_is_matched_by_files_list_specified_here_Colon_1410", "File is matched by 'files' list specified here:"),
5384
+ File_is_matched_by_files_list_specified_here: diag(1410, ts.DiagnosticCategory.Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."),
5389
5385
  Output_from_referenced_project_0_included_because_1_specified: diag(1411, ts.DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"),
5390
5386
  Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, ts.DiagnosticCategory.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'"),
5391
- File_is_output_from_referenced_project_specified_here_Colon: diag(1413, ts.DiagnosticCategory.Message, "File_is_output_from_referenced_project_specified_here_Colon_1413", "File is output from referenced project specified here:"),
5387
+ File_is_output_from_referenced_project_specified_here: diag(1413, ts.DiagnosticCategory.Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."),
5392
5388
  Source_from_referenced_project_0_included_because_1_specified: diag(1414, ts.DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"),
5393
5389
  Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, ts.DiagnosticCategory.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'"),
5394
- File_is_source_from_referenced_project_specified_here_Colon: diag(1416, ts.DiagnosticCategory.Message, "File_is_source_from_referenced_project_specified_here_Colon_1416", "File is source from referenced project specified here:"),
5390
+ File_is_source_from_referenced_project_specified_here: diag(1416, ts.DiagnosticCategory.Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."),
5395
5391
  Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, ts.DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"),
5396
5392
  Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, ts.DiagnosticCategory.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}'"),
5397
- File_is_entry_point_of_type_library_specified_here_Colon: diag(1419, ts.DiagnosticCategory.Message, "File_is_entry_point_of_type_library_specified_here_Colon_1419", "File is entry point of type library specified here:"),
5393
+ File_is_entry_point_of_type_library_specified_here: diag(1419, ts.DiagnosticCategory.Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."),
5398
5394
  Entry_point_for_implicit_type_library_0: diag(1420, ts.DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"),
5399
5395
  Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, ts.DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"),
5400
5396
  Library_0_specified_in_compilerOptions: diag(1422, ts.DiagnosticCategory.Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"),
5401
- File_is_library_specified_here_Colon: diag(1423, ts.DiagnosticCategory.Message, "File_is_library_specified_here_Colon_1423", "File is library specified here:"),
5397
+ File_is_library_specified_here: diag(1423, ts.DiagnosticCategory.Message, "File_is_library_specified_here_1423", "File is library specified here."),
5402
5398
  Default_library: diag(1424, ts.DiagnosticCategory.Message, "Default_library_1424", "Default library"),
5403
5399
  Default_library_for_target_0: diag(1425, ts.DiagnosticCategory.Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"),
5404
- File_is_default_library_for_target_specified_here_Colon: diag(1426, ts.DiagnosticCategory.Message, "File_is_default_library_for_target_specified_here_Colon_1426", "File is default library for target specified here:"),
5400
+ File_is_default_library_for_target_specified_here: diag(1426, ts.DiagnosticCategory.Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."),
5405
5401
  Root_file_specified_for_compilation: diag(1427, ts.DiagnosticCategory.Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"),
5406
5402
  File_is_output_of_project_reference_source_0: diag(1428, ts.DiagnosticCategory.Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"),
5407
5403
  File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
@@ -5427,6 +5423,7 @@ var ts;
5427
5423
  Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
5428
5424
  The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
5429
5425
  Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
5426
+ catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
5430
5427
  The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
5431
5428
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
5432
5429
  Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
@@ -5780,7 +5777,7 @@ var ts;
5780
5777
  _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, ts.DiagnosticCategory.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}'?"),
5781
5778
  An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: diag(2691, ts.DiagnosticCategory.Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."),
5782
5779
  _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, ts.DiagnosticCategory.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."),
5783
- _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon: diag(2693, ts.DiagnosticCategory.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:"),
5780
+ _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, ts.DiagnosticCategory.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."),
5784
5781
  Namespace_0_has_no_exported_member_1: diag(2694, ts.DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."),
5785
5782
  Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, ts.DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", true),
5786
5783
  The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, ts.DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),
@@ -5789,7 +5786,7 @@ var ts;
5789
5786
  Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, ts.DiagnosticCategory.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}'."),
5790
5787
  Rest_types_may_only_be_created_from_object_types: diag(2700, ts.DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."),
5791
5788
  The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, ts.DiagnosticCategory.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."),
5792
- _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_Colon: diag(2702, ts.DiagnosticCategory.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:"),
5789
+ _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, ts.DiagnosticCategory.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."),
5793
5790
  The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, ts.DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."),
5794
5791
  The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, ts.DiagnosticCategory.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."),
5795
5792
  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, ts.DiagnosticCategory.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."),
@@ -5815,12 +5812,12 @@ var ts;
5815
5812
  Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, ts.DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."),
5816
5813
  Cannot_find_lib_definition_for_0: diag(2726, ts.DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
5817
5814
  Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, ts.DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"),
5818
- _0_is_declared_here_Colon: diag(2728, ts.DiagnosticCategory.Message, "_0_is_declared_here_Colon_2728", "'{0}' is declared here:"),
5815
+ _0_is_declared_here: diag(2728, ts.DiagnosticCategory.Message, "_0_is_declared_here_2728", "'{0}' is declared here."),
5819
5816
  Property_0_is_used_before_its_initialization: diag(2729, ts.DiagnosticCategory.Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."),
5820
5817
  An_arrow_function_cannot_have_a_this_parameter: diag(2730, ts.DiagnosticCategory.Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."),
5821
5818
  Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, ts.DiagnosticCategory.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(...)'."),
5822
5819
  Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, ts.DiagnosticCategory.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."),
5823
- Property_0_was_also_declared_here_Colon: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_Colon_2733", "Property '{0}' was also declared here:"),
5820
+ Property_0_was_also_declared_here: diag(2733, ts.DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."),
5824
5821
  Are_you_missing_a_semicolon: diag(2734, ts.DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"),
5825
5822
  Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, ts.DiagnosticCategory.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}'?"),
5826
5823
  Operator_0_cannot_be_applied_to_type_1: diag(2736, ts.DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."),
@@ -5837,10 +5834,10 @@ var ts;
5837
5834
  _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, ts.DiagnosticCategory.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}'."),
5838
5835
  Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided: diag(2748, ts.DiagnosticCategory.Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."),
5839
5836
  _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, ts.DiagnosticCategory.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}'?"),
5840
- The_implementation_signature_is_declared_here_Colon: diag(2750, ts.DiagnosticCategory.Error, "The_implementation_signature_is_declared_here_Colon_2750", "The implementation signature is declared here:"),
5837
+ The_implementation_signature_is_declared_here: diag(2750, ts.DiagnosticCategory.Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."),
5841
5838
  Circularity_originates_in_type_at_this_location: diag(2751, ts.DiagnosticCategory.Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."),
5842
- The_first_export_default_is_here_Colon: diag(2752, ts.DiagnosticCategory.Error, "The_first_export_default_is_here_Colon_2752", "The first export default is here:"),
5843
- Another_export_default_is_here_Colon: diag(2753, ts.DiagnosticCategory.Error, "Another_export_default_is_here_Colon_2753", "Another export default is here:"),
5839
+ The_first_export_default_is_here: diag(2752, ts.DiagnosticCategory.Error, "The_first_export_default_is_here_2752", "The first export default is here."),
5840
+ Another_export_default_is_here: diag(2753, ts.DiagnosticCategory.Error, "Another_export_default_is_here_2753", "Another export default is here."),
5844
5841
  super_may_not_use_type_arguments: diag(2754, ts.DiagnosticCategory.Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."),
5845
5842
  No_constituent_of_type_0_is_callable: diag(2755, ts.DiagnosticCategory.Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."),
5846
5843
  Not_all_constituents_of_type_0_are_callable: diag(2756, ts.DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."),
@@ -5858,7 +5855,7 @@ var ts;
5858
5855
  The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, ts.DiagnosticCategory.Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."),
5859
5856
  No_overload_matches_this_call: diag(2769, ts.DiagnosticCategory.Error, "No_overload_matches_this_call_2769", "No overload matches this call."),
5860
5857
  The_last_overload_gave_the_following_error: diag(2770, ts.DiagnosticCategory.Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."),
5861
- The_last_overload_is_declared_here_Colon: diag(2771, ts.DiagnosticCategory.Error, "The_last_overload_is_declared_here_Colon_2771", "The last overload is declared here:"),
5858
+ The_last_overload_is_declared_here: diag(2771, ts.DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."),
5862
5859
  Overload_0_of_1_2_gave_the_following_error: diag(2772, ts.DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."),
5863
5860
  Did_you_forget_to_use_await: diag(2773, ts.DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"),
5864
5861
  This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, ts.DiagnosticCategory.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?"),
@@ -5885,7 +5882,7 @@ var ts;
5885
5882
  The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, ts.DiagnosticCategory.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."),
5886
5883
  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, ts.DiagnosticCategory.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."),
5887
5884
  A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, ts.DiagnosticCategory.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'."),
5888
- The_declaration_was_marked_as_deprecated_here_Colon: diag(2798, ts.DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_Colon_2798", "The declaration was marked as deprecated here:"),
5885
+ The_declaration_was_marked_as_deprecated_here: diag(2798, ts.DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."),
5889
5886
  Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, ts.DiagnosticCategory.Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."),
5890
5887
  Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, ts.DiagnosticCategory.Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."),
5891
5888
  This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, ts.DiagnosticCategory.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."),
@@ -5914,6 +5911,7 @@ var ts;
5914
5911
  Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path."),
5915
5912
  Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"),
5916
5913
  Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
5914
+ Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
5917
5915
  Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
5918
5916
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
5919
5917
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -6251,8 +6249,8 @@ var ts;
6251
6249
  Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, ts.DiagnosticCategory.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}"),
6252
6250
  Conflicts_are_in_this_file: diag(6201, ts.DiagnosticCategory.Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."),
6253
6251
  Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, ts.DiagnosticCategory.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}"),
6254
- _0_was_also_declared_here_Colon: diag(6203, ts.DiagnosticCategory.Message, "_0_was_also_declared_here_Colon_6203", "'{0}' was also declared here:"),
6255
- and_here_Colon: diag(6204, ts.DiagnosticCategory.Message, "and_here_Colon_6204", "and here:"),
6252
+ _0_was_also_declared_here: diag(6203, ts.DiagnosticCategory.Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."),
6253
+ and_here: diag(6204, ts.DiagnosticCategory.Message, "and_here_6204", "and here."),
6256
6254
  All_type_parameters_are_unused: diag(6205, ts.DiagnosticCategory.Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."),
6257
6255
  package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, ts.DiagnosticCategory.Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."),
6258
6256
  package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, ts.DiagnosticCategory.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}'."),
@@ -6610,7 +6608,7 @@ var ts;
6610
6608
  You_cannot_rename_a_module_via_a_global_import: diag(8031, ts.DiagnosticCategory.Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."),
6611
6609
  Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, ts.DiagnosticCategory.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}'."),
6612
6610
  A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, ts.DiagnosticCategory.Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."),
6613
- The_tag_was_first_specified_here_Colon: diag(8034, ts.DiagnosticCategory.Error, "The_tag_was_first_specified_here_Colon_8034", "The tag was first specified here:"),
6611
+ The_tag_was_first_specified_here: diag(8034, ts.DiagnosticCategory.Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."),
6614
6612
  Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, ts.DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),
6615
6613
  Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, ts.DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),
6616
6614
  JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, ts.DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."),
@@ -12285,7 +12283,7 @@ var ts;
12285
12283
  }
12286
12284
  ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
12287
12285
  function getExternalModuleRequireArgument(node) {
12288
- return isRequireVariableDeclaration(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
12286
+ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
12289
12287
  }
12290
12288
  ts.getExternalModuleRequireArgument = getExternalModuleRequireArgument;
12291
12289
  function isInternalModuleImportEqualsDeclaration(node) {
@@ -12339,17 +12337,26 @@ var ts;
12339
12337
  return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg);
12340
12338
  }
12341
12339
  ts.isRequireCall = isRequireCall;
12342
- function isRequireVariableDeclaration(node) {
12340
+ function isVariableDeclarationInitializedToRequire(node) {
12341
+ return isVariableDeclarationInitializedWithRequireHelper(node, false);
12342
+ }
12343
+ ts.isVariableDeclarationInitializedToRequire = isVariableDeclarationInitializedToRequire;
12344
+ function isVariableDeclarationInitializedToBareOrAccessedRequire(node) {
12345
+ return isVariableDeclarationInitializedWithRequireHelper(node, true);
12346
+ }
12347
+ ts.isVariableDeclarationInitializedToBareOrAccessedRequire = isVariableDeclarationInitializedToBareOrAccessedRequire;
12348
+ function isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) {
12343
12349
  if (node.kind === 202) {
12344
12350
  node = node.parent.parent;
12345
12351
  }
12346
- return ts.isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), true);
12352
+ return ts.isVariableDeclaration(node) &&
12353
+ !!node.initializer &&
12354
+ isRequireCall(allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer, true);
12347
12355
  }
12348
- ts.isRequireVariableDeclaration = isRequireVariableDeclaration;
12349
12356
  function isRequireVariableStatement(node) {
12350
12357
  return ts.isVariableStatement(node)
12351
12358
  && node.declarationList.declarations.length > 0
12352
- && ts.every(node.declarationList.declarations, function (decl) { return isRequireVariableDeclaration(decl); });
12359
+ && ts.every(node.declarationList.declarations, function (decl) { return isVariableDeclarationInitializedToRequire(decl); });
12353
12360
  }
12354
12361
  ts.isRequireVariableStatement = isRequireVariableStatement;
12355
12362
  function isSingleOrDoubleQuote(charCode) {
@@ -15309,7 +15316,7 @@ var ts;
15309
15316
  getSourceMapSourceConstructor: function () { return SourceMapSource; },
15310
15317
  };
15311
15318
  function setObjectAllocator(alloc) {
15312
- ts.objectAllocator = alloc;
15319
+ Object.assign(ts.objectAllocator, alloc);
15313
15320
  }
15314
15321
  ts.setObjectAllocator = setObjectAllocator;
15315
15322
  function formatStringFromArgs(text, args, baseIndex) {
@@ -15317,12 +15324,19 @@ var ts;
15317
15324
  return text.replace(/{(\d+)}/g, function (_match, index) { return "" + ts.Debug.checkDefined(args[+index + baseIndex]); });
15318
15325
  }
15319
15326
  ts.formatStringFromArgs = formatStringFromArgs;
15327
+ var localizedDiagnosticMessages;
15320
15328
  function setLocalizedDiagnosticMessages(messages) {
15321
- ts.localizedDiagnosticMessages = messages;
15329
+ localizedDiagnosticMessages = messages;
15322
15330
  }
15323
15331
  ts.setLocalizedDiagnosticMessages = setLocalizedDiagnosticMessages;
15332
+ function maybeSetLocalizedDiagnosticMessages(getMessages) {
15333
+ if (!localizedDiagnosticMessages && getMessages) {
15334
+ localizedDiagnosticMessages = getMessages();
15335
+ }
15336
+ }
15337
+ ts.maybeSetLocalizedDiagnosticMessages = maybeSetLocalizedDiagnosticMessages;
15324
15338
  function getLocaleSpecificMessage(message) {
15325
- return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message;
15339
+ return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message;
15326
15340
  }
15327
15341
  ts.getLocaleSpecificMessage = getLocaleSpecificMessage;
15328
15342
  function createDetachedDiagnostic(fileName, start, length, message) {
@@ -27903,7 +27917,7 @@ var ts;
27903
27917
  if (!parseExpected(19)) {
27904
27918
  var lastError = ts.lastOrUndefined(parseDiagnostics);
27905
27919
  if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
27906
- ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here_Colon));
27920
+ ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
27907
27921
  }
27908
27922
  }
27909
27923
  return finishNode(factory.createObjectLiteralExpression(properties, multiLine), pos);
@@ -27972,7 +27986,7 @@ var ts;
27972
27986
  if (!parseExpected(19)) {
27973
27987
  var lastError = ts.lastOrUndefined(parseDiagnostics);
27974
27988
  if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
27975
- ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here_Colon));
27989
+ ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
27976
27990
  }
27977
27991
  }
27978
27992
  var result = withJSDoc(finishNode(factory.createBlock(statements, multiLine), pos), hasJSDoc);
@@ -28172,7 +28186,7 @@ var ts;
28172
28186
  var catchClause = token() === 83 ? parseCatchClause() : undefined;
28173
28187
  var finallyBlock;
28174
28188
  if (!catchClause || token() === 96) {
28175
- parseExpected(96);
28189
+ parseExpected(96, ts.Diagnostics.catch_or_finally_expected);
28176
28190
  finallyBlock = parseBlock(false);
28177
28191
  }
28178
28192
  return withJSDoc(finishNode(factory.createTryStatement(tryBlock, catchClause, finallyBlock), pos), hasJSDoc);
@@ -29096,7 +29110,7 @@ var ts;
29096
29110
  var pos = getNodePos();
29097
29111
  var name = ts.tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(10);
29098
29112
  parseExpected(58);
29099
- var value = parseLiteralLikeNode(10);
29113
+ var value = parseAssignmentExpressionOrHigher();
29100
29114
  return finishNode(factory.createAssertEntry(name, value), pos);
29101
29115
  }
29102
29116
  function parseAssertClause() {
@@ -29109,7 +29123,7 @@ var ts;
29109
29123
  if (!parseExpected(19)) {
29110
29124
  var lastError = ts.lastOrUndefined(parseDiagnostics);
29111
29125
  if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
29112
- ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here_Colon));
29126
+ ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
29113
29127
  }
29114
29128
  }
29115
29129
  return finishNode(factory.createAssertClause(elements, multiLine), pos);
@@ -29986,7 +30000,7 @@ var ts;
29986
30000
  parseErrorAtCurrentToken(ts.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
29987
30001
  var lastError = ts.lastOrUndefined(parseDiagnostics);
29988
30002
  if (lastError) {
29989
- ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, 0, 0, ts.Diagnostics.The_tag_was_first_specified_here_Colon));
30003
+ ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, 0, 0, ts.Diagnostics.The_tag_was_first_specified_here));
29990
30004
  }
29991
30005
  break;
29992
30006
  }
@@ -35718,9 +35732,9 @@ var ts;
35718
35732
  ts.forEach(symbol.declarations, function (declaration, index) {
35719
35733
  var decl = ts.getNameOfDeclaration(declaration) || declaration;
35720
35734
  var diag = createDiagnosticForNode(decl, message_1, messageNeedsName_1 ? getDisplayName(declaration) : undefined);
35721
- file.bindDiagnostics.push(multipleDefaultExports_1 ? ts.addRelatedInfo(diag, createDiagnosticForNode(declarationName_1, index === 0 ? ts.Diagnostics.Another_export_default_is_here_Colon : ts.Diagnostics.and_here_Colon)) : diag);
35735
+ file.bindDiagnostics.push(multipleDefaultExports_1 ? ts.addRelatedInfo(diag, createDiagnosticForNode(declarationName_1, index === 0 ? ts.Diagnostics.Another_export_default_is_here : ts.Diagnostics.and_here)) : diag);
35722
35736
  if (multipleDefaultExports_1) {
35723
- relatedInformation_1.push(createDiagnosticForNode(decl, ts.Diagnostics.The_first_export_default_is_here_Colon));
35737
+ relatedInformation_1.push(createDiagnosticForNode(decl, ts.Diagnostics.The_first_export_default_is_here));
35724
35738
  }
35725
35739
  });
35726
35740
  var diag = createDiagnosticForNode(declarationName_1, message_1, messageNeedsName_1 ? getDisplayName(node) : undefined);
@@ -37235,6 +37249,8 @@ var ts;
37235
37249
  return;
37236
37250
  }
37237
37251
  ts.setParent(node, parent);
37252
+ if (ts.tracing)
37253
+ node.tracingPath = file.path;
37238
37254
  var saveInStrictMode = inStrictMode;
37239
37255
  bindWorker(node);
37240
37256
  if (node.kind > 159) {
@@ -37940,7 +37956,7 @@ var ts;
37940
37956
  checkStrictModeEvalOrArguments(node, node.name);
37941
37957
  }
37942
37958
  if (!ts.isBindingPattern(node.name)) {
37943
- if (ts.isInJSFile(node) && ts.isRequireVariableDeclaration(node) && !ts.getJSDocTypeTag(node)) {
37959
+ if (ts.isInJSFile(node) && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node) && !ts.getJSDocTypeTag(node)) {
37944
37960
  declareSymbolAndAddToSymbolTable(node, 2097152, 2097152);
37945
37961
  }
37946
37962
  else if (ts.isBlockOrCatchScoped(node)) {
@@ -39114,7 +39130,7 @@ var ts;
39114
39130
  function addDeprecatedSuggestionWorker(declarations, diagnostic) {
39115
39131
  var deprecatedTag = Array.isArray(declarations) ? ts.forEach(declarations, ts.getJSDocDeprecatedTag) : ts.getJSDocDeprecatedTag(declarations);
39116
39132
  if (deprecatedTag) {
39117
- ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(deprecatedTag, ts.Diagnostics.The_declaration_was_marked_as_deprecated_here_Colon));
39133
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(deprecatedTag, ts.Diagnostics.The_declaration_was_marked_as_deprecated_here));
39118
39134
  }
39119
39135
  suggestionDiagnostics.add(diagnostic);
39120
39136
  return diagnostic;
@@ -39285,8 +39301,8 @@ var ts;
39285
39301
  if (adjustedNode === errorNode)
39286
39302
  return "continue";
39287
39303
  err.relatedInformation = err.relatedInformation || [];
39288
- var leadingMessage = ts.createDiagnosticForNode(adjustedNode, ts.Diagnostics._0_was_also_declared_here_Colon, symbolName);
39289
- var followOnMessage = ts.createDiagnosticForNode(adjustedNode, ts.Diagnostics.and_here_Colon);
39304
+ var leadingMessage = ts.createDiagnosticForNode(adjustedNode, ts.Diagnostics._0_was_also_declared_here, symbolName);
39305
+ var followOnMessage = ts.createDiagnosticForNode(adjustedNode, ts.Diagnostics.and_here);
39290
39306
  if (ts.length(err.relatedInformation) >= 5 || ts.some(err.relatedInformation, function (r) { return ts.compareDiagnostics(r, followOnMessage) === 0 || ts.compareDiagnostics(r, leadingMessage) === 0; }))
39291
39307
  return "continue";
39292
39308
  ts.addRelatedInfo(err, !ts.length(err.relatedInformation) ? leadingMessage : followOnMessage);
@@ -39879,7 +39895,7 @@ var ts;
39879
39895
  var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
39880
39896
  addErrorOrSuggestion(!isUncheckedJS, diagnostic);
39881
39897
  if (suggestion.valueDeclaration) {
39882
- ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here_Colon, suggestionName));
39898
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestionName));
39883
39899
  }
39884
39900
  }
39885
39901
  }
@@ -39950,7 +39966,7 @@ var ts;
39950
39966
  function addTypeOnlyDeclarationRelatedInfo(diagnostic, typeOnlyDeclaration, unescapedName) {
39951
39967
  if (!typeOnlyDeclaration)
39952
39968
  return diagnostic;
39953
- return ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(typeOnlyDeclaration, typeOnlyDeclaration.kind === 274 ? ts.Diagnostics._0_was_exported_here_Colon : ts.Diagnostics._0_was_imported_here_Colon, unescapedName));
39969
+ return ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(typeOnlyDeclaration, typeOnlyDeclaration.kind === 274 ? ts.Diagnostics._0_was_exported_here : ts.Diagnostics._0_was_imported_here, unescapedName));
39954
39970
  }
39955
39971
  function getIsDeferredContext(location, lastLocation) {
39956
39972
  if (location.kind !== 213 && location.kind !== 212) {
@@ -40060,7 +40076,7 @@ var ts;
40060
40076
  return true;
40061
40077
  }
40062
40078
  }
40063
- error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_Colon, ts.unescapeLeadingUnderscores(name));
40079
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, ts.unescapeLeadingUnderscores(name));
40064
40080
  return true;
40065
40081
  }
40066
40082
  }
@@ -40089,7 +40105,7 @@ var ts;
40089
40105
  function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
40090
40106
  if (meaning & (111551 & ~1024)) {
40091
40107
  if (isPrimitiveTypeName(name)) {
40092
- error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon, ts.unescapeLeadingUnderscores(name));
40108
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, ts.unescapeLeadingUnderscores(name));
40093
40109
  return true;
40094
40110
  }
40095
40111
  var symbol = resolveSymbol(resolveName(errorLocation, name, 788968 & ~111551, undefined, undefined, false));
@@ -40102,7 +40118,7 @@ var ts;
40102
40118
  error(errorLocation, ts.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");
40103
40119
  }
40104
40120
  else {
40105
- error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Colon, rawName);
40121
+ error(errorLocation, ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName);
40106
40122
  }
40107
40123
  return true;
40108
40124
  }
@@ -40176,7 +40192,7 @@ var ts;
40176
40192
  }
40177
40193
  }
40178
40194
  if (diagnosticMessage) {
40179
- ts.addRelatedInfo(diagnosticMessage, ts.createDiagnosticForNode(declaration, ts.Diagnostics._0_is_declared_here_Colon, declarationName));
40195
+ ts.addRelatedInfo(diagnosticMessage, ts.createDiagnosticForNode(declaration, ts.Diagnostics._0_is_declared_here, declarationName));
40180
40196
  }
40181
40197
  }
40182
40198
  }
@@ -40218,7 +40234,7 @@ var ts;
40218
40234
  && isAliasableOrJsExpression(node.parent.right)
40219
40235
  || node.kind === 295
40220
40236
  || node.kind === 294 && isAliasableOrJsExpression(node.initializer)
40221
- || ts.isRequireVariableDeclaration(node);
40237
+ || ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
40222
40238
  }
40223
40239
  function isAliasableOrJsExpression(e) {
40224
40240
  return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e);
@@ -40249,8 +40265,8 @@ var ts;
40249
40265
  ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
40250
40266
  : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
40251
40267
  var relatedMessage = isExport
40252
- ? ts.Diagnostics._0_was_exported_here_Colon
40253
- : ts.Diagnostics._0_was_imported_here_Colon;
40268
+ ? ts.Diagnostics._0_was_exported_here
40269
+ : ts.Diagnostics._0_was_imported_here;
40254
40270
  var name = ts.unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText);
40255
40271
  ts.addRelatedInfo(error(node.moduleReference, message), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name));
40256
40272
  }
@@ -40448,7 +40464,7 @@ var ts;
40448
40464
  var suggestionName = symbolToString(suggestion);
40449
40465
  var diagnostic = error(name, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName);
40450
40466
  if (suggestion.valueDeclaration) {
40451
- ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here_Colon, suggestionName));
40467
+ ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestionName));
40452
40468
  }
40453
40469
  }
40454
40470
  else {
@@ -40480,7 +40496,7 @@ var ts;
40480
40496
  error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
40481
40497
  if (localSymbol.declarations) {
40482
40498
  ts.addRelatedInfo.apply(void 0, __spreadArray([diagnostic], ts.map(localSymbol.declarations, function (decl, index) {
40483
- return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here_Colon : ts.Diagnostics.and_here_Colon, declarationName);
40499
+ return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName);
40484
40500
  }), false));
40485
40501
  }
40486
40502
  }
@@ -40910,8 +40926,13 @@ var ts;
40910
40926
  var mode = contextSpecifier && ts.isStringLiteralLike(contextSpecifier) ? ts.getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
40911
40927
  var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference, mode);
40912
40928
  var resolutionDiagnostic = resolvedModule && ts.getResolutionDiagnostic(compilerOptions, resolvedModule);
40913
- var sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName);
40929
+ var sourceFile = resolvedModule
40930
+ && (!resolutionDiagnostic || resolutionDiagnostic === ts.Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set)
40931
+ && host.getSourceFile(resolvedModule.resolvedFileName);
40914
40932
  if (sourceFile) {
40933
+ if (resolutionDiagnostic) {
40934
+ error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);
40935
+ }
40915
40936
  if (sourceFile.symbol) {
40916
40937
  if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
40917
40938
  errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
@@ -44712,9 +44733,12 @@ var ts;
44712
44733
  function isErrorType(type) {
44713
44734
  return type === errorType || !!(type.flags & 1 && type.aliasSymbol);
44714
44735
  }
44715
- function getTypeForBindingElementParent(node) {
44736
+ function getTypeForBindingElementParent(node, checkMode) {
44737
+ if (checkMode && checkMode !== 0) {
44738
+ return getTypeForVariableLikeDeclaration(node, false, checkMode);
44739
+ }
44716
44740
  var symbol = getSymbolOfNode(node);
44717
- return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false);
44741
+ return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false, checkMode);
44718
44742
  }
44719
44743
  function getRestType(source, properties, symbol) {
44720
44744
  source = filterType(source, function (t) { return !(t.flags & 98304); });
@@ -44819,7 +44843,8 @@ var ts;
44819
44843
  return type.flags & (128 | 256) ? "" + type.value : undefined;
44820
44844
  }
44821
44845
  function getTypeForBindingElement(declaration) {
44822
- var parentType = getTypeForBindingElementParent(declaration.parent.parent);
44846
+ var checkMode = declaration.dotDotDotToken && declaration.parent.kind !== 201 ? 32 : 0;
44847
+ var parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
44823
44848
  return parentType && getBindingElementTypeFromParentType(declaration, parentType);
44824
44849
  }
44825
44850
  function getBindingElementTypeFromParentType(declaration, parentType) {
@@ -44879,9 +44904,9 @@ var ts;
44879
44904
  return type;
44880
44905
  }
44881
44906
  if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) {
44882
- return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & 32768) ? getNonUndefinedType(type) : type;
44907
+ return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration, undefined)) & 32768) ? getNonUndefinedType(type) : type;
44883
44908
  }
44884
- return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration)], 2));
44909
+ return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, undefined)], 2));
44885
44910
  }
44886
44911
  function getTypeForDeclarationFromJSDocComment(declaration) {
44887
44912
  var jsdocType = ts.getJSDocType(declaration);
@@ -44903,9 +44928,9 @@ var ts;
44903
44928
  if (isOptional === void 0) { isOptional = true; }
44904
44929
  return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type;
44905
44930
  }
44906
- function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
44931
+ function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) {
44907
44932
  if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 242) {
44908
- var indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression)));
44933
+ var indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, checkMode)));
44909
44934
  return indexType.flags & (262144 | 4194304) ? getExtractStringType(indexType) : stringType;
44910
44935
  }
44911
44936
  if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 243) {
@@ -44967,7 +44992,7 @@ var ts;
44967
44992
  return containerObjectType;
44968
44993
  }
44969
44994
  }
44970
- var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration));
44995
+ var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration, checkMode));
44971
44996
  return addOptionality(type, isProperty, isOptional);
44972
44997
  }
44973
44998
  if (ts.isPropertyDeclaration(declaration) && (noImplicitAny || ts.isInJSFile(declaration))) {
@@ -45247,8 +45272,8 @@ var ts;
45247
45272
  if (s.valueDeclaration && exportedMember.valueDeclaration && ts.getSourceFileOfNode(s.valueDeclaration) !== ts.getSourceFileOfNode(exportedMember.valueDeclaration)) {
45248
45273
  var unescapedName = ts.unescapeLeadingUnderscores(s.escapedName);
45249
45274
  var exportedMemberName = ((_a = ts.tryCast(exportedMember.valueDeclaration, ts.isNamedDeclaration)) === null || _a === void 0 ? void 0 : _a.name) || exportedMember.valueDeclaration;
45250
- ts.addRelatedInfo(error(s.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0, unescapedName), ts.createDiagnosticForNode(exportedMemberName, ts.Diagnostics._0_was_also_declared_here_Colon, unescapedName));
45251
- ts.addRelatedInfo(error(exportedMemberName, ts.Diagnostics.Duplicate_identifier_0, unescapedName), ts.createDiagnosticForNode(s.valueDeclaration, ts.Diagnostics._0_was_also_declared_here_Colon, unescapedName));
45275
+ ts.addRelatedInfo(error(s.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0, unescapedName), ts.createDiagnosticForNode(exportedMemberName, ts.Diagnostics._0_was_also_declared_here, unescapedName));
45276
+ ts.addRelatedInfo(error(exportedMemberName, ts.Diagnostics.Duplicate_identifier_0, unescapedName), ts.createDiagnosticForNode(s.valueDeclaration, ts.Diagnostics._0_was_also_declared_here, unescapedName));
45252
45277
  }
45253
45278
  var union = createSymbol(s.flags | exportedMember.flags, name);
45254
45279
  union.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]);
@@ -45300,7 +45325,7 @@ var ts;
45300
45325
  function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
45301
45326
  if (element.initializer) {
45302
45327
  var contextualType = ts.isBindingPattern(element.name) ? getTypeFromBindingPattern(element.name, true, false) : unknownType;
45303
- return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, contextualType)));
45328
+ return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, undefined, contextualType)));
45304
45329
  }
45305
45330
  if (ts.isBindingPattern(element.name)) {
45306
45331
  return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
@@ -45366,7 +45391,7 @@ var ts;
45366
45391
  : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
45367
45392
  }
45368
45393
  function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) {
45369
- return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true), declaration, reportErrors);
45394
+ return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true, undefined), declaration, reportErrors);
45370
45395
  }
45371
45396
  function isGlobalSymbolConstructor(node) {
45372
45397
  var symbol = getSymbolOfNode(node);
@@ -46498,7 +46523,7 @@ var ts;
46498
46523
  if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
46499
46524
  var declarations = earlySymbol ? ts.concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
46500
46525
  var name_4 = !(type.flags & 8192) && ts.unescapeLeadingUnderscores(memberName) || ts.declarationNameToString(declName);
46501
- ts.forEach(declarations, function (declaration) { return error(ts.getNameOfDeclaration(declaration) || declaration, ts.Diagnostics.Property_0_was_also_declared_here_Colon, name_4); });
46526
+ ts.forEach(declarations, function (declaration) { return error(ts.getNameOfDeclaration(declaration) || declaration, ts.Diagnostics.Property_0_was_also_declared_here, name_4); });
46502
46527
  error(declName || decl, ts.Diagnostics.Duplicate_property_0, name_4);
46503
46528
  lateSymbol = createSymbol(0, memberName, 4096);
46504
46529
  }
@@ -50820,7 +50845,7 @@ var ts;
50820
50845
  }
50821
50846
  else {
50822
50847
  var errorMessage = targetMeaning === 111551
50823
- ? ts.Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_Colon
50848
+ ? ts.Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here
50824
50849
  : ts.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0;
50825
50850
  error(node, errorMessage, node.argument.literal.text);
50826
50851
  links.resolvedSymbol = unknownSymbol;
@@ -53923,7 +53948,7 @@ var ts;
53923
53948
  var propName = symbolToString(unmatchedProperty);
53924
53949
  reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target), false));
53925
53950
  if (ts.length(unmatchedProperty.declarations)) {
53926
- associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here_Colon, propName));
53951
+ associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName));
53927
53952
  }
53928
53953
  if (shouldSkipElaboration && errorInfo) {
53929
53954
  overrideNextErrorInfo++;
@@ -58274,16 +58299,18 @@ var ts;
58274
58299
  function isGenericTypeWithoutNullableConstraint(type) {
58275
58300
  return !!(type.flags & 465829888 && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304));
58276
58301
  }
58277
- function hasNonBindingPatternContextualTypeWithNoGenericTypes(node) {
58302
+ function hasContextualTypeWithNoGenericTypes(node, checkMode) {
58278
58303
  var contextualType = (ts.isIdentifier(node) || ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) &&
58279
58304
  !((ts.isJsxOpeningElement(node.parent) || ts.isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) &&
58280
- getContextualType(node, 8);
58305
+ (checkMode && checkMode & 32 ?
58306
+ getContextualType(node, 8)
58307
+ : getContextualType(node));
58281
58308
  return contextualType && !isGenericType(contextualType);
58282
58309
  }
58283
58310
  function getNarrowableTypeForReference(type, reference, checkMode) {
58284
58311
  var substituteConstraints = !(checkMode && checkMode & 2) &&
58285
58312
  someType(type, isGenericTypeWithUnionConstraint) &&
58286
- (isConstraintPosition(type, reference) || hasNonBindingPatternContextualTypeWithNoGenericTypes(reference));
58313
+ (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
58287
58314
  return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t; }) : type;
58288
58315
  }
58289
58316
  function isExportOrExportExpression(location) {
@@ -58325,7 +58352,7 @@ var ts;
58325
58352
  var links = getNodeLinks(location);
58326
58353
  if (!(links.flags & 268435456)) {
58327
58354
  links.flags |= 268435456;
58328
- var parentType = getTypeForBindingElementParent(parent);
58355
+ var parentType = getTypeForBindingElementParent(parent, undefined);
58329
58356
  links.flags &= ~268435456;
58330
58357
  if (parentType && parentType.flags & 1048576 && !(parent.kind === 163 && isSymbolAssigned(symbol))) {
58331
58358
  var pattern = declaration.parent;
@@ -58993,7 +59020,7 @@ var ts;
58993
59020
  var parent = declaration.parent.parent;
58994
59021
  var name = declaration.propertyName || declaration.name;
58995
59022
  var parentType = getContextualTypeForVariableLikeDeclaration(parent) ||
58996
- parent.kind !== 202 && parent.initializer && checkDeclarationInitializer(parent);
59023
+ parent.kind !== 202 && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken && declaration.parent.kind !== 201 ? 32 : 0);
58997
59024
  if (!parentType || ts.isBindingPattern(name) || ts.isComputedNonLiteralName(name))
58998
59025
  return undefined;
58999
59026
  if (parent.name.kind === 201) {
@@ -61001,7 +61028,7 @@ var ts;
61001
61028
  diagnosticMessage = error(right, ts.Diagnostics.Class_0_used_before_its_declaration, declarationName);
61002
61029
  }
61003
61030
  if (diagnosticMessage) {
61004
- ts.addRelatedInfo(diagnosticMessage, ts.createDiagnosticForNode(valueDeclaration, ts.Diagnostics._0_is_declared_here_Colon, declarationName));
61031
+ ts.addRelatedInfo(diagnosticMessage, ts.createDiagnosticForNode(valueDeclaration, ts.Diagnostics._0_is_declared_here, declarationName));
61005
61032
  }
61006
61033
  }
61007
61034
  function isInPropertyInitializerOrClassStaticBlock(node) {
@@ -61091,7 +61118,7 @@ var ts;
61091
61118
  var suggestedName = ts.symbolName(suggestion);
61092
61119
  var message = isUncheckedJS ? ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2;
61093
61120
  errorInfo = ts.chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);
61094
- relatedInfo = suggestion.valueDeclaration && ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here_Colon, suggestedName);
61121
+ relatedInfo = suggestion.valueDeclaration && ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestedName);
61095
61122
  }
61096
61123
  else {
61097
61124
  var diagnostic = containerSeemsToBeEmptyDomElement(containingType)
@@ -61749,7 +61776,7 @@ var ts;
61749
61776
  var diag = ts.createDiagnosticForNode(node.tagName, ts.Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, ts.entityNameToString(node.tagName), absoluteMinArgCount, ts.entityNameToString(factory), maxParamCount);
61750
61777
  var tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) === null || _a === void 0 ? void 0 : _a.valueDeclaration;
61751
61778
  if (tagNameDeclaration) {
61752
- ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here_Colon, ts.entityNameToString(node.tagName)));
61779
+ ts.addRelatedInfo(diag, ts.createDiagnosticForNode(tagNameDeclaration, ts.Diagnostics._0_is_declared_here, ts.entityNameToString(node.tagName)));
61753
61780
  }
61754
61781
  if (errorOutputContainer && errorOutputContainer.skipLogging) {
61755
61782
  (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag);
@@ -62101,7 +62128,7 @@ var ts;
62101
62128
  for (var _i = 0, diags_1 = diags; _i < diags_1.length; _i++) {
62102
62129
  var d = diags_1[_i];
62103
62130
  if (last_2.declaration && candidatesForArgumentError.length > 3) {
62104
- ts.addRelatedInfo(d, ts.createDiagnosticForNode(last_2.declaration, ts.Diagnostics.The_last_overload_is_declared_here_Colon));
62131
+ ts.addRelatedInfo(d, ts.createDiagnosticForNode(last_2.declaration, ts.Diagnostics.The_last_overload_is_declared_here));
62105
62132
  }
62106
62133
  addImplementationSuccessElaboration(last_2, d);
62107
62134
  diagnostics.add(d);
@@ -64974,11 +65001,11 @@ var ts;
64974
65001
  }
64975
65002
  }
64976
65003
  function checkExpressionCached(node, checkMode) {
65004
+ if (checkMode && checkMode !== 0) {
65005
+ return checkExpression(node, checkMode);
65006
+ }
64977
65007
  var links = getNodeLinks(node);
64978
65008
  if (!links.resolvedType) {
64979
- if (checkMode && checkMode !== 0) {
64980
- return checkExpression(node, checkMode);
64981
- }
64982
65009
  var saveFlowLoopStart = flowLoopStart;
64983
65010
  var saveFlowTypeCache = flowTypeCache;
64984
65011
  flowLoopStart = flowLoopCount;
@@ -64995,10 +65022,12 @@ var ts;
64995
65022
  node.kind === 228 ||
64996
65023
  ts.isJSDocTypeAssertion(node);
64997
65024
  }
64998
- function checkDeclarationInitializer(declaration, contextualType) {
65025
+ function checkDeclarationInitializer(declaration, checkMode, contextualType) {
64999
65026
  var initializer = ts.getEffectiveInitializer(declaration);
65000
65027
  var type = getQuickTypeOfExpression(initializer) ||
65001
- (contextualType ? checkExpressionWithContextualType(initializer, contextualType, undefined, 0) : checkExpressionCached(initializer));
65028
+ (contextualType ?
65029
+ checkExpressionWithContextualType(initializer, contextualType, undefined, checkMode || 0)
65030
+ : checkExpressionCached(initializer, checkMode));
65002
65031
  return ts.isParameter(declaration) && declaration.name.kind === 201 &&
65003
65032
  isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ?
65004
65033
  padTupleType(type, declaration.name) : type;
@@ -65265,7 +65294,7 @@ var ts;
65265
65294
  }
65266
65295
  }
65267
65296
  function checkExpression(node, checkMode, forceTuple) {
65268
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkExpression", { kind: node.kind, pos: node.pos, end: node.end });
65297
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkExpression", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
65269
65298
  var saveCurrentNode = currentNode;
65270
65299
  currentNode = node;
65271
65300
  instantiationCount = 0;
@@ -66373,7 +66402,7 @@ var ts;
66373
66402
  for (var _a = 0, signatures_10 = signatures; _a < signatures_10.length; _a++) {
66374
66403
  var signature = signatures_10[_a];
66375
66404
  if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
66376
- ts.addRelatedInfo(error(signature.declaration, ts.Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), ts.createDiagnosticForNode(bodyDeclaration, ts.Diagnostics.The_implementation_signature_is_declared_here_Colon));
66405
+ ts.addRelatedInfo(error(signature.declaration, ts.Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), ts.createDiagnosticForNode(bodyDeclaration, ts.Diagnostics.The_implementation_signature_is_declared_here));
66377
66406
  break;
66378
66407
  }
66379
66408
  }
@@ -67472,7 +67501,8 @@ var ts;
67472
67501
  checkComputedPropertyName(node.propertyName);
67473
67502
  }
67474
67503
  var parent = node.parent.parent;
67475
- var parentType = getTypeForBindingElementParent(parent);
67504
+ var parentCheckMode = node.dotDotDotToken && node.parent.kind !== 201 ? 32 : 0;
67505
+ var parentType = getTypeForBindingElementParent(parent, parentCheckMode);
67476
67506
  var name = node.propertyName || node.name;
67477
67507
  if (parentType && !ts.isBindingPattern(name)) {
67478
67508
  var exprType = getLiteralTypeFromPropertyName(name);
@@ -67522,7 +67552,7 @@ var ts;
67522
67552
  return;
67523
67553
  }
67524
67554
  var symbol = getSymbolOfNode(node);
67525
- if (symbol.flags & 2097152 && ts.isRequireVariableDeclaration(node)) {
67555
+ if (symbol.flags & 2097152 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)) {
67526
67556
  checkAliasSymbol(node);
67527
67557
  return;
67528
67558
  }
@@ -67574,7 +67604,7 @@ var ts;
67574
67604
  var declName = ts.declarationNameToString(nextDeclarationName);
67575
67605
  var err = error(nextDeclarationName, message, declName, typeToString(firstType), typeToString(nextType));
67576
67606
  if (firstDeclaration) {
67577
- ts.addRelatedInfo(err, ts.createDiagnosticForNode(firstDeclaration, ts.Diagnostics._0_was_also_declared_here_Colon, declName));
67607
+ ts.addRelatedInfo(err, ts.createDiagnosticForNode(firstDeclaration, ts.Diagnostics._0_was_also_declared_here, declName));
67578
67608
  }
67579
67609
  }
67580
67610
  function areDeclarationFlagsIdentical(left, right) {
@@ -67594,7 +67624,7 @@ var ts;
67594
67624
  return ts.getSelectedEffectiveModifierFlags(left, interestingFlags) === ts.getSelectedEffectiveModifierFlags(right, interestingFlags);
67595
67625
  }
67596
67626
  function checkVariableDeclaration(node) {
67597
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end });
67627
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
67598
67628
  checkGrammarVariableDeclaration(node);
67599
67629
  checkVariableLikeDeclaration(node);
67600
67630
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
@@ -68436,7 +68466,7 @@ var ts;
68436
68466
  var declaration = catchClause.variableDeclaration;
68437
68467
  var typeNode = ts.getEffectiveTypeAnnotationNode(ts.getRootDeclaration(declaration));
68438
68468
  if (typeNode) {
68439
- var type = getTypeForVariableLikeDeclaration(declaration, false);
68469
+ var type = getTypeForVariableLikeDeclaration(declaration, false, undefined);
68440
68470
  if (type && !(type.flags & 3)) {
68441
68471
  grammarErrorOnFirstToken(typeNode, ts.Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
68442
68472
  }
@@ -69583,6 +69613,17 @@ var ts;
69583
69613
  return false;
69584
69614
  }
69585
69615
  }
69616
+ if (!ts.isImportEqualsDeclaration(node) && node.assertClause) {
69617
+ var hasError = false;
69618
+ for (var _i = 0, _a = node.assertClause.elements; _i < _a.length; _i++) {
69619
+ var clause = _a[_i];
69620
+ if (!ts.isStringLiteral(clause.value)) {
69621
+ hasError = true;
69622
+ error(clause.value, ts.Diagnostics.Import_assertion_values_must_be_string_literal_expressions);
69623
+ }
69624
+ }
69625
+ return !hasError;
69626
+ }
69586
69627
  return true;
69587
69628
  }
69588
69629
  function checkAliasSymbol(node) {
@@ -70218,7 +70259,7 @@ var ts;
70218
70259
  }
70219
70260
  }
70220
70261
  function checkDeferredNode(node) {
70221
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end });
70262
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("check", "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath });
70222
70263
  var saveCurrentNode = currentNode;
70223
70264
  currentNode = node;
70224
70265
  instantiationCount = 0;
@@ -70844,7 +70885,7 @@ var ts;
70844
70885
  return errorType;
70845
70886
  }
70846
70887
  if (ts.isBindingPattern(node)) {
70847
- return getTypeForVariableLikeDeclaration(node.parent, true) || errorType;
70888
+ return getTypeForVariableLikeDeclaration(node.parent, true, undefined) || errorType;
70848
70889
  }
70849
70890
  if (isInRightSideOfImportOrExportAssignment(node)) {
70850
70891
  var symbol = getSymbolAtLocation(node);
@@ -72178,7 +72219,7 @@ var ts;
72178
72219
  ts.forEach(nonSimpleParameters, function (parameter) {
72179
72220
  ts.addRelatedInfo(error(parameter, ts.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), ts.createDiagnosticForNode(useStrictDirective_1, ts.Diagnostics.use_strict_directive_used_here));
72180
72221
  });
72181
- var diagnostics_2 = nonSimpleParameters.map(function (parameter, index) { return (index === 0 ? ts.createDiagnosticForNode(parameter, ts.Diagnostics.Non_simple_parameter_declared_here_Colon) : ts.createDiagnosticForNode(parameter, ts.Diagnostics.and_here_Colon)); });
72222
+ var diagnostics_2 = nonSimpleParameters.map(function (parameter, index) { return (index === 0 ? ts.createDiagnosticForNode(parameter, ts.Diagnostics.Non_simple_parameter_declared_here) : ts.createDiagnosticForNode(parameter, ts.Diagnostics.and_here)); });
72182
72223
  ts.addRelatedInfo.apply(void 0, __spreadArray([error(useStrictDirective_1, ts.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)], diagnostics_2, false));
72183
72224
  return true;
72184
72225
  }
@@ -73798,7 +73839,7 @@ var ts;
73798
73839
  return factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
73799
73840
  case 293:
73800
73841
  ts.Debug.type(node);
73801
- return factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isStringLiteral));
73842
+ return factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isExpressionNode));
73802
73843
  case 266:
73803
73844
  ts.Debug.type(node);
73804
73845
  return factory.updateImportClause(node, node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.namedBindings, visitor, ts.isNamedImportBindings));
@@ -93677,8 +93718,8 @@ var ts;
93677
93718
  var gutterSeparator = " ";
93678
93719
  var resetEscapeSequence = "\u001b[0m";
93679
93720
  var ellipsis = "...";
93680
- var bullet = "● ";
93681
93721
  var halfIndent = " ";
93722
+ var indent = " ";
93682
93723
  function getCategoryFormat(category) {
93683
93724
  switch (category) {
93684
93725
  case ts.DiagnosticCategory.Error: return ForegroundColorEscapeSequences.Red;
@@ -93691,21 +93732,14 @@ var ts;
93691
93732
  return formatStyle + text + resetEscapeSequence;
93692
93733
  }
93693
93734
  ts.formatColorAndReset = formatColorAndReset;
93694
- function formatCodeSpan(file, start, length, indent, underlineColor, host) {
93735
+ function formatCodeSpan(file, start, length, indent, squiggleColor, host) {
93695
93736
  var _a = ts.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character;
93696
93737
  var _b = ts.getLineAndCharacterOfPosition(file, start + length), lastLine = _b.line, lastLineChar = _b.character;
93697
93738
  var lastLineInFile = ts.getLineAndCharacterOfPosition(file, file.text.length).line;
93698
- var gutterWidth = 1;
93699
93739
  var hasMoreThanFiveLines = (lastLine - firstLine) >= 4;
93700
- var whitespaceToTrim = Number.MAX_VALUE;
93701
- for (var i = firstLine; i <= lastLine; i++) {
93702
- if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
93703
- i = lastLine - 1;
93704
- }
93705
- var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
93706
- var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
93707
- var lineContent = file.text.slice(lineStart, lineEnd);
93708
- whitespaceToTrim = Math.min(whitespaceToTrim, ts.startWhitespaceCount(lineContent));
93740
+ var gutterWidth = (lastLine + 1 + "").length;
93741
+ if (hasMoreThanFiveLines) {
93742
+ gutterWidth = Math.max(ellipsis.length, gutterWidth);
93709
93743
  }
93710
93744
  var context = "";
93711
93745
  for (var i = firstLine; i <= lastLine; i++) {
@@ -93718,24 +93752,21 @@ var ts;
93718
93752
  var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
93719
93753
  var lineContent = file.text.slice(lineStart, lineEnd);
93720
93754
  lineContent = ts.trimStringEnd(lineContent);
93721
- lineContent = lineContent.slice(whitespaceToTrim);
93722
93755
  lineContent = lineContent.replace(/\t/g, " ");
93723
- var gutterLine = "|";
93724
- context += indent + ts.padLeft(gutterLine, gutterWidth) + gutterSeparator;
93756
+ context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
93725
93757
  context += lineContent + host.getNewLine();
93726
- context += indent + ts.padLeft("", gutterWidth) + gutterSeparator;
93727
- context += underlineColor;
93758
+ context += indent + formatColorAndReset(ts.padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
93759
+ context += squiggleColor;
93728
93760
  if (i === firstLine) {
93729
93761
  var lastCharForLine = i === lastLine ? lastLineChar : undefined;
93730
- context += lineContent.slice(0, firstLineChar - whitespaceToTrim).replace(/\S/g, " ");
93731
- var amendedLastChar = lastCharForLine ? lastCharForLine - whitespaceToTrim : undefined;
93732
- context += lineContent.slice(firstLineChar - whitespaceToTrim, amendedLastChar).replace(/./g, "▔");
93762
+ context += lineContent.slice(0, firstLineChar).replace(/\S/g, " ");
93763
+ context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~");
93733
93764
  }
93734
93765
  else if (i === lastLine) {
93735
- context += lineContent.slice(0, lastLineChar).replace(/./g, "▔");
93766
+ context += lineContent.slice(0, lastLineChar).replace(/./g, "~");
93736
93767
  }
93737
93768
  else {
93738
- context += lineContent.replace(/./g, "▔");
93769
+ context += lineContent.replace(/./g, "~");
93739
93770
  }
93740
93771
  context += resetEscapeSequence;
93741
93772
  }
@@ -93755,56 +93786,41 @@ var ts;
93755
93786
  }
93756
93787
  ts.formatLocation = formatLocation;
93757
93788
  function formatDiagnosticsWithColorAndContext(diagnostics, host) {
93758
- var _a, _b;
93759
- var terminalWidth = (_b = (_a = ts.sys.getWidthOfTerminal) === null || _a === void 0 ? void 0 : _a.call(ts.sys)) !== null && _b !== void 0 ? _b : 0;
93760
- var indent = terminalWidth < 60 ? "" : halfIndent;
93761
93789
  var output = "";
93762
93790
  for (var _i = 0, diagnostics_4 = diagnostics; _i < diagnostics_4.length; _i++) {
93763
93791
  var diagnostic = diagnostics_4[_i];
93764
- var diagnosticCode = "TS" + diagnostic.code;
93765
- var diagnosticCatName = ts.diagnosticCategoryName(diagnostic, false);
93766
- var diagnosticCatNameColored = formatColorAndReset(diagnosticCatName, getCategoryFormat(diagnostic.category));
93767
93792
  if (diagnostic.file) {
93768
93793
  var file = diagnostic.file, start = diagnostic.start;
93769
- var location = formatLocation(file, start, host);
93770
- var locationLength = location.replace(/\u001b[[0-9]+m/g, "").length;
93771
- var codeLength = diagnosticCode.length;
93772
- output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + location;
93773
- var defaultPad = codeLength + 1;
93774
- var padWidth = terminalWidth < 60 ? defaultPad : terminalWidth - (bullet.length + locationLength + codeLength + diagnosticCatName.length + 2);
93775
- if (padWidth < diagnosticCode.length)
93776
- padWidth = defaultPad;
93777
- output += ts.padLeft(diagnosticCatNameColored, padWidth + (diagnosticCatNameColored.length - diagnosticCatName.length));
93778
- output += " " + diagnosticCode;
93779
- output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, indent, getCategoryFormat(diagnostic.category), host);
93780
- output += host.getNewLine();
93794
+ output += formatLocation(file, start, host);
93795
+ output += " - ";
93781
93796
  }
93782
- else {
93783
- output += formatColorAndReset(bullet, getCategoryFormat(diagnostic.category)) + " " + diagnosticCatNameColored + " " + diagnosticCode;
93797
+ output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
93798
+ output += formatColorAndReset(" TS" + diagnostic.code + ": ", ForegroundColorEscapeSequences.Grey);
93799
+ output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
93800
+ if (diagnostic.file) {
93801
+ output += host.getNewLine();
93802
+ output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, "", getCategoryFormat(diagnostic.category), host);
93784
93803
  }
93785
- var diagnosticText = flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine(), 0, true);
93786
- diagnosticText = ts.map(diagnosticText.split(host.getNewLine()), function (text) { return indent + text; }).join(host.getNewLine());
93787
- output += diagnosticText;
93788
- output += host.getNewLine();
93789
93804
  if (diagnostic.relatedInformation) {
93790
93805
  output += host.getNewLine();
93791
- for (var _c = 0, _d = diagnostic.relatedInformation; _c < _d.length; _c++) {
93792
- var _e = _d[_c], file = _e.file, start = _e.start, length_9 = _e.length, messageText = _e.messageText;
93793
- output += indent + ts.trimStringStart(flattenDiagnosticMessageText(messageText, host.getNewLine(), 0, true));
93806
+ for (var _a = 0, _b = diagnostic.relatedInformation; _a < _b.length; _a++) {
93807
+ var _c = _b[_a], file = _c.file, start = _c.start, length_9 = _c.length, messageText = _c.messageText;
93794
93808
  if (file) {
93795
- output += " " + formatLocation(file, start, host);
93796
93809
  output += host.getNewLine();
93797
- output += formatCodeSpan(file, start, length_9, indent + " ", ForegroundColorEscapeSequences.Cyan, host);
93810
+ output += halfIndent + formatLocation(file, start, host);
93811
+ output += formatCodeSpan(file, start, length_9, indent, ForegroundColorEscapeSequences.Cyan, host);
93798
93812
  }
93813
+ output += host.getNewLine();
93814
+ output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine());
93799
93815
  }
93800
93816
  }
93817
+ output += host.getNewLine();
93801
93818
  }
93802
93819
  return output;
93803
93820
  }
93804
93821
  ts.formatDiagnosticsWithColorAndContext = formatDiagnosticsWithColorAndContext;
93805
- function flattenDiagnosticMessageText(diag, newLine, indent, pretty) {
93822
+ function flattenDiagnosticMessageText(diag, newLine, indent) {
93806
93823
  if (indent === void 0) { indent = 0; }
93807
- if (pretty === void 0) { pretty = false; }
93808
93824
  if (ts.isString(diag)) {
93809
93825
  return diag;
93810
93826
  }
@@ -93814,14 +93830,9 @@ var ts;
93814
93830
  var result = "";
93815
93831
  if (indent) {
93816
93832
  result += newLine;
93817
- var indentsToReplaceWithNewLines = pretty ? 1 : 0;
93818
- if (indent > indentsToReplaceWithNewLines) {
93819
- for (var i = indentsToReplaceWithNewLines; i < indent; i++) {
93820
- result += " ";
93821
- }
93833
+ for (var i = 0; i < indent; i++) {
93834
+ result += " ";
93822
93835
  }
93823
- else
93824
- result += newLine;
93825
93836
  }
93826
93837
  result += diag.messageText;
93827
93838
  indent++;
@@ -94045,8 +94056,8 @@ var ts;
94045
94056
  ts.plainJSErrors = new ts.Set([
94046
94057
  ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
94047
94058
  ts.Diagnostics.A_module_cannot_have_multiple_default_exports.code,
94048
- ts.Diagnostics.Another_export_default_is_here_Colon.code,
94049
- ts.Diagnostics.The_first_export_default_is_here_Colon.code,
94059
+ ts.Diagnostics.Another_export_default_is_here.code,
94060
+ ts.Diagnostics.The_first_export_default_is_here.code,
94050
94061
  ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,
94051
94062
  ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,
94052
94063
  ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,
@@ -96200,16 +96211,16 @@ var ts;
96200
96211
  var message_2;
96201
96212
  switch (reason.kind) {
96202
96213
  case ts.FileIncludeKind.Import:
96203
- message_2 = ts.Diagnostics.File_is_included_via_import_here_Colon;
96214
+ message_2 = ts.Diagnostics.File_is_included_via_import_here;
96204
96215
  break;
96205
96216
  case ts.FileIncludeKind.ReferenceFile:
96206
- message_2 = ts.Diagnostics.File_is_included_via_reference_here_Colon;
96217
+ message_2 = ts.Diagnostics.File_is_included_via_reference_here;
96207
96218
  break;
96208
96219
  case ts.FileIncludeKind.TypeReferenceDirective:
96209
- message_2 = ts.Diagnostics.File_is_included_via_type_library_reference_here_Colon;
96220
+ message_2 = ts.Diagnostics.File_is_included_via_type_library_reference_here;
96210
96221
  break;
96211
96222
  case ts.FileIncludeKind.LibReferenceDirective:
96212
- message_2 = ts.Diagnostics.File_is_included_via_library_reference_here_Colon;
96223
+ message_2 = ts.Diagnostics.File_is_included_via_library_reference_here;
96213
96224
  break;
96214
96225
  default:
96215
96226
  ts.Debug.assertNever(reason);
@@ -96228,14 +96239,14 @@ var ts;
96228
96239
  var matchedByFiles = ts.getMatchedFileSpec(program, fileName);
96229
96240
  if (matchedByFiles) {
96230
96241
  configFileNode = ts.getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles);
96231
- message = ts.Diagnostics.File_is_matched_by_files_list_specified_here_Colon;
96242
+ message = ts.Diagnostics.File_is_matched_by_files_list_specified_here;
96232
96243
  break;
96233
96244
  }
96234
96245
  var matchedByInclude = ts.getMatchedIncludeSpec(program, fileName);
96235
96246
  if (!matchedByInclude)
96236
96247
  return undefined;
96237
96248
  configFileNode = ts.getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
96238
- message = ts.Diagnostics.File_is_matched_by_include_pattern_specified_here_Colon;
96249
+ message = ts.Diagnostics.File_is_matched_by_include_pattern_specified_here;
96239
96250
  break;
96240
96251
  case ts.FileIncludeKind.SourceFromProjectReference:
96241
96252
  case ts.FileIncludeKind.OutputFromProjectReference:
@@ -96249,24 +96260,24 @@ var ts;
96249
96260
  var referencesSyntax = ts.firstDefined(ts.getTsConfigPropArray(sourceFile, "references"), function (property) { return ts.isArrayLiteralExpression(property.initializer) ? property.initializer : undefined; });
96250
96261
  return referencesSyntax && referencesSyntax.elements.length > index ?
96251
96262
  ts.createDiagnosticForNodeInSourceFile(sourceFile, referencesSyntax.elements[index], reason.kind === ts.FileIncludeKind.OutputFromProjectReference ?
96252
- ts.Diagnostics.File_is_output_from_referenced_project_specified_here_Colon :
96253
- ts.Diagnostics.File_is_source_from_referenced_project_specified_here_Colon) :
96263
+ ts.Diagnostics.File_is_output_from_referenced_project_specified_here :
96264
+ ts.Diagnostics.File_is_source_from_referenced_project_specified_here) :
96254
96265
  undefined;
96255
96266
  case ts.FileIncludeKind.AutomaticTypeDirectiveFile:
96256
96267
  if (!options.types)
96257
96268
  return undefined;
96258
96269
  configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference);
96259
- message = ts.Diagnostics.File_is_entry_point_of_type_library_specified_here_Colon;
96270
+ message = ts.Diagnostics.File_is_entry_point_of_type_library_specified_here;
96260
96271
  break;
96261
96272
  case ts.FileIncludeKind.LibFile:
96262
96273
  if (reason.index !== undefined) {
96263
96274
  configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]);
96264
- message = ts.Diagnostics.File_is_library_specified_here_Colon;
96275
+ message = ts.Diagnostics.File_is_library_specified_here;
96265
96276
  break;
96266
96277
  }
96267
96278
  var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === ts.getEmitScriptTarget(options) ? key : undefined; });
96268
96279
  configFileNode = target ? getOptionsSyntaxByValue("target", target) : undefined;
96269
- message = ts.Diagnostics.File_is_default_library_for_target_specified_here_Colon;
96280
+ message = ts.Diagnostics.File_is_default_library_for_target_specified_here;
96270
96281
  break;
96271
96282
  default:
96272
96283
  ts.Debug.assertNever(reason);