typescript 5.5.0-dev.20240425 → 5.5.0-dev.20240427

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.5";
21
- var version = `${versionMajorMinor}.0-dev.20240425`;
21
+ var version = `${versionMajorMinor}.0-dev.20240427`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -447,13 +447,23 @@ function deduplicateSorted(array, comparer) {
447
447
  }
448
448
  return deduplicated;
449
449
  }
450
- function insertSorted(array, insert, compare, allowDuplicates) {
450
+ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates) {
451
451
  if (array.length === 0) {
452
452
  array.push(insert);
453
453
  return true;
454
454
  }
455
455
  const insertIndex = binarySearch(array, insert, identity, compare);
456
456
  if (insertIndex < 0) {
457
+ if (equalityComparer && !allowDuplicates) {
458
+ const idx = ~insertIndex;
459
+ if (idx > 0 && equalityComparer(insert, array[idx - 1])) {
460
+ return false;
461
+ }
462
+ if (idx < array.length && equalityComparer(insert, array[idx])) {
463
+ array.splice(idx, 1, insert);
464
+ return true;
465
+ }
466
+ }
457
467
  array.splice(~insertIndex, 0, insert);
458
468
  return true;
459
469
  }
@@ -7457,6 +7467,7 @@ var Diagnostics = {
7457
7467
  Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3 /* Message */, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."),
7458
7468
  Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
7459
7469
  Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
7470
+ Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3 /* Message */, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."),
7460
7471
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
7461
7472
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
7462
7473
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
@@ -8109,14 +8120,11 @@ var charToRegExpFlag = new Map(Object.entries({
8109
8120
  y: 128 /* Sticky */
8110
8121
  }));
8111
8122
  var regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
8112
- [1 /* HasIndices */, 9 /* ES2022 */],
8113
- [2 /* Global */, 0 /* ES3 */],
8114
- [4 /* IgnoreCase */, 0 /* ES3 */],
8115
- [8 /* Multiline */, 0 /* ES3 */],
8116
- [16 /* DotAll */, 5 /* ES2018 */],
8117
- [32 /* Unicode */, 2 /* ES2015 */],
8118
- [64 /* UnicodeSets */, 99 /* ESNext */],
8119
- [128 /* Sticky */, 2 /* ES2015 */]
8123
+ [1 /* HasIndices */, 9 /* RegularExpressionFlagsHasIndices */],
8124
+ [16 /* DotAll */, 5 /* RegularExpressionFlagsDotAll */],
8125
+ [32 /* Unicode */, 2 /* RegularExpressionFlagsUnicode */],
8126
+ [64 /* UnicodeSets */, 99 /* RegularExpressionFlagsUnicodeSets */],
8127
+ [128 /* Sticky */, 2 /* RegularExpressionFlagsSticky */]
8120
8128
  ]);
8121
8129
  var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
8122
8130
  var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500];
@@ -9839,10 +9847,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9839
9847
  error(Diagnostics.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, p, 1);
9840
9848
  } else {
9841
9849
  regExpFlags |= flag;
9842
- const availableFrom = regExpFlagToFirstAvailableLanguageVersion.get(flag);
9843
- if (languageVersion < availableFrom) {
9844
- error(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, p, 1, getNameOfScriptTarget(availableFrom));
9845
- }
9850
+ checkRegularExpressionFlagAvailable(flag, p);
9846
9851
  }
9847
9852
  }
9848
9853
  p++;
@@ -10074,10 +10079,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
10074
10079
  error(Diagnostics.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, pos, 1);
10075
10080
  } else {
10076
10081
  currFlags |= flag;
10077
- const availableFrom = regExpFlagToFirstAvailableLanguageVersion.get(flag);
10078
- if (languageVersion < availableFrom) {
10079
- error(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos, 1, getNameOfScriptTarget(availableFrom));
10080
- }
10082
+ checkRegularExpressionFlagAvailable(flag, pos);
10081
10083
  }
10082
10084
  pos++;
10083
10085
  }
@@ -10684,6 +10686,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
10684
10686
  }
10685
10687
  });
10686
10688
  }
10689
+ function checkRegularExpressionFlagAvailable(flag, pos2) {
10690
+ const availableFrom = regExpFlagToFirstAvailableLanguageVersion.get(flag);
10691
+ if (availableFrom && languageVersion < availableFrom) {
10692
+ error(Diagnostics.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, pos2, 1, getNameOfScriptTarget(availableFrom));
10693
+ }
10694
+ }
10687
10695
  }
10688
10696
  function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
10689
10697
  const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
@@ -11075,7 +11083,7 @@ function isExternalModuleNameRelative(moduleName) {
11075
11083
  return pathIsRelative(moduleName) || isRootedDiskPath(moduleName);
11076
11084
  }
11077
11085
  function sortAndDeduplicateDiagnostics(diagnostics) {
11078
- return sortAndDeduplicate(diagnostics, compareDiagnostics);
11086
+ return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer);
11079
11087
  }
11080
11088
  function getDefaultLibFileName(options) {
11081
11089
  switch (getEmitScriptTarget(options)) {
@@ -15752,6 +15760,9 @@ function createDiagnosticCollection() {
15752
15760
  if (result >= 0) {
15753
15761
  return diagnostics[result];
15754
15762
  }
15763
+ if (~result > 0 && diagnosticsEqualityComparer(diagnostic, diagnostics[~result - 1])) {
15764
+ return diagnostics[~result - 1];
15765
+ }
15755
15766
  return void 0;
15756
15767
  }
15757
15768
  function add(diagnostic) {
@@ -15770,7 +15781,7 @@ function createDiagnosticCollection() {
15770
15781
  }
15771
15782
  diagnostics = nonFileDiagnostics;
15772
15783
  }
15773
- insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation);
15784
+ insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation, diagnosticsEqualityComparer);
15774
15785
  }
15775
15786
  function getGlobalDiagnostics() {
15776
15787
  hasReadNonFileDiagnostics = true;
@@ -17376,7 +17387,7 @@ function compareRelatedInformation(d1, d2) {
17376
17387
  return 0 /* EqualTo */;
17377
17388
  }
17378
17389
  if (d1.relatedInformation && d2.relatedInformation) {
17379
- return compareValues(d1.relatedInformation.length, d2.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
17390
+ return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
17380
17391
  const d2i = d2.relatedInformation[index];
17381
17392
  return compareDiagnostics(d1i, d2i);
17382
17393
  }) || 0 /* EqualTo */;
@@ -17386,38 +17397,78 @@ function compareRelatedInformation(d1, d2) {
17386
17397
  function compareMessageText(t1, t2) {
17387
17398
  if (typeof t1 === "string" && typeof t2 === "string") {
17388
17399
  return compareStringsCaseSensitive(t1, t2);
17389
- } else if (typeof t1 === "string") {
17390
- return -1 /* LessThan */;
17391
- } else if (typeof t2 === "string") {
17392
- return 1 /* GreaterThan */;
17393
17400
  }
17394
- let res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
17401
+ if (typeof t1 === "string") {
17402
+ t1 = { messageText: t1 };
17403
+ }
17404
+ if (typeof t2 === "string") {
17405
+ t2 = { messageText: t2 };
17406
+ }
17407
+ const res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
17395
17408
  if (res) {
17396
17409
  return res;
17397
17410
  }
17398
- if (!t1.next && !t2.next) {
17411
+ return compareMessageChain(t1.next, t2.next);
17412
+ }
17413
+ function compareMessageChain(c1, c2) {
17414
+ if (c1 === void 0 && c2 === void 0) {
17399
17415
  return 0 /* EqualTo */;
17400
17416
  }
17401
- if (!t1.next) {
17417
+ if (c1 === void 0) {
17418
+ return 1 /* GreaterThan */;
17419
+ }
17420
+ if (c2 === void 0) {
17402
17421
  return -1 /* LessThan */;
17403
17422
  }
17404
- if (!t2.next) {
17423
+ return compareMessageChainSize(c1, c2) || compareMessageChainContent(c1, c2);
17424
+ }
17425
+ function compareMessageChainSize(c1, c2) {
17426
+ if (c1 === void 0 && c2 === void 0) {
17427
+ return 0 /* EqualTo */;
17428
+ }
17429
+ if (c1 === void 0) {
17405
17430
  return 1 /* GreaterThan */;
17406
17431
  }
17407
- const len = Math.min(t1.next.length, t2.next.length);
17408
- for (let i = 0; i < len; i++) {
17409
- res = compareMessageText(t1.next[i], t2.next[i]);
17432
+ if (c2 === void 0) {
17433
+ return -1 /* LessThan */;
17434
+ }
17435
+ let res = compareValues(c2.length, c1.length);
17436
+ if (res) {
17437
+ return res;
17438
+ }
17439
+ for (let i = 0; i < c2.length; i++) {
17440
+ res = compareMessageChainSize(c1[i].next, c2[i].next);
17410
17441
  if (res) {
17411
17442
  return res;
17412
17443
  }
17413
17444
  }
17414
- if (t1.next.length < t2.next.length) {
17415
- return -1 /* LessThan */;
17416
- } else if (t1.next.length > t2.next.length) {
17417
- return 1 /* GreaterThan */;
17445
+ return 0 /* EqualTo */;
17446
+ }
17447
+ function compareMessageChainContent(c1, c2) {
17448
+ let res;
17449
+ for (let i = 0; i < c2.length; i++) {
17450
+ res = compareStringsCaseSensitive(c1[i].messageText, c2[i].messageText);
17451
+ if (res) {
17452
+ return res;
17453
+ }
17454
+ if (c1[i].next === void 0) {
17455
+ continue;
17456
+ }
17457
+ res = compareMessageChainContent(c1[i].next, c2[i].next);
17458
+ if (res) {
17459
+ return res;
17460
+ }
17418
17461
  }
17419
17462
  return 0 /* EqualTo */;
17420
17463
  }
17464
+ function diagnosticsEqualityComparer(d1, d2) {
17465
+ return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(d1.code, d2.code) === 0 /* EqualTo */ && messageTextEqualityComparer(d1.messageText, d2.messageText);
17466
+ }
17467
+ function messageTextEqualityComparer(m1, m2) {
17468
+ const t1 = typeof m1 === "string" ? m1 : m1.messageText;
17469
+ const t2 = typeof m2 === "string" ? m2 : m2.messageText;
17470
+ return compareStringsCaseSensitive(t1, t2) === 0 /* EqualTo */;
17471
+ }
17421
17472
  function getLanguageVariant(scriptKind) {
17422
17473
  return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
17423
17474
  }
@@ -18285,7 +18336,7 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
18285
18336
  return { pos, end };
18286
18337
  }
18287
18338
  function skipTypeChecking(sourceFile, options, host) {
18288
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
18339
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
18289
18340
  }
18290
18341
  function isJsonEqual(a, b) {
18291
18342
  return a === b || typeof a === "object" && a !== null && typeof b === "object" && b !== null && equalOwnProperties(a, b, isJsonEqual);
@@ -36005,6 +36056,20 @@ var commandOptionsWithoutBuild = [
36005
36056
  defaultValueDescription: false,
36006
36057
  description: Diagnostics.Disable_emitting_comments
36007
36058
  },
36059
+ {
36060
+ name: "noCheck",
36061
+ type: "boolean",
36062
+ showInSimplifiedHelpView: false,
36063
+ category: Diagnostics.Compiler_Diagnostics,
36064
+ description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,
36065
+ transpileOptionValue: void 0,
36066
+ defaultValueDescription: false,
36067
+ affectsSemanticDiagnostics: true,
36068
+ affectsBuildInfo: true,
36069
+ extraValidation() {
36070
+ return [Diagnostics.Unknown_compiler_option_0, "noCheck"];
36071
+ }
36072
+ },
36008
36073
  {
36009
36074
  name: "noEmit",
36010
36075
  type: "boolean",
@@ -37852,11 +37917,11 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis
37852
37917
  const excludeOfRaw = getSpecsFromRaw("exclude");
37853
37918
  let isDefaultIncludeSpec = false;
37854
37919
  let excludeSpecs = toPropValue(excludeOfRaw);
37855
- if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
37856
- const outDir = raw.compilerOptions.outDir;
37857
- const declarationDir = raw.compilerOptions.declarationDir;
37920
+ if (excludeOfRaw === "no-prop") {
37921
+ const outDir = options.outDir;
37922
+ const declarationDir = options.declarationDir;
37858
37923
  if (outDir || declarationDir) {
37859
- excludeSpecs = [outDir, declarationDir].filter((d) => !!d);
37924
+ excludeSpecs = filter([outDir, declarationDir], (d) => !!d);
37860
37925
  }
37861
37926
  }
37862
37927
  if (filesSpecs === void 0 && includeSpecs === void 0) {
@@ -52085,6 +52150,7 @@ function createTypeChecker(host) {
52085
52150
  }
52086
52151
  }
52087
52152
  function serializeSymbol(symbol, isPrivate, propertyAsAlias) {
52153
+ void getPropertiesOfType(getTypeOfSymbol(symbol));
52088
52154
  const visitedSym = getMergedSymbol(symbol);
52089
52155
  if (visitedSymbols.has(getSymbolId(visitedSym))) {
52090
52156
  return;
@@ -85331,6 +85397,7 @@ function createTypeChecker(host) {
85331
85397
  if (!sym) {
85332
85398
  return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker);
85333
85399
  }
85400
+ resolveExternalModuleSymbol(sym);
85334
85401
  return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
85335
85402
  },
85336
85403
  isImportRequiredByAugmentation
@@ -110465,12 +110532,13 @@ function createGetIsolatedDeclarationErrors(resolver) {
110465
110532
  // src/compiler/transformers/declarations.ts
110466
110533
  function getDeclarationDiagnostics(host, resolver, file) {
110467
110534
  const compilerOptions = host.getCompilerOptions();
110535
+ const files = filter(getSourceFilesToEmit(host, file), isSourceFileNotJson);
110468
110536
  const result = transformNodes(
110469
110537
  resolver,
110470
110538
  host,
110471
110539
  factory,
110472
110540
  compilerOptions,
110473
- file ? [file] : filter(host.getSourceFiles(), isSourceFileNotJson),
110541
+ file ? contains(files, file) ? [file] : emptyArray : files,
110474
110542
  [transformDeclarations],
110475
110543
  /*allowDtsFiles*/
110476
110544
  false
@@ -112897,7 +112965,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
112897
112965
  const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
112898
112966
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
112899
112967
  const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
112900
- if (emitOnly && !getEmitDeclarations(compilerOptions)) {
112968
+ if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck) {
112901
112969
  filesForEmit.forEach(collectLinkedAliases);
112902
112970
  }
112903
112971
  const declarationTransform = transformNodes(
@@ -120991,7 +121059,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
120991
121059
  continue;
120992
121060
  }
120993
121061
  const isFromNodeModulesSearch = resolution.isExternalLibraryImport;
120994
- const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension);
121062
+ const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);
120995
121063
  const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));
120996
121064
  const resolvedFileName = resolution.resolvedFileName;
120997
121065
  if (isFromNodeModulesSearch) {
@@ -121286,6 +121354,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121286
121354
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit");
121287
121355
  }
121288
121356
  }
121357
+ if (options.noCheck) {
121358
+ if (options.noEmit) {
121359
+ createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
121360
+ }
121361
+ if (!options.emitDeclarationOnly) {
121362
+ createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noCheck", "emitDeclarationOnly");
121363
+ }
121364
+ }
121289
121365
  if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
121290
121366
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
121291
121367
  }
@@ -9456,6 +9456,7 @@ declare namespace ts {
9456
9456
  interface EmitOutput {
9457
9457
  outputFiles: OutputFile[];
9458
9458
  emitSkipped: boolean;
9459
+ diagnostics: readonly Diagnostic[];
9459
9460
  }
9460
9461
  interface OutputFile {
9461
9462
  name: string;