@typescript-deploys/pr-build 5.6.0-pr-59106-19 → 5.6.0-pr-59170-2

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.6";
21
- var version = `${versionMajorMinor}.0-insiders.20240702`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240708`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -8035,91 +8035,6 @@ var regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
8035
8035
  [64 /* UnicodeSets */, 99 /* RegularExpressionFlagsUnicodeSets */],
8036
8036
  [128 /* Sticky */, 2 /* RegularExpressionFlagsSticky */]
8037
8037
  ]);
8038
- var tokenCategoryLookup = [];
8039
- var tokenCategoryLookupUncommon = /* @__PURE__ */ new Map();
8040
- for (let i = 0; i < 127 /* maxAsciiCharacter */; i++) {
8041
- tokenCategoryLookup.push(0 /* IdentifierOrUnknown */);
8042
- }
8043
- for (const [key, value] of [
8044
- // Line Break Whitespace
8045
- [10 /* lineFeed */, 1024 /* LineBreak */],
8046
- [13 /* carriageReturn */, 1024 /* LineBreak */],
8047
- [8232 /* lineSeparator */, 1024 /* LineBreak */],
8048
- [8233 /* paragraphSeparator */, 1024 /* LineBreak */],
8049
- // Single Line Whitespace
8050
- [32 /* space */, 512 /* Whitespace */],
8051
- [9 /* tab */, 512 /* Whitespace */],
8052
- [11 /* verticalTab */, 512 /* Whitespace */],
8053
- [12 /* formFeed */, 512 /* Whitespace */],
8054
- [160 /* nonBreakingSpace */, 512 /* Whitespace */],
8055
- [133 /* nextLine */, 512 /* Whitespace */],
8056
- [5760 /* ogham */, 512 /* Whitespace */],
8057
- [8192 /* enQuad */, 512 /* Whitespace */],
8058
- [8193 /* emQuad */, 512 /* Whitespace */],
8059
- [8194 /* enSpace */, 512 /* Whitespace */],
8060
- [8195 /* emSpace */, 512 /* Whitespace */],
8061
- [8196 /* threePerEmSpace */, 512 /* Whitespace */],
8062
- [8197 /* fourPerEmSpace */, 512 /* Whitespace */],
8063
- [8198 /* sixPerEmSpace */, 512 /* Whitespace */],
8064
- [8199 /* figureSpace */, 512 /* Whitespace */],
8065
- [8200 /* punctuationSpace */, 512 /* Whitespace */],
8066
- [8201 /* thinSpace */, 512 /* Whitespace */],
8067
- [8202 /* hairSpace */, 512 /* Whitespace */],
8068
- [8203 /* zeroWidthSpace */, 512 /* Whitespace */],
8069
- [8239 /* narrowNoBreakSpace */, 512 /* Whitespace */],
8070
- [8287 /* mathematicalSpace */, 512 /* Whitespace */],
8071
- [12288 /* ideographicSpace */, 512 /* Whitespace */],
8072
- [65279 /* byteOrderMark */, 512 /* Whitespace */],
8073
- // Simple Single-Character Tokens
8074
- [40 /* openParen */, 256 /* SimpleToken */ | 21 /* OpenParenToken */],
8075
- [41 /* closeParen */, 256 /* SimpleToken */ | 22 /* CloseParenToken */],
8076
- [44 /* comma */, 256 /* SimpleToken */ | 28 /* CommaToken */],
8077
- [58 /* colon */, 256 /* SimpleToken */ | 59 /* ColonToken */],
8078
- [59 /* semicolon */, 256 /* SimpleToken */ | 27 /* SemicolonToken */],
8079
- [91 /* openBracket */, 256 /* SimpleToken */ | 23 /* OpenBracketToken */],
8080
- [93 /* closeBracket */, 256 /* SimpleToken */ | 24 /* CloseBracketToken */],
8081
- [123 /* openBrace */, 256 /* SimpleToken */ | 19 /* OpenBraceToken */],
8082
- [125 /* closeBrace */, 256 /* SimpleToken */ | 20 /* CloseBraceToken */],
8083
- [126 /* tilde */, 256 /* SimpleToken */ | 55 /* TildeToken */],
8084
- [64 /* at */, 256 /* SimpleToken */ | 60 /* AtToken */],
8085
- // Digits
8086
- [48 /* _0 */, 2048 /* Digit */],
8087
- [49 /* _1 */, 2048 /* Digit */],
8088
- [50 /* _2 */, 2048 /* Digit */],
8089
- [51 /* _3 */, 2048 /* Digit */],
8090
- [52 /* _4 */, 2048 /* Digit */],
8091
- [53 /* _5 */, 2048 /* Digit */],
8092
- [54 /* _6 */, 2048 /* Digit */],
8093
- [55 /* _7 */, 2048 /* Digit */],
8094
- [56 /* _8 */, 2048 /* Digit */],
8095
- [57 /* _9 */, 2048 /* Digit */],
8096
- [33 /* exclamation */, 4096 /* RecognizedMisc */],
8097
- [34 /* doubleQuote */, 4096 /* RecognizedMisc */],
8098
- [39 /* singleQuote */, 4096 /* RecognizedMisc */],
8099
- [96 /* backtick */, 4096 /* RecognizedMisc */],
8100
- [37 /* percent */, 4096 /* RecognizedMisc */],
8101
- [38 /* ampersand */, 4096 /* RecognizedMisc */],
8102
- [42 /* asterisk */, 4096 /* RecognizedMisc */],
8103
- [43 /* plus */, 4096 /* RecognizedMisc */],
8104
- [45 /* minus */, 4096 /* RecognizedMisc */],
8105
- [46 /* dot */, 4096 /* RecognizedMisc */],
8106
- [47 /* slash */, 4096 /* RecognizedMisc */],
8107
- [60 /* lessThan */, 4096 /* RecognizedMisc */],
8108
- [61 /* equals */, 4096 /* RecognizedMisc */],
8109
- [62 /* greaterThan */, 4096 /* RecognizedMisc */],
8110
- [63 /* question */, 4096 /* RecognizedMisc */],
8111
- [94 /* caret */, 4096 /* RecognizedMisc */],
8112
- [124 /* bar */, 4096 /* RecognizedMisc */],
8113
- [92 /* backslash */, 4096 /* RecognizedMisc */],
8114
- [35 /* hash */, 4096 /* RecognizedMisc */],
8115
- [65533 /* replacementCharacter */, 4096 /* RecognizedMisc */]
8116
- ]) {
8117
- if (key < tokenCategoryLookup.length) {
8118
- tokenCategoryLookup[key] = value;
8119
- } else {
8120
- tokenCategoryLookupUncommon.set(key, value);
8121
- }
8122
- }
8123
8038
  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];
8124
8039
  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];
8125
8040
  var unicodeESNextIdentifierStart = [65, 90, 97, 122, 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, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 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, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 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, 2809, 2809, 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, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 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, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 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, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 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, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 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, 43824, 43866, 43868, 43881, 43888, 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, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743];
@@ -9282,110 +9197,62 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9282
9197
  return token = 1 /* EndOfFileToken */;
9283
9198
  }
9284
9199
  const ch = codePointUnchecked(pos);
9285
- if (ch === 9 /* tab */ || ch === 32 /* space */) {
9286
- if (skipTrivia2) {
9287
- pos++;
9288
- continue;
9289
- } else {
9290
- while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
9291
- pos++;
9292
- }
9293
- return token = 5 /* WhitespaceTrivia */;
9294
- }
9295
- }
9296
- if (ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) {
9297
- tokenFlags |= 1 /* PrecedingLineBreak */;
9298
- if (skipTrivia2) {
9299
- pos++;
9300
- continue;
9301
- } else {
9302
- if (ch === 13 /* carriageReturn */ && pos + 1 < end && charCodeUnchecked(pos + 1) === 10 /* lineFeed */) {
9303
- pos += 2;
9200
+ if (pos === 0) {
9201
+ if (ch === 35 /* hash */ && isShebangTrivia(text, pos)) {
9202
+ pos = scanShebangTrivia(text, pos);
9203
+ if (skipTrivia2) {
9204
+ continue;
9304
9205
  } else {
9305
- pos++;
9206
+ return token = 6 /* ShebangTrivia */;
9306
9207
  }
9307
- return token = 4 /* NewLineTrivia */;
9308
9208
  }
9309
9209
  }
9310
- const tokenCategory = ch < tokenCategoryLookup.length ? tokenCategoryLookup[ch] : tokenCategoryLookupUncommon.get(ch) ?? 0 /* IdentifierOrUnknown */;
9311
- if (tokenCategory === 0 /* IdentifierOrUnknown */) {
9312
- const identifierKind = scanIdentifier(ch, languageVersion);
9313
- if (identifierKind) {
9314
- return token = identifierKind;
9315
- }
9316
- const size = charSize(ch);
9317
- error(Diagnostics.Invalid_character, pos, size);
9318
- pos += size;
9319
- return token = 0 /* Unknown */;
9320
- }
9321
- if (tokenCategory & 512 /* Whitespace */) {
9322
- if (skipTrivia2) {
9323
- pos++;
9324
- continue;
9325
- } else {
9326
- while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
9210
+ switch (ch) {
9211
+ case 10 /* lineFeed */:
9212
+ case 13 /* carriageReturn */:
9213
+ tokenFlags |= 1 /* PrecedingLineBreak */;
9214
+ if (skipTrivia2) {
9327
9215
  pos++;
9328
- }
9329
- return token = 5 /* WhitespaceTrivia */;
9330
- }
9331
- }
9332
- if (tokenCategory & 1024 /* LineBreak */) {
9333
- tokenFlags |= 1 /* PrecedingLineBreak */;
9334
- pos += charSize(ch);
9335
- continue;
9336
- }
9337
- if (tokenCategory & 256 /* SimpleToken */) {
9338
- pos++;
9339
- return token = tokenCategory & 255 /* SimpleTokenMask */;
9340
- }
9341
- if (tokenCategory & 2048 /* Digit */) {
9342
- if (ch === 48 /* _0 */) {
9343
- if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 88 /* X */ || charCodeUnchecked(pos + 1) === 120 /* x */)) {
9344
- pos += 2;
9345
- tokenValue = scanMinimumNumberOfHexDigits(
9346
- 1,
9347
- /*canHaveSeparators*/
9348
- true
9349
- );
9350
- if (!tokenValue) {
9351
- error(Diagnostics.Hexadecimal_digit_expected);
9352
- tokenValue = "0";
9353
- }
9354
- tokenValue = "0x" + tokenValue;
9355
- tokenFlags |= 64 /* HexSpecifier */;
9356
- return token = checkBigIntSuffix();
9357
- } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 66 /* B */ || charCodeUnchecked(pos + 1) === 98 /* b */)) {
9358
- pos += 2;
9359
- tokenValue = scanBinaryOrOctalDigits(
9360
- /* base */
9361
- 2
9362
- );
9363
- if (!tokenValue) {
9364
- error(Diagnostics.Binary_digit_expected);
9365
- tokenValue = "0";
9216
+ continue;
9217
+ } else {
9218
+ if (ch === 13 /* carriageReturn */ && pos + 1 < end && charCodeUnchecked(pos + 1) === 10 /* lineFeed */) {
9219
+ pos += 2;
9220
+ } else {
9221
+ pos++;
9366
9222
  }
9367
- tokenValue = "0b" + tokenValue;
9368
- tokenFlags |= 128 /* BinarySpecifier */;
9369
- return token = checkBigIntSuffix();
9370
- } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 79 /* O */ || charCodeUnchecked(pos + 1) === 111 /* o */)) {
9371
- pos += 2;
9372
- tokenValue = scanBinaryOrOctalDigits(
9373
- /* base */
9374
- 8
9375
- );
9376
- if (!tokenValue) {
9377
- error(Diagnostics.Octal_digit_expected);
9378
- tokenValue = "0";
9223
+ return token = 4 /* NewLineTrivia */;
9224
+ }
9225
+ case 9 /* tab */:
9226
+ case 11 /* verticalTab */:
9227
+ case 12 /* formFeed */:
9228
+ case 32 /* space */:
9229
+ case 160 /* nonBreakingSpace */:
9230
+ case 5760 /* ogham */:
9231
+ case 8192 /* enQuad */:
9232
+ case 8193 /* emQuad */:
9233
+ case 8194 /* enSpace */:
9234
+ case 8195 /* emSpace */:
9235
+ case 8196 /* threePerEmSpace */:
9236
+ case 8197 /* fourPerEmSpace */:
9237
+ case 8198 /* sixPerEmSpace */:
9238
+ case 8199 /* figureSpace */:
9239
+ case 8200 /* punctuationSpace */:
9240
+ case 8201 /* thinSpace */:
9241
+ case 8202 /* hairSpace */:
9242
+ case 8203 /* zeroWidthSpace */:
9243
+ case 8239 /* narrowNoBreakSpace */:
9244
+ case 8287 /* mathematicalSpace */:
9245
+ case 12288 /* ideographicSpace */:
9246
+ case 65279 /* byteOrderMark */:
9247
+ if (skipTrivia2) {
9248
+ pos++;
9249
+ continue;
9250
+ } else {
9251
+ while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
9252
+ pos++;
9379
9253
  }
9380
- tokenValue = "0o" + tokenValue;
9381
- tokenFlags |= 256 /* OctalSpecifier */;
9382
- return token = checkBigIntSuffix();
9254
+ return token = 5 /* WhitespaceTrivia */;
9383
9255
  }
9384
- }
9385
- return token = scanNumber();
9386
- }
9387
- if (!(tokenCategory & 4096 /* RecognizedMisc */)) Debug.fail(`Unhandled token category ${tokenCategory}`);
9388
- switch (ch) {
9389
9256
  case 33 /* exclamation */:
9390
9257
  if (charCodeUnchecked(pos + 1) === 61 /* equals */) {
9391
9258
  if (charCodeUnchecked(pos + 2) === 61 /* equals */) {
@@ -9422,6 +9289,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9422
9289
  }
9423
9290
  pos++;
9424
9291
  return token = 51 /* AmpersandToken */;
9292
+ case 40 /* openParen */:
9293
+ pos++;
9294
+ return token = 21 /* OpenParenToken */;
9295
+ case 41 /* closeParen */:
9296
+ pos++;
9297
+ return token = 22 /* CloseParenToken */;
9425
9298
  case 42 /* asterisk */:
9426
9299
  if (charCodeUnchecked(pos + 1) === 61 /* equals */) {
9427
9300
  return pos += 2, token = 67 /* AsteriskEqualsToken */;
@@ -9447,6 +9320,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9447
9320
  }
9448
9321
  pos++;
9449
9322
  return token = 40 /* PlusToken */;
9323
+ case 44 /* comma */:
9324
+ pos++;
9325
+ return token = 28 /* CommaToken */;
9450
9326
  case 45 /* minus */:
9451
9327
  if (charCodeUnchecked(pos + 1) === 45 /* minus */) {
9452
9328
  return pos += 2, token = 47 /* MinusMinusToken */;
@@ -9526,6 +9402,64 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9526
9402
  }
9527
9403
  pos++;
9528
9404
  return token = 44 /* SlashToken */;
9405
+ case 48 /* _0 */:
9406
+ if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 88 /* X */ || charCodeUnchecked(pos + 1) === 120 /* x */)) {
9407
+ pos += 2;
9408
+ tokenValue = scanMinimumNumberOfHexDigits(
9409
+ 1,
9410
+ /*canHaveSeparators*/
9411
+ true
9412
+ );
9413
+ if (!tokenValue) {
9414
+ error(Diagnostics.Hexadecimal_digit_expected);
9415
+ tokenValue = "0";
9416
+ }
9417
+ tokenValue = "0x" + tokenValue;
9418
+ tokenFlags |= 64 /* HexSpecifier */;
9419
+ return token = checkBigIntSuffix();
9420
+ } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 66 /* B */ || charCodeUnchecked(pos + 1) === 98 /* b */)) {
9421
+ pos += 2;
9422
+ tokenValue = scanBinaryOrOctalDigits(
9423
+ /* base */
9424
+ 2
9425
+ );
9426
+ if (!tokenValue) {
9427
+ error(Diagnostics.Binary_digit_expected);
9428
+ tokenValue = "0";
9429
+ }
9430
+ tokenValue = "0b" + tokenValue;
9431
+ tokenFlags |= 128 /* BinarySpecifier */;
9432
+ return token = checkBigIntSuffix();
9433
+ } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 79 /* O */ || charCodeUnchecked(pos + 1) === 111 /* o */)) {
9434
+ pos += 2;
9435
+ tokenValue = scanBinaryOrOctalDigits(
9436
+ /* base */
9437
+ 8
9438
+ );
9439
+ if (!tokenValue) {
9440
+ error(Diagnostics.Octal_digit_expected);
9441
+ tokenValue = "0";
9442
+ }
9443
+ tokenValue = "0o" + tokenValue;
9444
+ tokenFlags |= 256 /* OctalSpecifier */;
9445
+ return token = checkBigIntSuffix();
9446
+ }
9447
+ case 49 /* _1 */:
9448
+ case 50 /* _2 */:
9449
+ case 51 /* _3 */:
9450
+ case 52 /* _4 */:
9451
+ case 53 /* _5 */:
9452
+ case 54 /* _6 */:
9453
+ case 55 /* _7 */:
9454
+ case 56 /* _8 */:
9455
+ case 57 /* _9 */:
9456
+ return token = scanNumber();
9457
+ case 58 /* colon */:
9458
+ pos++;
9459
+ return token = 59 /* ColonToken */;
9460
+ case 59 /* semicolon */:
9461
+ pos++;
9462
+ return token = 27 /* SemicolonToken */;
9529
9463
  case 60 /* lessThan */:
9530
9464
  if (isConflictMarkerTrivia(text, pos)) {
9531
9465
  pos = scanConflictMarkerTrivia(text, pos, error);
@@ -9592,12 +9526,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9592
9526
  }
9593
9527
  pos++;
9594
9528
  return token = 58 /* QuestionToken */;
9529
+ case 91 /* openBracket */:
9530
+ pos++;
9531
+ return token = 23 /* OpenBracketToken */;
9532
+ case 93 /* closeBracket */:
9533
+ pos++;
9534
+ return token = 24 /* CloseBracketToken */;
9595
9535
  case 94 /* caret */:
9596
9536
  if (charCodeUnchecked(pos + 1) === 61 /* equals */) {
9597
9537
  return pos += 2, token = 79 /* CaretEqualsToken */;
9598
9538
  }
9599
9539
  pos++;
9600
9540
  return token = 53 /* CaretToken */;
9541
+ case 123 /* openBrace */:
9542
+ pos++;
9543
+ return token = 19 /* OpenBraceToken */;
9601
9544
  case 124 /* bar */:
9602
9545
  if (isConflictMarkerTrivia(text, pos)) {
9603
9546
  pos = scanConflictMarkerTrivia(text, pos, error);
@@ -9618,6 +9561,15 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9618
9561
  }
9619
9562
  pos++;
9620
9563
  return token = 52 /* BarToken */;
9564
+ case 125 /* closeBrace */:
9565
+ pos++;
9566
+ return token = 20 /* CloseBraceToken */;
9567
+ case 126 /* tilde */:
9568
+ pos++;
9569
+ return token = 55 /* TildeToken */;
9570
+ case 64 /* at */:
9571
+ pos++;
9572
+ return token = 60 /* AtToken */;
9621
9573
  case 92 /* backslash */:
9622
9574
  const extendedCookedChar = peekExtendedUnicodeEscape();
9623
9575
  if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
@@ -9638,21 +9590,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9638
9590
  pos++;
9639
9591
  return token = 0 /* Unknown */;
9640
9592
  case 35 /* hash */:
9641
- const charAfterHash = codePointUnchecked(pos + 1);
9642
- if (charAfterHash === 33 /* exclamation */) {
9643
- if (pos === 0) {
9644
- pos = scanShebangTrivia(text, pos);
9645
- if (skipTrivia2) {
9646
- continue;
9647
- } else {
9648
- return token = 6 /* ShebangTrivia */;
9649
- }
9650
- } else if (pos !== 0) {
9651
- error(Diagnostics.can_only_be_used_at_the_start_of_a_file, pos, 2);
9652
- pos++;
9653
- return token = 0 /* Unknown */;
9654
- }
9593
+ if (pos !== 0 && text[pos + 1] === "!") {
9594
+ error(Diagnostics.can_only_be_used_at_the_start_of_a_file, pos, 2);
9595
+ pos++;
9596
+ return token = 0 /* Unknown */;
9655
9597
  }
9598
+ const charAfterHash = codePointUnchecked(pos + 1);
9656
9599
  if (charAfterHash === 92 /* backslash */) {
9657
9600
  pos++;
9658
9601
  const extendedCookedChar2 = peekExtendedUnicodeEscape();
@@ -9684,6 +9627,22 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9684
9627
  error(Diagnostics.File_appears_to_be_binary, 0, 0);
9685
9628
  pos = end;
9686
9629
  return token = 8 /* NonTextFileMarkerTrivia */;
9630
+ default:
9631
+ const identifierKind = scanIdentifier(ch, languageVersion);
9632
+ if (identifierKind) {
9633
+ return token = identifierKind;
9634
+ } else if (isWhiteSpaceSingleLine(ch)) {
9635
+ pos += charSize(ch);
9636
+ continue;
9637
+ } else if (isLineBreak(ch)) {
9638
+ tokenFlags |= 1 /* PrecedingLineBreak */;
9639
+ pos += charSize(ch);
9640
+ continue;
9641
+ }
9642
+ const size = charSize(ch);
9643
+ error(Diagnostics.Invalid_character, pos, size);
9644
+ pos += size;
9645
+ return token = 0 /* Unknown */;
9687
9646
  }
9688
9647
  }
9689
9648
  }
@@ -51465,7 +51424,7 @@ function createTypeChecker(host) {
51465
51424
  if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
51466
51425
  const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
51467
51426
  if (annotation && getTypeFromTypeNode2(context, annotation) === type) {
51468
- const result = tryReuseExistingTypeNodeHelper(context, annotation);
51427
+ const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration);
51469
51428
  if (result) {
51470
51429
  return result;
51471
51430
  }
@@ -114436,7 +114395,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114436
114395
  );
114437
114396
  }
114438
114397
  function emitLiteral(node, jsxAttributeEscape) {
114439
- const text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape);
114398
+ const text = getLiteralTextOfNode(
114399
+ node,
114400
+ /*sourceFile*/
114401
+ void 0,
114402
+ printerOptions.neverAsciiEscape,
114403
+ jsxAttributeEscape
114404
+ );
114440
114405
  if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) {
114441
114406
  writeLiteral(text);
114442
114407
  } else {
@@ -114917,6 +114882,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
114917
114882
  if (isNumericLiteral(expression)) {
114918
114883
  const text = getLiteralTextOfNode(
114919
114884
  expression,
114885
+ /*sourceFile*/
114886
+ void 0,
114920
114887
  /*neverAsciiEscape*/
114921
114888
  true,
114922
114889
  /*jsxAttributeEscape*/
@@ -117058,18 +117025,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
117058
117025
  }
117059
117026
  return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
117060
117027
  }
117061
- function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) {
117028
+ function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) {
117062
117029
  if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) {
117063
117030
  const textSourceNode = node.textSourceNode;
117064
117031
  if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) {
117065
117032
  const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode);
117066
117033
  return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`;
117067
117034
  } else {
117068
- return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
117035
+ return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape);
117069
117036
  }
117070
117037
  }
117071
117038
  const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target >= 8 /* ES2021 */ ? 8 /* AllowNumericSeparator */ : 0);
117072
- return getLiteralText(node, currentSourceFile, flags);
117039
+ return getLiteralText(node, sourceFile, flags);
117073
117040
  }
117074
117041
  function pushNameGenerationScope(node) {
117075
117042
  privateNameTempFlagsStack.push(privateNameTempFlags);
@@ -214,6 +214,22 @@ declare namespace ts {
214
214
  * The time spent creating or updating the auto-import program, in milliseconds.
215
215
  */
216
216
  createAutoImportProviderProgramDurationMs?: number;
217
+ /**
218
+ * The time spent computing diagnostics, in milliseconds.
219
+ */
220
+ diagnosticsDuration?: FileDiagnosticPerformanceData[];
221
+ }
222
+ /**
223
+ * Time spent computing each kind of diagnostics, in milliseconds.
224
+ */
225
+ export type DiagnosticPerformanceData = {
226
+ [Kind in DiagnosticEventKind]?: number;
227
+ };
228
+ export interface FileDiagnosticPerformanceData extends DiagnosticPerformanceData {
229
+ /**
230
+ * The file for which the performance data is reported.
231
+ */
232
+ file: string;
217
233
  }
218
234
  /**
219
235
  * Arguments for FileRequest messages.
@@ -1979,10 +1995,6 @@ declare namespace ts {
1979
1995
  * Spans where the region diagnostic was requested, if this is a region semantic diagnostic event.
1980
1996
  */
1981
1997
  spans?: TextSpan[];
1982
- /**
1983
- * Time spent computing the diagnostics, in milliseconds.
1984
- */
1985
- duration?: number;
1986
1998
  }
1987
1999
  export type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag" | "regionSemanticDiag";
1988
2000
  /**
@@ -3416,6 +3428,7 @@ declare namespace ts {
3416
3428
  constructor(opts: SessionOptions);
3417
3429
  private sendRequestCompletedEvent;
3418
3430
  private addPerformanceData;
3431
+ private addDiagnosticsPerformanceData;
3419
3432
  private performanceEventHandler;
3420
3433
  private defaultEventHandler;
3421
3434
  private projectsUpdatedInBackgroundEvent;
package/lib/typescript.js CHANGED
@@ -2250,7 +2250,7 @@ module.exports = __toCommonJS(typescript_exports);
2250
2250
 
2251
2251
  // src/compiler/corePublic.ts
2252
2252
  var versionMajorMinor = "5.6";
2253
- var version = `${versionMajorMinor}.0-insiders.20240702`;
2253
+ var version = `${versionMajorMinor}.0-insiders.20240708`;
2254
2254
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2255
2255
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2256
2256
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -11413,91 +11413,6 @@ var regExpFlagToFirstAvailableLanguageVersion = /* @__PURE__ */ new Map([
11413
11413
  [64 /* UnicodeSets */, 99 /* RegularExpressionFlagsUnicodeSets */],
11414
11414
  [128 /* Sticky */, 2 /* RegularExpressionFlagsSticky */]
11415
11415
  ]);
11416
- var tokenCategoryLookup = [];
11417
- var tokenCategoryLookupUncommon = /* @__PURE__ */ new Map();
11418
- for (let i = 0; i < 127 /* maxAsciiCharacter */; i++) {
11419
- tokenCategoryLookup.push(0 /* IdentifierOrUnknown */);
11420
- }
11421
- for (const [key, value] of [
11422
- // Line Break Whitespace
11423
- [10 /* lineFeed */, 1024 /* LineBreak */],
11424
- [13 /* carriageReturn */, 1024 /* LineBreak */],
11425
- [8232 /* lineSeparator */, 1024 /* LineBreak */],
11426
- [8233 /* paragraphSeparator */, 1024 /* LineBreak */],
11427
- // Single Line Whitespace
11428
- [32 /* space */, 512 /* Whitespace */],
11429
- [9 /* tab */, 512 /* Whitespace */],
11430
- [11 /* verticalTab */, 512 /* Whitespace */],
11431
- [12 /* formFeed */, 512 /* Whitespace */],
11432
- [160 /* nonBreakingSpace */, 512 /* Whitespace */],
11433
- [133 /* nextLine */, 512 /* Whitespace */],
11434
- [5760 /* ogham */, 512 /* Whitespace */],
11435
- [8192 /* enQuad */, 512 /* Whitespace */],
11436
- [8193 /* emQuad */, 512 /* Whitespace */],
11437
- [8194 /* enSpace */, 512 /* Whitespace */],
11438
- [8195 /* emSpace */, 512 /* Whitespace */],
11439
- [8196 /* threePerEmSpace */, 512 /* Whitespace */],
11440
- [8197 /* fourPerEmSpace */, 512 /* Whitespace */],
11441
- [8198 /* sixPerEmSpace */, 512 /* Whitespace */],
11442
- [8199 /* figureSpace */, 512 /* Whitespace */],
11443
- [8200 /* punctuationSpace */, 512 /* Whitespace */],
11444
- [8201 /* thinSpace */, 512 /* Whitespace */],
11445
- [8202 /* hairSpace */, 512 /* Whitespace */],
11446
- [8203 /* zeroWidthSpace */, 512 /* Whitespace */],
11447
- [8239 /* narrowNoBreakSpace */, 512 /* Whitespace */],
11448
- [8287 /* mathematicalSpace */, 512 /* Whitespace */],
11449
- [12288 /* ideographicSpace */, 512 /* Whitespace */],
11450
- [65279 /* byteOrderMark */, 512 /* Whitespace */],
11451
- // Simple Single-Character Tokens
11452
- [40 /* openParen */, 256 /* SimpleToken */ | 21 /* OpenParenToken */],
11453
- [41 /* closeParen */, 256 /* SimpleToken */ | 22 /* CloseParenToken */],
11454
- [44 /* comma */, 256 /* SimpleToken */ | 28 /* CommaToken */],
11455
- [58 /* colon */, 256 /* SimpleToken */ | 59 /* ColonToken */],
11456
- [59 /* semicolon */, 256 /* SimpleToken */ | 27 /* SemicolonToken */],
11457
- [91 /* openBracket */, 256 /* SimpleToken */ | 23 /* OpenBracketToken */],
11458
- [93 /* closeBracket */, 256 /* SimpleToken */ | 24 /* CloseBracketToken */],
11459
- [123 /* openBrace */, 256 /* SimpleToken */ | 19 /* OpenBraceToken */],
11460
- [125 /* closeBrace */, 256 /* SimpleToken */ | 20 /* CloseBraceToken */],
11461
- [126 /* tilde */, 256 /* SimpleToken */ | 55 /* TildeToken */],
11462
- [64 /* at */, 256 /* SimpleToken */ | 60 /* AtToken */],
11463
- // Digits
11464
- [48 /* _0 */, 2048 /* Digit */],
11465
- [49 /* _1 */, 2048 /* Digit */],
11466
- [50 /* _2 */, 2048 /* Digit */],
11467
- [51 /* _3 */, 2048 /* Digit */],
11468
- [52 /* _4 */, 2048 /* Digit */],
11469
- [53 /* _5 */, 2048 /* Digit */],
11470
- [54 /* _6 */, 2048 /* Digit */],
11471
- [55 /* _7 */, 2048 /* Digit */],
11472
- [56 /* _8 */, 2048 /* Digit */],
11473
- [57 /* _9 */, 2048 /* Digit */],
11474
- [33 /* exclamation */, 4096 /* RecognizedMisc */],
11475
- [34 /* doubleQuote */, 4096 /* RecognizedMisc */],
11476
- [39 /* singleQuote */, 4096 /* RecognizedMisc */],
11477
- [96 /* backtick */, 4096 /* RecognizedMisc */],
11478
- [37 /* percent */, 4096 /* RecognizedMisc */],
11479
- [38 /* ampersand */, 4096 /* RecognizedMisc */],
11480
- [42 /* asterisk */, 4096 /* RecognizedMisc */],
11481
- [43 /* plus */, 4096 /* RecognizedMisc */],
11482
- [45 /* minus */, 4096 /* RecognizedMisc */],
11483
- [46 /* dot */, 4096 /* RecognizedMisc */],
11484
- [47 /* slash */, 4096 /* RecognizedMisc */],
11485
- [60 /* lessThan */, 4096 /* RecognizedMisc */],
11486
- [61 /* equals */, 4096 /* RecognizedMisc */],
11487
- [62 /* greaterThan */, 4096 /* RecognizedMisc */],
11488
- [63 /* question */, 4096 /* RecognizedMisc */],
11489
- [94 /* caret */, 4096 /* RecognizedMisc */],
11490
- [124 /* bar */, 4096 /* RecognizedMisc */],
11491
- [92 /* backslash */, 4096 /* RecognizedMisc */],
11492
- [35 /* hash */, 4096 /* RecognizedMisc */],
11493
- [65533 /* replacementCharacter */, 4096 /* RecognizedMisc */]
11494
- ]) {
11495
- if (key < tokenCategoryLookup.length) {
11496
- tokenCategoryLookup[key] = value;
11497
- } else {
11498
- tokenCategoryLookupUncommon.set(key, value);
11499
- }
11500
- }
11501
11416
  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];
11502
11417
  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];
11503
11418
  var unicodeESNextIdentifierStart = [65, 90, 97, 122, 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, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 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, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 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, 2809, 2809, 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, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 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, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 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, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 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, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 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, 43824, 43866, 43868, 43881, 43888, 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, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743];
@@ -12684,110 +12599,62 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12684
12599
  return token = 1 /* EndOfFileToken */;
12685
12600
  }
12686
12601
  const ch = codePointUnchecked(pos);
12687
- if (ch === 9 /* tab */ || ch === 32 /* space */) {
12688
- if (skipTrivia2) {
12689
- pos++;
12690
- continue;
12691
- } else {
12692
- while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
12693
- pos++;
12694
- }
12695
- return token = 5 /* WhitespaceTrivia */;
12696
- }
12697
- }
12698
- if (ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) {
12699
- tokenFlags |= 1 /* PrecedingLineBreak */;
12700
- if (skipTrivia2) {
12701
- pos++;
12702
- continue;
12703
- } else {
12704
- if (ch === 13 /* carriageReturn */ && pos + 1 < end && charCodeUnchecked(pos + 1) === 10 /* lineFeed */) {
12705
- pos += 2;
12602
+ if (pos === 0) {
12603
+ if (ch === 35 /* hash */ && isShebangTrivia(text, pos)) {
12604
+ pos = scanShebangTrivia(text, pos);
12605
+ if (skipTrivia2) {
12606
+ continue;
12706
12607
  } else {
12707
- pos++;
12608
+ return token = 6 /* ShebangTrivia */;
12708
12609
  }
12709
- return token = 4 /* NewLineTrivia */;
12710
12610
  }
12711
12611
  }
12712
- const tokenCategory = ch < tokenCategoryLookup.length ? tokenCategoryLookup[ch] : tokenCategoryLookupUncommon.get(ch) ?? 0 /* IdentifierOrUnknown */;
12713
- if (tokenCategory === 0 /* IdentifierOrUnknown */) {
12714
- const identifierKind = scanIdentifier(ch, languageVersion);
12715
- if (identifierKind) {
12716
- return token = identifierKind;
12717
- }
12718
- const size = charSize(ch);
12719
- error2(Diagnostics.Invalid_character, pos, size);
12720
- pos += size;
12721
- return token = 0 /* Unknown */;
12722
- }
12723
- if (tokenCategory & 512 /* Whitespace */) {
12724
- if (skipTrivia2) {
12725
- pos++;
12726
- continue;
12727
- } else {
12728
- while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
12612
+ switch (ch) {
12613
+ case 10 /* lineFeed */:
12614
+ case 13 /* carriageReturn */:
12615
+ tokenFlags |= 1 /* PrecedingLineBreak */;
12616
+ if (skipTrivia2) {
12729
12617
  pos++;
12730
- }
12731
- return token = 5 /* WhitespaceTrivia */;
12732
- }
12733
- }
12734
- if (tokenCategory & 1024 /* LineBreak */) {
12735
- tokenFlags |= 1 /* PrecedingLineBreak */;
12736
- pos += charSize(ch);
12737
- continue;
12738
- }
12739
- if (tokenCategory & 256 /* SimpleToken */) {
12740
- pos++;
12741
- return token = tokenCategory & 255 /* SimpleTokenMask */;
12742
- }
12743
- if (tokenCategory & 2048 /* Digit */) {
12744
- if (ch === 48 /* _0 */) {
12745
- if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 88 /* X */ || charCodeUnchecked(pos + 1) === 120 /* x */)) {
12746
- pos += 2;
12747
- tokenValue = scanMinimumNumberOfHexDigits(
12748
- 1,
12749
- /*canHaveSeparators*/
12750
- true
12751
- );
12752
- if (!tokenValue) {
12753
- error2(Diagnostics.Hexadecimal_digit_expected);
12754
- tokenValue = "0";
12755
- }
12756
- tokenValue = "0x" + tokenValue;
12757
- tokenFlags |= 64 /* HexSpecifier */;
12758
- return token = checkBigIntSuffix();
12759
- } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 66 /* B */ || charCodeUnchecked(pos + 1) === 98 /* b */)) {
12760
- pos += 2;
12761
- tokenValue = scanBinaryOrOctalDigits(
12762
- /* base */
12763
- 2
12764
- );
12765
- if (!tokenValue) {
12766
- error2(Diagnostics.Binary_digit_expected);
12767
- tokenValue = "0";
12618
+ continue;
12619
+ } else {
12620
+ if (ch === 13 /* carriageReturn */ && pos + 1 < end && charCodeUnchecked(pos + 1) === 10 /* lineFeed */) {
12621
+ pos += 2;
12622
+ } else {
12623
+ pos++;
12768
12624
  }
12769
- tokenValue = "0b" + tokenValue;
12770
- tokenFlags |= 128 /* BinarySpecifier */;
12771
- return token = checkBigIntSuffix();
12772
- } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 79 /* O */ || charCodeUnchecked(pos + 1) === 111 /* o */)) {
12773
- pos += 2;
12774
- tokenValue = scanBinaryOrOctalDigits(
12775
- /* base */
12776
- 8
12777
- );
12778
- if (!tokenValue) {
12779
- error2(Diagnostics.Octal_digit_expected);
12780
- tokenValue = "0";
12625
+ return token = 4 /* NewLineTrivia */;
12626
+ }
12627
+ case 9 /* tab */:
12628
+ case 11 /* verticalTab */:
12629
+ case 12 /* formFeed */:
12630
+ case 32 /* space */:
12631
+ case 160 /* nonBreakingSpace */:
12632
+ case 5760 /* ogham */:
12633
+ case 8192 /* enQuad */:
12634
+ case 8193 /* emQuad */:
12635
+ case 8194 /* enSpace */:
12636
+ case 8195 /* emSpace */:
12637
+ case 8196 /* threePerEmSpace */:
12638
+ case 8197 /* fourPerEmSpace */:
12639
+ case 8198 /* sixPerEmSpace */:
12640
+ case 8199 /* figureSpace */:
12641
+ case 8200 /* punctuationSpace */:
12642
+ case 8201 /* thinSpace */:
12643
+ case 8202 /* hairSpace */:
12644
+ case 8203 /* zeroWidthSpace */:
12645
+ case 8239 /* narrowNoBreakSpace */:
12646
+ case 8287 /* mathematicalSpace */:
12647
+ case 12288 /* ideographicSpace */:
12648
+ case 65279 /* byteOrderMark */:
12649
+ if (skipTrivia2) {
12650
+ pos++;
12651
+ continue;
12652
+ } else {
12653
+ while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
12654
+ pos++;
12781
12655
  }
12782
- tokenValue = "0o" + tokenValue;
12783
- tokenFlags |= 256 /* OctalSpecifier */;
12784
- return token = checkBigIntSuffix();
12656
+ return token = 5 /* WhitespaceTrivia */;
12785
12657
  }
12786
- }
12787
- return token = scanNumber();
12788
- }
12789
- if (!(tokenCategory & 4096 /* RecognizedMisc */)) Debug.fail(`Unhandled token category ${tokenCategory}`);
12790
- switch (ch) {
12791
12658
  case 33 /* exclamation */:
12792
12659
  if (charCodeUnchecked(pos + 1) === 61 /* equals */) {
12793
12660
  if (charCodeUnchecked(pos + 2) === 61 /* equals */) {
@@ -12824,6 +12691,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12824
12691
  }
12825
12692
  pos++;
12826
12693
  return token = 51 /* AmpersandToken */;
12694
+ case 40 /* openParen */:
12695
+ pos++;
12696
+ return token = 21 /* OpenParenToken */;
12697
+ case 41 /* closeParen */:
12698
+ pos++;
12699
+ return token = 22 /* CloseParenToken */;
12827
12700
  case 42 /* asterisk */:
12828
12701
  if (charCodeUnchecked(pos + 1) === 61 /* equals */) {
12829
12702
  return pos += 2, token = 67 /* AsteriskEqualsToken */;
@@ -12849,6 +12722,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12849
12722
  }
12850
12723
  pos++;
12851
12724
  return token = 40 /* PlusToken */;
12725
+ case 44 /* comma */:
12726
+ pos++;
12727
+ return token = 28 /* CommaToken */;
12852
12728
  case 45 /* minus */:
12853
12729
  if (charCodeUnchecked(pos + 1) === 45 /* minus */) {
12854
12730
  return pos += 2, token = 47 /* MinusMinusToken */;
@@ -12928,6 +12804,64 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12928
12804
  }
12929
12805
  pos++;
12930
12806
  return token = 44 /* SlashToken */;
12807
+ case 48 /* _0 */:
12808
+ if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 88 /* X */ || charCodeUnchecked(pos + 1) === 120 /* x */)) {
12809
+ pos += 2;
12810
+ tokenValue = scanMinimumNumberOfHexDigits(
12811
+ 1,
12812
+ /*canHaveSeparators*/
12813
+ true
12814
+ );
12815
+ if (!tokenValue) {
12816
+ error2(Diagnostics.Hexadecimal_digit_expected);
12817
+ tokenValue = "0";
12818
+ }
12819
+ tokenValue = "0x" + tokenValue;
12820
+ tokenFlags |= 64 /* HexSpecifier */;
12821
+ return token = checkBigIntSuffix();
12822
+ } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 66 /* B */ || charCodeUnchecked(pos + 1) === 98 /* b */)) {
12823
+ pos += 2;
12824
+ tokenValue = scanBinaryOrOctalDigits(
12825
+ /* base */
12826
+ 2
12827
+ );
12828
+ if (!tokenValue) {
12829
+ error2(Diagnostics.Binary_digit_expected);
12830
+ tokenValue = "0";
12831
+ }
12832
+ tokenValue = "0b" + tokenValue;
12833
+ tokenFlags |= 128 /* BinarySpecifier */;
12834
+ return token = checkBigIntSuffix();
12835
+ } else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === 79 /* O */ || charCodeUnchecked(pos + 1) === 111 /* o */)) {
12836
+ pos += 2;
12837
+ tokenValue = scanBinaryOrOctalDigits(
12838
+ /* base */
12839
+ 8
12840
+ );
12841
+ if (!tokenValue) {
12842
+ error2(Diagnostics.Octal_digit_expected);
12843
+ tokenValue = "0";
12844
+ }
12845
+ tokenValue = "0o" + tokenValue;
12846
+ tokenFlags |= 256 /* OctalSpecifier */;
12847
+ return token = checkBigIntSuffix();
12848
+ }
12849
+ case 49 /* _1 */:
12850
+ case 50 /* _2 */:
12851
+ case 51 /* _3 */:
12852
+ case 52 /* _4 */:
12853
+ case 53 /* _5 */:
12854
+ case 54 /* _6 */:
12855
+ case 55 /* _7 */:
12856
+ case 56 /* _8 */:
12857
+ case 57 /* _9 */:
12858
+ return token = scanNumber();
12859
+ case 58 /* colon */:
12860
+ pos++;
12861
+ return token = 59 /* ColonToken */;
12862
+ case 59 /* semicolon */:
12863
+ pos++;
12864
+ return token = 27 /* SemicolonToken */;
12931
12865
  case 60 /* lessThan */:
12932
12866
  if (isConflictMarkerTrivia(text, pos)) {
12933
12867
  pos = scanConflictMarkerTrivia(text, pos, error2);
@@ -12994,12 +12928,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12994
12928
  }
12995
12929
  pos++;
12996
12930
  return token = 58 /* QuestionToken */;
12931
+ case 91 /* openBracket */:
12932
+ pos++;
12933
+ return token = 23 /* OpenBracketToken */;
12934
+ case 93 /* closeBracket */:
12935
+ pos++;
12936
+ return token = 24 /* CloseBracketToken */;
12997
12937
  case 94 /* caret */:
12998
12938
  if (charCodeUnchecked(pos + 1) === 61 /* equals */) {
12999
12939
  return pos += 2, token = 79 /* CaretEqualsToken */;
13000
12940
  }
13001
12941
  pos++;
13002
12942
  return token = 53 /* CaretToken */;
12943
+ case 123 /* openBrace */:
12944
+ pos++;
12945
+ return token = 19 /* OpenBraceToken */;
13003
12946
  case 124 /* bar */:
13004
12947
  if (isConflictMarkerTrivia(text, pos)) {
13005
12948
  pos = scanConflictMarkerTrivia(text, pos, error2);
@@ -13020,6 +12963,15 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13020
12963
  }
13021
12964
  pos++;
13022
12965
  return token = 52 /* BarToken */;
12966
+ case 125 /* closeBrace */:
12967
+ pos++;
12968
+ return token = 20 /* CloseBraceToken */;
12969
+ case 126 /* tilde */:
12970
+ pos++;
12971
+ return token = 55 /* TildeToken */;
12972
+ case 64 /* at */:
12973
+ pos++;
12974
+ return token = 60 /* AtToken */;
13023
12975
  case 92 /* backslash */:
13024
12976
  const extendedCookedChar = peekExtendedUnicodeEscape();
13025
12977
  if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) {
@@ -13040,21 +12992,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13040
12992
  pos++;
13041
12993
  return token = 0 /* Unknown */;
13042
12994
  case 35 /* hash */:
13043
- const charAfterHash = codePointUnchecked(pos + 1);
13044
- if (charAfterHash === 33 /* exclamation */) {
13045
- if (pos === 0) {
13046
- pos = scanShebangTrivia(text, pos);
13047
- if (skipTrivia2) {
13048
- continue;
13049
- } else {
13050
- return token = 6 /* ShebangTrivia */;
13051
- }
13052
- } else if (pos !== 0) {
13053
- error2(Diagnostics.can_only_be_used_at_the_start_of_a_file, pos, 2);
13054
- pos++;
13055
- return token = 0 /* Unknown */;
13056
- }
12995
+ if (pos !== 0 && text[pos + 1] === "!") {
12996
+ error2(Diagnostics.can_only_be_used_at_the_start_of_a_file, pos, 2);
12997
+ pos++;
12998
+ return token = 0 /* Unknown */;
13057
12999
  }
13000
+ const charAfterHash = codePointUnchecked(pos + 1);
13058
13001
  if (charAfterHash === 92 /* backslash */) {
13059
13002
  pos++;
13060
13003
  const extendedCookedChar2 = peekExtendedUnicodeEscape();
@@ -13086,6 +13029,22 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13086
13029
  error2(Diagnostics.File_appears_to_be_binary, 0, 0);
13087
13030
  pos = end;
13088
13031
  return token = 8 /* NonTextFileMarkerTrivia */;
13032
+ default:
13033
+ const identifierKind = scanIdentifier(ch, languageVersion);
13034
+ if (identifierKind) {
13035
+ return token = identifierKind;
13036
+ } else if (isWhiteSpaceSingleLine(ch)) {
13037
+ pos += charSize(ch);
13038
+ continue;
13039
+ } else if (isLineBreak(ch)) {
13040
+ tokenFlags |= 1 /* PrecedingLineBreak */;
13041
+ pos += charSize(ch);
13042
+ continue;
13043
+ }
13044
+ const size = charSize(ch);
13045
+ error2(Diagnostics.Invalid_character, pos, size);
13046
+ pos += size;
13047
+ return token = 0 /* Unknown */;
13089
13048
  }
13090
13049
  }
13091
13050
  }
@@ -56053,7 +56012,7 @@ function createTypeChecker(host) {
56053
56012
  if (context.enclosingDeclaration && (!isErrorType(type) || context.flags & 1 /* AllowUnresolvedNames */) && signature.declaration && !nodeIsSynthesized(signature.declaration)) {
56054
56013
  const annotation = signature.declaration && getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration);
56055
56014
  if (annotation && getTypeFromTypeNode2(context, annotation) === type) {
56056
- const result = tryReuseExistingTypeNodeHelper(context, annotation);
56015
+ const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration);
56057
56016
  if (result) {
56058
56017
  return result;
56059
56018
  }
@@ -119217,7 +119176,13 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119217
119176
  );
119218
119177
  }
119219
119178
  function emitLiteral(node, jsxAttributeEscape) {
119220
- const text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape);
119179
+ const text = getLiteralTextOfNode(
119180
+ node,
119181
+ /*sourceFile*/
119182
+ void 0,
119183
+ printerOptions.neverAsciiEscape,
119184
+ jsxAttributeEscape
119185
+ );
119221
119186
  if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) {
119222
119187
  writeLiteral(text);
119223
119188
  } else {
@@ -119698,6 +119663,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
119698
119663
  if (isNumericLiteral(expression)) {
119699
119664
  const text = getLiteralTextOfNode(
119700
119665
  expression,
119666
+ /*sourceFile*/
119667
+ void 0,
119701
119668
  /*neverAsciiEscape*/
119702
119669
  true,
119703
119670
  /*jsxAttributeEscape*/
@@ -121839,18 +121806,18 @@ function createPrinter(printerOptions = {}, handlers = {}) {
121839
121806
  }
121840
121807
  return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
121841
121808
  }
121842
- function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) {
121809
+ function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) {
121843
121810
  if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) {
121844
121811
  const textSourceNode = node.textSourceNode;
121845
121812
  if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) {
121846
121813
  const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode);
121847
121814
  return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`;
121848
121815
  } else {
121849
- return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
121816
+ return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape);
121850
121817
  }
121851
121818
  }
121852
121819
  const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target >= 8 /* ES2021 */ ? 8 /* AllowNumericSeparator */ : 0);
121853
- return getLiteralText(node, currentSourceFile, flags);
121820
+ return getLiteralText(node, sourceFile, flags);
121854
121821
  }
121855
121822
  function pushNameGenerationScope(node) {
121856
121823
  privateNameTempFlagsStack.push(privateNameTempFlags);
@@ -189635,7 +189602,13 @@ var Session3 = class _Session {
189635
189602
  }
189636
189603
  }
189637
189604
  sendRequestCompletedEvent(requestId, performanceData) {
189638
- this.event({ request_seq: requestId, performanceData }, "requestCompleted");
189605
+ this.event(
189606
+ {
189607
+ request_seq: requestId,
189608
+ performanceData: performanceData && toProtocolPerformanceData(performanceData)
189609
+ },
189610
+ "requestCompleted"
189611
+ );
189639
189612
  }
189640
189613
  addPerformanceData(key, value) {
189641
189614
  if (!this.performanceData) {
@@ -189643,6 +189616,15 @@ var Session3 = class _Session {
189643
189616
  }
189644
189617
  this.performanceData[key] = (this.performanceData[key] ?? 0) + value;
189645
189618
  }
189619
+ addDiagnosticsPerformanceData(file, kind, duration) {
189620
+ var _a, _b;
189621
+ if (!this.performanceData) {
189622
+ this.performanceData = {};
189623
+ }
189624
+ let fileDiagnosticDuration = (_a = this.performanceData.diagnosticsDuration) == null ? void 0 : _a.get(file);
189625
+ if (!fileDiagnosticDuration) ((_b = this.performanceData).diagnosticsDuration ?? (_b.diagnosticsDuration = /* @__PURE__ */ new Map())).set(file, fileDiagnosticDuration = {});
189626
+ fileDiagnosticDuration[kind] = duration;
189627
+ }
189646
189628
  performanceEventHandler(event) {
189647
189629
  switch (event.kind) {
189648
189630
  case "UpdateGraph":
@@ -189799,7 +189781,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
189799
189781
  command: cmdName,
189800
189782
  request_seq: reqSeq,
189801
189783
  success,
189802
- performanceData
189784
+ performanceData: performanceData && toProtocolPerformanceData(performanceData)
189803
189785
  };
189804
189786
  if (success) {
189805
189787
  let metadata;
@@ -189877,13 +189859,13 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
189877
189859
  const body = {
189878
189860
  file,
189879
189861
  diagnostics: diagnostics.map((diag2) => formatDiag(file, project, diag2)),
189880
- spans: spans == null ? void 0 : spans.map((span) => toProtocolTextSpan(span, scriptInfo)),
189881
- duration
189862
+ spans: spans == null ? void 0 : spans.map((span) => toProtocolTextSpan(span, scriptInfo))
189882
189863
  };
189883
189864
  this.event(
189884
189865
  body,
189885
189866
  kind
189886
189867
  );
189868
+ this.addDiagnosticsPerformanceData(file, kind, duration);
189887
189869
  } catch (err) {
189888
189870
  this.logError(err, kind);
189889
189871
  }
@@ -191790,6 +191772,10 @@ ${e.message}`;
191790
191772
  return this.projectService.getHostPreferences();
191791
191773
  }
191792
191774
  };
191775
+ function toProtocolPerformanceData(performanceData) {
191776
+ const diagnosticsDuration = performanceData.diagnosticsDuration && arrayFrom(performanceData.diagnosticsDuration, ([file, data]) => ({ ...data, file }));
191777
+ return { ...performanceData, diagnosticsDuration };
191778
+ }
191793
191779
  function toProtocolTextSpan(textSpan, scriptInfo) {
191794
191780
  return {
191795
191781
  start: scriptInfo.positionToLineOffset(textSpan.start),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.6.0-pr-59106-19",
5
+ "version": "5.6.0-pr-59170-2",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [